Operations
(a + bi) + (c + di) = (a + c) + (b + d)i
(a + bi) · (c + di) = (ac − bd) + (ad + bc)i
(a + bi) / (c + di) = ((ac + bd) + (bc − ad)i) / (c² + d²)
|z| = √(a² + b²), arg(z) = atan2(b, a)
Worked example
Multiply z₁ = 3 + 4i by z₂ = 1 + 2i:
- Real part: 3·1 − 4·2 = 3 − 8 = −5
- Imag part: 3·2 + 4·1 = 6 + 4 = 10
- Result: −5 + 10i, with |z| = √125 ≈ 11.180 and θ ≈ 2.034 rad (116.57°).
In polar terms |z₁| = 5, |z₂| = √5, so |z₁·z₂| = 5√5 ≈ 11.180 ✓.
FAQ
Why use atan2 instead of atan(b/a)?
atan(b/a) collapses the four quadrants into two. atan2(b, a) preserves the quadrant correctly, returning a value in (−π, π].
What does division by 0 + 0i return?
"—" — there is no complex division by zero. Multiplication and addition handle any input.