Name a complex number by its length and its angle and multiplying becomes easy: lengths multiply and angles add. For two points of the unit circle that proves the angle-addition formulas for every angle, and Euler’s formula gives each point of the circle a short name.
Write a complex number in polar form, r(cos θ + i sin θ), and convert between the polar and the rectangular form.
Derive the angle-addition formulas for every pair of angles by multiplying two numbers on the unit circle.
Use Euler’s formula, e to the power iθ equals cos θ + i sin θ, as a name whose rule of powers says that arguments add, and support it with a compounding table.
Compute moduli, arguments and powers with the cmath module, and compare complex results with a tolerance.
In review. The maths and code on this page are checked by automated tests on every change, but an independent reader has not signed it off yet. Spot a mistake or a confusing step? Tell us.
The question
Raise \({3 + 4i}\) to the tenth power by multiplying out brackets and you face nine long multiplications. Yet the answer can be read off at once: its length is \(5^{10}\) and its angle is ten times that of \({3 + 4i}\). And the odd-looking line \({e^{i\pi} = -1}\) ties together three numbers that seem to have nothing in common: \(e\) from growth (M01.4.2), \(i\) from this module and \(\pi\) from circles (M01.5.3). This lesson finds the language in which both facts are plain. Signal processing speaks it every day: the amplitude and the phase of a wave are one complex number.
From the last lesson
1. Where does multiplying by \(i\) send \({2 + 5i}\)?
Show answer
To \({-5 + 2i}\): the point \({(a, b)}\) goes to \({(-b, a)}\), a quarter turn anticlockwise about 0.
2.\(u\) has length 2 and angle \(30^\circ\), and \(z\) has length 5 and angle \(53.13^\circ\). Give the length and the angle of \(uz\).
Show answer
Lengths multiply and angles add: length 10, angle \(83.13^\circ\).
Intuition
Every arrow from 0 is a length and a direction. The direction is a point of the unit circle: at angle \(\theta\) it is \({(\cos\theta, \sin\theta)}\), by M01.5.2, which as a complex number is \({\cos\theta + i\sin\theta}\). The length is a positive number \(r\). Multiply the direction by \(r\) and you have the arrow:
\[
z = r(\cos\theta + i\sin\theta) .
\]
M01.9.3-F1
The polar form. The direction of \({3 + 4i}\) is the point \({0.6 + 0.8i}\) of the unit circle; five times that direction is \({3 + 4i}\).
For \({z = 3 + 4i}\) the length is 5 and the direction is \({0.6 + 0.8i}\), the 3-4-5 triangle shrunk to fit the unit circle. In this form the rule of M01.9.2 becomes a sentence a child could follow: to multiply two numbers, multiply their lengths and add their angles. A power then needs no brackets at all, and two points of the unit circle, multiplied, prove the angle-addition formulas of M01.5.4 for every angle there is.
Build it up
Step 1. The polar form. By M01.5.2, the point at distance \(r\) and angle \(\theta\) is \({(r\cos\theta, r\sin\theta)}\). As a complex number that is \({r\cos\theta + ir\sin\theta}\), which is \({r(\cos\theta + i\sin\theta)}\). The length \({r = \abs{z}}\) is the modulus, and the angle \(\theta\) is called the argument, written \(\arg z\). As everywhere from M01.5.3 on, the angle is in radians unless it carries a degree sign, and \(\arg z\) is taken between \({-\pi}\) and \(\pi\), the way Python’s cmath.phase returns it. For \({3 + 4i}\): \({r = 5}\), and \(\theta\) is atan2(4, 3), about \(0.9273\), which is \(53.13^\circ\).
Step 2. Multiplying in polar form. If \(z\) has length \(r_1\) and angle \(\alpha\), and \(u\) has length \(r_2\) and angle \(\beta\), then M01.9.2 says that \(uz\) has length \(r_1 r_2\) and angle \({\alpha + \beta}\):
Step 3. Powers. Multiplying by \(z\) again and again multiplies the length by \(r\) each time and adds \(\theta\) each time. So \(z^n\) has length \(r^n\) and angle \(n\theta\). For \({z = 3 + 4i}\), the square \(z^2\) has length 25 and angle \(2\theta\), about 1.8546, which is \(106.26^\circ\).
Step 4. The angle-addition formulas, for every angle. Take two points of the unit circle, \({\cos\alpha + i\sin\alpha}\) and \({\cos\beta + i\sin\beta}\). Both lengths are 1, so by Step 2 their product is \({\cos(\alpha + \beta)} + {i\sin(\alpha + \beta)}\). Now multiply the same two brackets out, as in M01.9.1. The four products are
Two complex numbers are equal exactly when their real parts are equal and their imaginary parts are equal (M01.9.1). Matching the two answers part by part gives
These are the formulas of M01.5.4. That lesson’s picture needed two positive angles with a sum below \(90^\circ\). The rule of M01.9.2 holds for every pair of angles and never used these formulas, so now they are proved for every pair.
M01.9.3-F2
Two points of the unit circle multiply to the point at the sum of their angles. Here the sum is \(270^\circ\), far beyond the reach of the triangle picture of M01.5.4.
The formal statement
NoteDefinition: the polar form and Euler’s formula
A complex number \({z \neq 0}\) with modulus \({r = \abs{z}}\) and argument \({\theta = \arg z}\) (in radians, between \({-\pi}\) and \(\pi\)) is
\[
z = r(\cos\theta + i\sin\theta) .
\]
Euler’s formula names the point of the unit circle at angle \(\theta\):
\[
e^{i\theta} = \cos\theta + i\sin\theta ,
\]
so that the polar form is written \({z = re^{i\theta}}\).
At this stage \(e^{i\theta}\) is a name, as Beck and others say of it, “purely a notation”. The rule of Step 2, for two numbers of length 1, now reads
That is the shape of the rule \({b^m\,b^n = b^{m + n}}\) of M01.4.1, which is one reason the name deserves its \(e\). Its first consequences: \({e^{i0} = 1}\); \({e^{i\pi} = \cos\pi + i\sin\pi = -1}\); the length of \(e^{i\theta}\) is always 1; and since \({e^{i\theta}e^{-i\theta} = e^{i0} = 1}\), dividing by \(e^{i\theta}\) is multiplying by \({e^{-i\theta}}\), a turn back.
The compounding table, with an imaginary rate. Lesson M01.4.2 found \(e\) as the number that \({(1 + \frac{1}{n})^n}\) settles towards. The same table with a rate of 2, \({(1 + \frac{2}{n})^n}\), climbs to 7.3889 by \({n = 100{,}000}\), close to \({e^2 \approx 7.3891}\): a rate of \(x\) leads towards \(e^x\). Now run it with the imaginary rate \(i\pi\). If the name \(e^{i\theta}\) has earned its letter, \({(1 + \frac{i\pi}{n})^n}\) should settle towards \({e^{i\pi} = -1}\).
\(n\)
\({(1 + \frac{i\pi}{n})^n}\)
1
\({1 + 3.1416i}\)
4
\({-2.3206 + 1.2037i}\)
10
\({-1.5934 + 0.1561i}\)
100
\({-1.0506 + 0.0011i}\)
1,000
\({-1.0049 + 0.0000i}\)
100,000
\({-1.0000 + 0.0000i}\)
It does. The picture shows why. Each factor \({1 + \frac{i\pi}{n}}\) is a point just above 1: its angle is a little less than \(\frac{\pi}{n}\) and its length a little more than 1. Multiplying \(n\) of them adds the \(n\) small angles, to a little less than \(\pi\), and multiplies the \(n\) lengths, to a little more than 1. The more steps, the nearer both come to a half turn of length 1, which is the point \({-1}\).
M01.9.3-F3
The compounding table as a picture. With more and smaller turns the path hugs the unit circle and ends ever closer to \({-1}\).
The table is evidence, not proof. What “settles towards” means exactly is a limit (M04.1), and the proof that \(e^{i\theta}\) and \({\cos\theta + i\sin\theta}\) agree, once \(e\) to a complex power has its own definition, uses the series of M04.8. Until then \(e^{i\theta}\) is a name with the right rule of powers and the right table behind it.
Go deeper: the exact length and angle of each row of the table
The factor \({1 + \frac{i\pi}{n}}\) is the point \({(1, \frac{\pi}{n})}\). Its length is \({\sqrt{1 + \pi^2/n^2}}\) and its angle is \({\operatorname{atan}(\pi/n)}\), since the point lies in the right half of the plane. By M01.9.2, the \(n\)-th power has
At \({n = 100}\) the length is about 1.0506 and the angle about 3.1406, which is \(179.94^\circ\): the point \({-1.0506 + 0.0011i}\) of the table. At \({n = 100{,}000}\) the length is about 1.00005 and the angle is within a ten-millionth of a degree of \(180^\circ\).
Worked example
Write \({z = 3 + 4i}\) in polar form, and use it to square \(z\).
The polar form. The length is \({r = \sqrt{9 + 16} = 5}\). The angle \(\theta\) is atan2(4, 3), about \(0.9273\) radians, which is \(53.13^\circ\); its cosine and sine are \({3/5 = 0.6}\) and \({4/5 = 0.8}\). So
Back again: \({5\cos\theta = 5 \times 0.6 = 3}\) and \({5\sin\theta = 5 \times 0.8 = 4}\).
The square, by the polar form. Square the length and double the angle: \({5^2 = 25}\) and \({2\theta \approx 1.8546}\), which is \(106.26^\circ\). The cosine and sine of that angle are \({-0.28}\) and \(0.96\), so
Two routes to \(z^2\). Multiplying out uses \({i^2 = -1}\); the polar form squares the length and doubles the angle. Both land on \({-7 + 24i}\).
The square, by brackets.\({(3 + 4i)^2 = 9 + 12i + 12i + 16i^2}\), which is \({9 + 24i - 16}\), or \({-7 + 24i}\). The two routes agree, and the polar route did no multiplying out at all.
The tenth power, from the hook. The length is \({5^{10} = 9{,}765{,}625}\), and the angle is \({10 \times 53.13^\circ = 531.30^\circ}\), which is one whole turn and \(171.30^\circ\) more. So \(z^{10}\) points just above the negative real axis, and the code below finds it to be \({-9{,}653{,}287 + 1{,}476{,}984i}\).
Code
First the two conversions from scratch, with math.hypot for the length and math.atan2 for the angle (in radians, \(y\) first), and math.cos and math.sin for the way back.
import mathdef to_polar(a, b):return math.hypot(a, b), math.atan2(b, a) # (length r, angle theta in radians)def from_polar(r, theta):return r * math.cos(theta), r * math.sin(theta) # (real part, imaginary part)r, theta = to_polar(3, 4)print(r, round(theta, 4), round(math.degrees(theta), 2))x, y = from_polar(r, theta)print(round(x, 10), round(y, 10))print("z squared:", [round(v, 10) for v in from_polar(r **2, 2* theta)])
5.0 0.9273 53.13
3.0 4.0
z squared: [-7.0, 24.0]
Python’s complex numbers, where \(i\) is written 1j, give powers directly with **. The polar rule agrees with them, up to rounding:
z =3+4jprint(z **2, z **10)print(from_polar(r **10, 10* theta)) # length 5 to the 10, angle 10 theta
The compounding table by a loop. Each pass multiplies the running total by one small turn, \({1 + \frac{i\pi}{n}}\), and the f"..." string prints four decimal places with the sign shown:
for n in [1, 4, 10, 100, 1000, 100000]: step =complex(1, math.pi / n) # one small turn, 1 + i pi / n total =1for _ inrange(n): total = total * step # n small turns, one after anotherprint(f"{n:>6}{total.real:.4f}{total.imag:+.4f}i")
The cmath module, the complex twin of math, does each job in one call: polar gives the length and the argument, phase the argument alone, rect goes back, and exp raises \(e\) to a complex power.
The third line comes back to \({3 + 4i}\) up to a rounding error in the last digit. The last line deserves a closer look. cmath.exp(1j * math.pi) misses \({-1}\) by a tiny imaginary part, about \({1.2 \times 10^{-16}}\), because math.pi stops after sixteen or so digits and the sine of it is not exactly 0. So == says False, while cmath.isclose says True. Compare complex results with a tolerance, just like floats.
Finally the angle-addition formulas checked on a grid of 625 pairs of angles, every \(15^\circ\) from \({-180^\circ}\) to \(180^\circ\). This is evidence for what Step 4 proved:
The same idea runs through signal processing. The wave \({A\sin(t + \phi)}\) of M01.5.3 is the imaginary part of \(ce^{it}\) with \({c = Ae^{i\phi}}\), because \({ce^{it} = Ae^{i(t + \phi)}}\). So a single complex number \(c\) holds both the amplitude (its modulus) and the phase (its argument). A Fourier transform (M10.9) describes a signal by one such number for each frequency, and characteristic functions (M07.2) and spectral analysis (S07.6) rest on the same idea.
c = cmath.rect(2, 0.5) # amplitude 2, phase 0.5for t in [0.0, 1.0, 2.5]:print(round((c * cmath.exp(1j* t)).imag, 4), round(2* math.sin(t +0.5), 4))
0.9589 0.9589
1.995 1.995
0.2822 0.2822
Explore
The turn-and-scale explorer of lesson M01.9.2 is a polar-form machine. Set the length of \(u\) to 1 and its angle to \(45^\circ\): \(u\) is then \(e^{i\pi/4}\). Press Multiply again eight times. The powers of \(u\) step round the circle of radius 5, an eighth of a turn at a time, and come home, because eight turns of \(\frac{\pi}{4}\) make \(2\pi\), a whole turn. Now set the length to 0.9: each press multiplies the length by 0.9, so after eight presses it is \({0.9^8 \approx 0.4305}\) of what it was, and the walk spirals in.
Pitfalls
M01.9.3-F5
Wrong beside right. cmath.rect reads its angle in radians, so 53.13 means 53.13 radians: eight whole turns and \(164.12^\circ\) more.
“cmath.rect(5, 53.13) gives \({3 + 4i}\).”
Every cmath function measures angles in radians, as math does. Read as radians, 53.13 is eight whole turns and \(164.12^\circ\) more, and the result is about \({-4.81 + 1.37i}\). Convert first: cmath.rect(5, math.radians(53.13)) is about \({3 + 4i}\), and cmath.rect(5, cmath.phase(3 + 4j)) is \({3 + 4i}\) up to rounding.
“The argument of a product is exactly the sum of the arguments.”
Only up to a whole turn, because an argument is kept between \({-\pi}\) and \(\pi\). The argument of \({-1 + i}\) is \(\frac{3\pi}{4}\) (2.3562) and that of \(i\) is \(\frac{\pi}{2}\) (1.5708); they add to 3.9270, which is \(225^\circ\). But cmath.phase of the product \({-1 - i}\) is \({-2.3562}\), which is \({-135^\circ}\): the same direction, \(2\pi\) lower. To compare two directions, compare the points cmath.rect(1, a) and cmath.rect(1, b), not the raw angles.
“\(e^{i\theta}\) grows as \(\theta\) grows, like \(e^x\).”
For a real \(\theta\) the length of \(e^{i\theta}\) is always 1: it goes round the unit circle and never grows. Growth needs a real part. NumPy’s documentation of exp puts it this way: for \({x = a + ib}\), \({e^x = e^a\,e^{ib}}\), where \(e^a\) stretches and \(e^{ib}\) only turns.
Check yourself
Recall
1. What is the polar form of a complex number with modulus \(r\) and argument \(\theta\)?
Show answer
\({z = r(\cos\theta + i\sin\theta)}\), which Euler’s formula writes \({z = re^{i\theta}}\).
2. What are the modulus and the argument of \({-2}\)?
Show answer
The modulus is 2 and the argument is \(\pi\): the point lies on the negative real axis, a half turn from the positive one.
3. What is \(e^{i\pi/2}\)?
Show answer
\({\cos\frac{\pi}{2} + i\sin\frac{\pi}{2}} = {0 + 1i} = i\): the point a quarter turn round the unit circle.
4. Multiply \(2e^{0.5i}\) by \(3e^{1.2i}\).
Show answer
Multiply the lengths and add the angles: \(6e^{1.7i}\).
5. Why does \({(1 + \frac{i\pi}{n})^n}\) close on \({-1}\) as \(n\) grows?
Show answer
It is \(n\) small turns of a little less than \(\frac{\pi}{n}\) each, which add up to nearly \(\pi\), a half turn; the \(n\) lengths, each a hair over 1, multiply to nearly 1. The point at angle \(\pi\) and length 1 is \({-1}\).
Exercises
1.★ Write \({-1 + i}\) in polar form, and use it to find \({(-1 + i)^4}\). Check by algebra.
Show solution
The length is \({\sqrt{1 + 1} = \sqrt{2}}\), and the point is in the second quarter, at \(\frac{3\pi}{4}\), which is \(135^\circ\). So \({-1 + i = \sqrt{2}\,e^{3i\pi/4}}\). The fourth power has length \({(\sqrt{2})^4 = 4}\) and angle \(3\pi\), which is one whole turn and a half turn more. So \({(-1 + i)^4 = -4}\). By algebra: \({(-1 + i)^2 = 1 - 2i + i^2 = -2i}\), and \({(-2i)^2 = 4i^2 = -4}\).
2.★★ Use the formulas proved in Step 4 with \({\alpha = 120^\circ}\) and \({\beta = 150^\circ}\) to find \(\cos 270^\circ\) and \(\sin 270^\circ\). Why could lesson M01.5.4’s picture not do this?
Show solution
The values needed are \({\cos 120^\circ = -\frac{1}{2}}\), \({\sin 120^\circ = \frac{\sqrt{3}}{2}}\), \({\cos 150^\circ = -\frac{\sqrt{3}}{2}}\) and \({\sin 150^\circ = \frac{1}{2}}\). Then
The point at \(270^\circ\) is \({(0, -1)}\), which is \({-i}\), as the figure in Step 4 shows. M01.5.4’s picture stacks two right triangles, so it needs both angles positive and their sum below \(90^\circ\).
3.★★★ Show with the angle-addition formula that \({A\sin(t + \phi) = p\sin t + q\cos t}\), where \({p + qi = Ae^{i\phi}}\). Then write the wave \({3\sin t + 4\cos t}\) as a single sine wave.
Show solution
By the formula for \({\sin(\alpha + \beta)}\) with \({\alpha = t}\) and \({\beta = \phi}\),
And \({Ae^{i\phi} = A\cos\phi + iA\sin\phi}\), so \({p = A\cos\phi}\) and \({q = A\sin\phi}\), as claimed. For \({3\sin t + 4\cos t}\) we need \({p + qi = 3 + 4i}\), which is \(5e^{i\theta}\) with \(\theta\) the angle of \({3 + 4i}\), about 0.9273. So the wave is \({5\sin(t + \theta)}\), about \({5\sin(t + 0.9273)}\): amplitude 5 and phase \(\theta\), the modulus and the argument of \({3 + 4i}\). Check at \({t = 0}\): \({5\sin\theta = 5 \times 0.8 = 4}\), and \({3\sin 0 + 4\cos 0 = 4}\).
Summary card
A complex number is a length times a direction: \({z = re^{i\theta}}\).
M01.9.3-F1
Length times direction.
Polar form: \({z = r(\cos\theta + i\sin\theta)} = {re^{i\theta}}\), with \({r = \abs{z}}\) and \({\theta = \arg z}\).
Euler’s formula: \({e^{i\theta} = \cos\theta + i\sin\theta}\), so \({e^{i\alpha}e^{i\beta}} = {e^{i(\alpha + \beta)}}\) and \({e^{i\pi} = -1}\).
The angle-addition formulas are the two parts of \(e^{i\alpha}e^{i\beta}\), multiplied out.
Sources and next steps
Sources. Each was opened and checked against this lesson on 12 November 2026.
Jay Abramson and others, Algebra and Trigonometry 2e, Section 10.5 Polar Form of Complex Numbers, OpenStax. The polar form \({r(\cos\theta + i\sin\theta)}\) with \(r\) the modulus and \(\theta\) the argument; the product “calls for multiplying the moduli and adding the angles”; and De Moivre’s theorem, \({z^n = r^n(\cos n\theta + i\sin n\theta)}\) for a positive whole number \(n\). The section stops before Euler’s formula.
Matthias Beck, Gerald Marchesi, Dennis Pixton and Lucas Sabalka, A First Course in Complex Analysis, edition 1.6, Section 1.2. Defines \(e^{i\phi}\) as \({\cos\phi + i\sin\phi}\) and calls it, at that point, “purely a notation”; Proposition 1.2.7 lists \({e^{i\phi_1}e^{i\phi_2}} = {e^{i(\phi_1 + \phi_2)}}\), \({e^{i0} = 1}\), \({1/e^{i\phi} = e^{-i\phi}}\) and that the length of \(e^{i\phi}\) is 1; the polar form \({x + iy = re^{i\phi}}\); and arguments that differ by whole multiples of \(2\pi\).
Python Software Foundation, cmath, Python 3.12 documentation. phase(z) is math.atan2(z.imag, z.real), between \({-\pi}\) and \(\pi\); polar(z) is (abs(z), phase(z)); rect(r, phi) is complex(r * math.cos(phi), r * math.sin(phi)); exp raises \(e\) to a complex power; isclose uses a relative tolerance of \({10^{-9}}\) by default.
NumPy reference, numpy.exp, version 2.5, Notes: for \({x = a + ib}\), \({e^x = e^a\,e^{ib}}\), where \(e^{ib}\) is \({\cos b + i\sin b}\), “a function with magnitude 1 and a periodic phase”.