MathLive Logo

Complex Number Forms & Conversion

Every complex number can be written three ways: rectangular a + bi, exponential r eiθ and polar r(cos θ + i sin θ). Edit any form below, or drag the point, and the other forms update instantly.

What is a complex number?

No real number squares to −1, so we add one: the imaginary unit i = √−1, with i² = −1. A complex number is z = a + bi, where a and b are real. Re(z) = a is the real part and Im(z) = b is the imaginary part. For z = 3 + 4i, Re(z) = 3 and Im(z) = 4.

Converter

Rectangular: a + bi
Exponential and polar: r eiθ = r ∠ θ
Boxes accept values like sqrt(3), -1/2 or pi/6.
Examples

All three forms

za (real part) b (imaginary part)angle θ
Drag the point to any position.
How the conversion works

The three forms

FormDefinitionExample: 3 + 4i
Rectangular (Cartesian)
Exponential (Euler)
Polar (trigonometric)
Engineering shorthand

Converting

Rectangular → polar: r = √(a² + b²) and θ = atan2(b, a). Polar → rectangular: a = r cos θ and b = r sin θ. Exponential and polar are the same thing written two ways, thanks to Euler's formula eiθ = cos θ + i sin θ.

Why atan2 and not arctan(b/a)?

arctan only returns angles between −90° and 90°, and b/a is the same for 1 + i and −1 − i. atan2(b, a) uses the signs of both parts, so it puts the angle in the right quadrant:

Where z isSignsAngle θ (from the reference angle α = arctan|b/a|)
Quadrant Ia > 0, b > 0θ = α
Quadrant IIa < 0, b > 0θ = 180° − α
Quadrant IIIa < 0, b < 0θ = −(180° − α), or 180° + α in [0°, 360°)
Quadrant IVa > 0, b < 0θ = −α, or 360° − α in [0°, 360°)
On an axisa = 0 or b = 00°, 90°, 180° or −90° (270°); the angle of 0 is undefined

One number, many angles

Adding a full turn does not move the point: r∠θ = r∠(θ + 360°k) for any whole number k. To give each number one answer, MathLive uses the principal argument in (−180°, 180°], i.e. (−π, π]. Switch to [0°, 360°) above if your textbook uses that range.