---
title: Notation you'll see: j, ∠ and calculator input
heading: One number, many ways to write it
eyebrow: A3 · Lesson 25 · Notation
xp: 40
---

::: hook
A datasheet writes an impedance as $50\angle{-30°}\ \Omega$. A physics book writes $50e^{-i\pi/6}$. Python prints `(43.30127018922194-25j)`. A calculator shows `43.30-25.00i`. They're all the same number. Reading any of them without stumbling is a skill of its own, and it's the last piece before phasors go to work in circuits.

::: play
- Set the length and the angle. The strip writes the same number in rectangular form and with its angle in degrees and in radians.
- Find the number Python would print as `(-1+1.7320508075688772j)`. What are its length and angle?
:::
:::

```sim plot
view: complex
range: 2.5
slider: r = 0..5 step 0.1 = 2
slider: t = -180..180 step 5 = 120 °
arrow: r∠t | label: z
readout: real part = Re(r∠t)
readout: imaginary part = Im(r∠t)
readout: angle in rad = t*pi/180
```

::: predict
## A calculator in radian mode shows the angle of $1\angle 90°$. What does it display?

- [ ] 90
- [x] 1.5708
- [ ] 0.25
- [ ] 3.1416

::: reveal
1.5708, which is $\pi/2$. A quarter turn is 90° or $\pi/2$ radians, and a calculator in radian mode reports radians. Most mistakes with complex numbers on a calculator come from the angle mode, so check it before trusting any angle it gives you.
:::
:::

::: nameit
## A field guide to complex notation

| You'll see | It means |
|---|---|
| $a + jb$, $a + bj$, $a + ib$ | the same rectangular form; physics and math use $i$ |
| $r\angle\theta$ | polar form; θ is usually in degrees |
| $re^{j\theta}$ | polar form; θ must be in radians |
| $r\,\text{cis}\,\theta$ | $r(\cos\theta + j\sin\theta)$, an older shorthand |
| $\mathbf{V}$, $\tilde V$, $\bar V$, $\hat V$ | a phasor; books differ in how they mark it |
| $z^*$ or $\bar z$ | the conjugate |
| $\lvert z\rvert$, $\arg z$, $\angle z$ | the magnitude, and the angle |

**Peak or RMS.** A phasor written $120\angle 0°$ V might mean an amplitude of 120 V or an RMS value of 120 V (an amplitude of 170 V). Power engineering almost always uses RMS phasors; signal and control books often use amplitudes. Look for the convention before you compute a power.

**On a computer.** Python writes $j$ after the number, as `3+4j`, and its `cmath` module does the conversions:

```
import cmath
z = 3 + 4j
abs(z)               # 5.0, the magnitude
cmath.phase(z)       # 0.927..., the angle in radians
cmath.rect(5, 0.927) # back to (3+4j), approximately
```

Angles in code are always in radians. MATLAB, Julia and numpy follow the same rules, and spreadsheets have functions like `IMABS` and `IMARGUMENT`.

**On a calculator.** Most scientific calculators have a complex mode with a ∠ key and a key to switch between rectangular and polar display. Set the angle mode first, and remember that a number like `4.7E3∠-30` mixes engineering notation with polar form.
:::

::: example
## European mains is quoted as $230\angle 0°$ V. What is its amplitude?

::: solution
1. **Read the convention.** Power engineers quote phasors as RMS values.
2. **Convert to amplitude.** A sine's amplitude is $\sqrt2$ times its RMS:
   $$230\sqrt2 = 325\ \text{V}$$
3. **When it isn't stated.** When a phasor doesn't say whether it's RMS or amplitude, check the context: power and mains work is almost always RMS, signal work often amplitude.

**Answer:** the amplitude is 325 V.
:::
:::

::: example
## In Python, how do you make $5\angle 30°$, and what does it print?

::: solution
1. **Convert the angle to radians.** `cmath.rect` wants the angle in radians, so call `cmath.rect(5, math.radians(30))`.
2. **The output.** It prints `(4.330127018922194+2.4999999999999996j)`.
3. **Read it.** Python writes $j$ after the number, and the tiny error in the imaginary part is floating-point rounding: it's 2.5.

**Answer:** `cmath.rect(5, math.radians(30))`, which prints `(4.330127018922194+2.4999999999999996j)`.
:::
:::

::: example
## Write $5 + j3$ in polar form with the angle in degrees, in exponential form with the angle in radians, and as Python would.

::: solution
1. **Length.**
   $$\begin{aligned} r &= \sqrt{5^2 + 3^2} \\ &= 5.831 \end{aligned}$$
2. **Angle in degrees.**
   $$\arctan(3/5) = 30.96°$$
   so it's $5.831\angle 30.96°$.
3. **Angle in radians.**
   $$30.96 \times \pi/180 = 0.5404$$
   so it's $5.831e^{j0.5404}$.
4. **In Python.** Python writes `5+3j`, and `abs(5+3j)` and `cmath.phase(5+3j)` give back 5.831 and 0.5404, in radians.

**Answer:** $5.831\angle 30.96°$, $5.831e^{j0.5404}$, and `5+3j` in Python.
:::
:::

::: check
kind: match

## Match each way of writing a number with the same value.

- `1j` in Python :: $1\angle 90°$
- $2e^{j\pi}$ :: $-2$
- $\sqrt2\angle{-45°}$ :: $1 - j$
- `(3+4j)` in Python :: $5\angle 53.13°$
- [extra] $5\angle 0.927°$
- [extra] $2\angle 90°$

::: right
Right. Notice the extra $5\angle 0.927°$: 0.927 is the angle of $3 + j4$ in radians, so writing it with a degree sign is a classic slip.
:::
:::

::: check
given: r = 2..9 int; d = 30 | 45 | 60 | 120 | 135 | 150
answer: d*pi/180
tolerance: 0.5%

## To write $\given{r}\angle\given{d}°$ as $\given{r}e^{j\theta}$, what must θ be?

::: right
Right. In the exponent, the angle has to be in radians: {d}° × π/180.
:::

::: misses
- [d] In $e^{j\theta}$ the angle must be in radians. Convert from degrees.
- [any] Not yet. Convert {d}° to radians.
:::
:::

::: check
kind: choice

## A phasor is given as $230\angle 0°$ V RMS. What is the amplitude of the voltage?

- [ ] 230 V
- [x] About 325 V
- [ ] 115 V
- [ ] About 163 V

::: right
Right. The amplitude is $\sqrt2$ times the RMS value: $230\sqrt2 \approx 325$ V.
:::

::: misses
- [1] That's the RMS value. The amplitude is larger by √2.
- [3] That halves it. The ratio between amplitude and RMS is √2, about 1.41.
- [4] That divides by √2. Going from RMS to amplitude, multiply.
:::
:::

::: check
given: a = -9 | -6 | -3; b = -8 | -4 | 4 | 8
answer: arg(a + j*b)
tolerance: 0.5%

## Python's `cmath.phase(complex({a}, {b}))` returns what number?

::: right
Right. `cmath.phase` returns the angle in radians, between −π and π, in the right quadrant: {answer}.
:::

::: misses
- [arg(a + j*b)*180/pi] That's the angle in degrees. Code always works in radians.
- [atan(b/a)] `cmath.phase` uses atan2, so it gets the quadrant right.
- [any] Not yet. It's the angle of $\given{a} + j(\given{b})$, in radians.
:::
:::

::: check
kind: parts
given: a = -3 | -2; b = 4 | 5

## Write $z = \given{a} + j\given{b}$ in other forms.

::: part
answer: sqrt(a^2 + b^2)
tolerance: 0.5%

### What is $|z|$?

::: misses
- [any] $\sqrt{a^2 + b^2}$.
:::
:::

::: part
answer: arg(a + j*b)
tolerance: 0.5%

### What is its angle in radians, as `cmath.phase` gives it?

::: misses
- [arg(a + j*b)*180/pi] That's in degrees. Python returns radians.
- [atan(b/a)] Check the quadrant.
- [any] The angle of $(a, b)$, in radians.
:::
:::

::: part
answer: arg(a + j*b)*180/pi
unit: °
tolerance: 0.5%

### And in degrees?

::: misses
- [any] Multiply radians by $180/\pi$.
:::
:::
:::

::: check
kind: derivation
vars: r = 0.5..10, d = -180..180

## A number is written as $r\angle d°$, with the angle in degrees. Convert it.

::: step
answer: d*pi/180

### What is the angle in radians?
:::

::: step
answer: r*cos(d*pi/180)

### What is the real part?
:::

::: step
answer: r*exp(j*d*pi/180)

### Write it in exponential form.
:::

::: right
Right. $r\angle d° = re^{j\pi d/180}$: the angle notation is shorthand for the exponential, with degrees in place of radians.
:::
:::

::: explain
## A classmate types `cmath.rect(5, 30)` into Python, expecting $5\angle 30°$, and gets an answer near $0.77 - j4.94$. What went wrong?

::: model
Python's `cmath.rect` takes the angle in radians, so it built $5\angle 30$ radians. Thirty radians is nearly five full turns, which lands the point somewhere unrelated to 30°. They should convert first: `cmath.rect(5, math.radians(30))`, which gives about $4.33 + j2.5$.
:::
:::

::: practice

::: check
given: r = 1..9 int; x = 0.2..3 sig 2
answer: x*180/pi
unit: °
tolerance: 0.5%

## $\given{r}e^{j\given{x}}$ written as $\given{r}\angle\theta$: what is θ in degrees?

::: misses
- [1*x] That's in radians. Convert to degrees.
- [any] Multiply by 180/π.
:::
:::

::: check
given: a = 1..9 int; b = 1..9 int
answer: sqrt(a^2 + b^2)
tolerance: 0.5%

## What does Python print for `abs({a}+{b}j)`?

::: misses
- [a^2 + b^2] `abs` returns the magnitude, the square root of that.
- [any] It's the length $\sqrt{a^2 + b^2}$.
:::
:::

::: check
given: V = 100 | 120 | 230 | 240 | 400
answer: V*sqrt(2)
unit: V
tolerance: 0.5%

## A phasor is $\given{V}\angle 0°$ V RMS. What is the voltage's amplitude?

::: misses
- [V] That's the RMS value.
- [V/sqrt(2)] Going from RMS to amplitude, multiply by √2.
- [any] Amplitude is √2 times the RMS value.
:::
:::

::: check
given: Vp = 10..400 sig 2
answer: Vp/sqrt(2)
unit: V
tolerance: 0.5%

## A phasor of amplitude {Vp} V is to be written as an RMS phasor. What is its magnitude?

::: misses
- [Vp*sqrt(2)] RMS is smaller than the amplitude: divide by √2.
- [any] Divide the amplitude by √2.
:::
:::
:::
