1import cmath2abs(cmath.exp(2j))3VR = 3 * 24VL = 4j * 25V = VR + VL6cmath.polar(V)iRv(t)LR = 3 ΩωL = 4 Ω
COMPLEX PLANEReIm1−1jI: 1 A drawn as 2.5 Ve^jθIVRVLVcos θsin θ0°90°180°270°360°-1-0.500.51ωtcos ωt = Re e^jωtcos ωt0°90°180°270°360°-10-50510ωtWAVEFORMS vs ωti (A)vRvLv
Circuit: an AC source, R = 3 Ω and ωL = 4 Ω in seriesPlots below: the complex plane, where phasors are arrows, and the waves their shadows traceCalculator: the phasor being worked outPython card: cmath does the same complex arithmeticA phasor is a spinning arrow frozen at t = 0. The arrow e^jθ has length 1 and turns by θ; let θ = ωt and its shadow on the real axis is cos ωt. In the series R-L circuit the current is i = 2 cos ωt: VR = 3 × 2∠0° = 6∠0°, VL = j4 × 2 = 8∠90°, and tip to tail V = 6 + j8 = 10∠53.13°, so v(t) = 10 cos(ωt + 53.13°). The current arrow I (and jI) is drawn on its own scale: 1 A is as long as 2.5 V, so I = 2 A is as long as a 5 V arrow. Amps and volts cannot share one ruler. These phasors use peak amplitudes. Power engineers often use RMS values instead (peak ÷ √2); the angles and the method do not change.

Euler's formula

  1. Draw a radius-1 circle around 0 in the complex plane. The point at angle θ sits cos θ across and sin θ up, so it is the complex number cos θ + j sin θ. Engineers write j for √−1, because i means current.

Phasors

R and L as phasors

Adding phasors

Try it in the Python prompt

;; step 1/10 · The unit circle
>>> import math
>>> math.cos(math.pi/3), math.sin(math.pi/3)   # θ = 60°
(0.5000000000000001, 0.8660254037844386)
>>> complex(math.cos(math.pi/3), math.sin(math.pi/3))
(0.5000000000000001+0.8660254037844386j)

Mathematicians write i for √−1; electrical engineers write j, because i is the symbol for current. Python follows the engineers: 2j is a complex literal. The current arrow I (and jI) is drawn on its own scale: 1 A is as long as 2.5 V, so I = 2 A is as long as a 5 V arrow. Amps and volts cannot share one ruler. Python prints 1j as 1j and e^jπ as (-1+1.2246467991473532e-16j): the tiny imaginary part is floating-point rounding, not maths.