Skip to content
Tutorials Center
My learning

Topics

Lesson 8 of 36 · Complex Numbers and the Plane

Euler's Formula and De Moivre's Theorem

See why e^(iθ) = cos θ + i sin θ, how it gives the compact polar form, Euler's identity and De Moivre's theorem, and use it to derive trigonometric identities.

Euler's formula says that for every real number θ,

Text
e^(iθ) = cos θ + i sin θ

It connects the exponential function with trigonometry, and it lets you write the polar form r(cos θ + i sin θ) as the compact r·e^(iθ). Multiplying such numbers is then just the exponent rule: r₁e^(iθ₁) · r₂e^(iθ₂) = r₁r₂ e^(i(θ₁+θ₂)), which is the "multiply moduli, add arguments" rule from the previous lesson.

Where the formula comes from

For now we treat it as a definition of e^(iθ) that is consistent with everything else, and give a series argument. Recall the power series for real x:

Text
e^x   = 1 + x + x²/2! + x³/3! + x⁴/4! + ...
cos x = 1 - x²/2! + x⁴/4! - ...
sin x = x - x³/3! + x⁵/5! - ...

Replace x with iθ. The powers of i cycle through 1, i, -1, -i, so

Text
e^(iθ) = 1 + iθ - θ²/2! - iθ³/3! + θ⁴/4! + ...
       = (1 - θ²/2! + θ⁴/4! - ...) + i(θ - θ³/3! + θ⁵/5! - ...)
       = cos θ + i sin θ

Rearranging the terms is legitimate because these series converge absolutely everywhere. In the chapter on elementary functions we define e^z for every complex z by its power series, and this calculation becomes a theorem.

Python Euler's formula from the series

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Thirty terms are more than enough for θ = 1.2; the difference printed at the end is at the level of floating-point rounding.

Consequences

Euler's identity. Set θ = π: e^(iπ) = cos π + i sin π = -1, so e^(iπ) + 1 = 0.

The unit circle. Since cos²θ + sin²θ = 1, the number e^(iθ) always has modulus 1, and as θ runs from 0 to 2π it travels once around the unit circle counterclockwise. Also e^(iθ) = e^(i(θ + 2π)), so the function is periodic with period 2π.

Cosine and sine from exponentials. Because the conjugate of e^(iθ) is e^(-iθ), adding and subtracting gives

Text
cos θ = (e^(iθ) + e^(-iθ)) / 2
sin θ = (e^(iθ) - e^(-iθ)) / (2i)

Useful values. e^(iπ/2) = i, e^(iπ) = -1, e^(3iπ/2) = -i, e^(2πi) = 1.

De Moivre's theorem

Raising e^(iθ) to an integer power n just multiplies the exponent: (e^(iθ))ⁿ = e^(inθ). Translated back to cosines and sines:

Text
(cos θ + i sin θ)ⁿ = cos(nθ) + i sin(nθ)

This is De Moivre's theorem. For a general number, (r e^(iθ))ⁿ = rⁿ e^(inθ): the modulus is raised to the power and the angle is multiplied.

Worked example: compute (1 + i)^8. In polar form 1 + i = √2 e^(iπ/4), so (1 + i)^8 = (√2)^8 e^(i·2π) = 16 · 1 = 16.

Deriving trigonometric identities

De Moivre plus the binomial theorem produces multiple-angle formulas without memorization. For n = 3:

Text
(cos θ + i sin θ)³ = cos³θ + 3i cos²θ sin θ - 3 cos θ sin²θ - i sin³θ

Compare real parts: cos 3θ = cos³θ - 3 cos θ sin²θ. Using sin²θ = 1 - cos²θ this becomes cos 3θ = 4cos³θ - 3cos θ. Compare imaginary parts: sin 3θ = 3cos²θ sin θ - sin³θ = 3 sin θ - 4 sin³θ.

Let us have SymPy confirm this and also compute (1 + i)^8 numerically.

Python De Moivre in action

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The two differences should print 0, confirming the triple-angle formulas, and the last line prints 16.

De Moivre's theorem is stated for integer n. For fractional exponents there are several possible values, which is the topic of the next lesson on roots. Do not apply the formula blindly with n = 1/2.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is e^(iπ)?

    e^(iπ) = cos π + i sin π = -1 + 0i = -1.
  2. 2. What is the modulus of e^(iθ) for real θ?

    cos²θ + sin²θ = 1, so e^(iθ) lies on the unit circle.
  3. 3. What does (1 + i)^8 equal?

    1 + i = √2 e^(iπ/4); raised to the 8th power the modulus is 16 and the angle is 2π.
  4. 4. Which formula follows from Euler's formula?

    Adding e^(iθ) = cos θ + i sin θ and e^(-iθ) = cos θ - i sin θ cancels the sines and doubles the cosine.

Summary

  • Euler's formula: e^(iθ) = cos θ + i sin θ, so any nonzero z is r e^(iθ).
  • e^(iθ) runs around the unit circle with period 2π; e^(iπ) = -1.
  • cos θ and sin θ can be written with e^(iθ) and e^(-iθ).
  • De Moivre: (cos θ + i sin θ)ⁿ = cos nθ + i sin nθ for integer n, which produces multiple-angle identities.

Next: Roots of Complex Numbers