Understanding the complex number calculator — concept and principle
A complex number z = a + bi has a real part a and an imaginary part b, where i is the number whose square is −1. This calculator adds, subtracts, multiplies or divides two complex numbers z₁ = a + bi and z₂ = c + di, and also reports the modulus, argument and polar form of z₁. It is used in AC circuit analysis, signal processing and for equations with no real roots.
How it is calculated
- Addition: (a + bi) + (c + di) = (a + c) + (b + d)i.
- Subtraction: (a + bi) − (c + di) = (a − c) + (b − d)i.
- Multiplication: (a + bi)(c + di) = (ac − bd) + (ad + bc)i.
- Division: multiply top and bottom by the conjugate c − di: (a + bi) ÷ (c + di) = [(ac + bd) + (bc − ad)i] ÷ (c² + d²).
- Modulus: |z₁| = √(a² + b²), the distance from the origin.
- Argument: arg z₁ = atan2(b, a), shown in degrees between −180° and 180°.
- Polar form: |z₁| ∠ arg z₁.
The principle
Complex numbers behave like ordinary algebra with one extra rule, i² = −1. Addition works component by component, exactly like adding vectors on a plane. In multiplication the product bi × di = bd·i² = −bd moves into the real part, which is why the real part is ac − bd. Division is made possible by the conjugate: (c + di)(c − di) = c² + d² is a real number, so multiplying numerator and denominator by c − di turns the denominator real. Geometrically, multiplying two complex numbers multiplies their moduli and adds their angles, which is why the polar form is so useful.
Worked example
- Default inputs: z₁ = 3 + 4i, operation +, z₂ = 1 − 2i.
- Real part: 3 + 1 = 4. Imaginary part: 4 + (−2) = 2. Result: 4 + 2i.
- Modulus of z₁: √(3² + 4²) = √25 = 5.
- Argument of z₁: atan2(4, 3) = 53.13010235°.
- Polar form of z₁: 5 ∠ 53.13010235°.
How to read the result
The result is shown as real part plus imaginary part. The modulus tells you the size of z₁ (in an AC circuit, the magnitude of an impedance in ohms); the argument tells you its direction or phase. A positive argument means z₁ lies above the real axis, a negative one below it. If you choose ÷ and z₂ = 0, the result is undefined.
Common mistakes
- Writing (ac + bd) for the real part of a product; the correct sign is minus.
- Dividing real and imaginary parts separately instead of using the conjugate.
- Using arctan(b/a) for the argument, which gives the wrong quadrant when a < 0. atan2 handles all four quadrants.
Frequently asked questions
What is the conjugate of a complex number?
The conjugate of a + bi is a − bi. Multiplying a number by its conjugate gives a² + b², the square of its modulus.
How do I convert the polar form back to a + bi?
Use a = r cos θ and b = r sin θ. For 5 ∠ 53.13°, that gives 5 × 0.6 = 3 and 5 × 0.8 = 4.
Can complex numbers be ordered?
No. You cannot say 3 + 4i > 1 − 2i; compare their moduli instead, here 5 and √5.
Sources: NIST Digital Library of Mathematical Functions, §1.9 Calculus of a Complex Variable (dlmf.nist.gov) · Stewart, J., Calculus: Early Transcendentals, Appendix H: Complex Numbers