How the Complex Number Calculator works
A complex number is written in rectangular form as a + bi, where a is the real part, b is the imaginary part, and i is the imaginary unit defined by i squared = -1. This calculator takes two complex numbers, z1 = a + bi and z2 = c + di, and performs addition, subtraction, multiplication, or division based on the operation you choose, then reports the result in rectangular form along with its modulus and argument.
The four operations
- Addition (z1 + z2): add the real parts and the imaginary parts separately: (a + c) + (b + d)i.
- Subtraction (z1 - z2): subtract the real parts and the imaginary parts separately: (a - c) + (b - d)i.
- Multiplication (z1 x z2): distribute like binomials (FOIL) and replace i squared with -1: (ac - bd) + (ad + bc)i.
- Division (z1 / z2): multiply the numerator and denominator by the conjugate of z2, which is c - di, so the denominator becomes real: [(ac + bd) + (bc - ad)i] / (c squared + d squared). Division is undefined when z2 = 0 + 0i.
Modulus and argument
Every complex number a + bi can be plotted as the point (a, b) on the complex plane, with the real part on the horizontal axis and the imaginary part on the vertical axis. The modulus |z| = square root of (a squared + b squared) is the distance from that point to the origin, and the argument theta = atan2(b, a) is the angle measured counterclockwise from the positive real axis. Together, r(cos theta + i sin theta) — where r is the modulus — is the polar form of the same number.
Common sources of error
- Sign errors on i squared: the most common multiplication mistake is forgetting that i squared = -1, which flips the sign of the bd term.
- Skipping the conjugate step in division: dividing directly without multiplying by the conjugate leaves i in the denominator, which is not a valid final form.
- Quadrant confusion in the argument: the angle depends on the signs of both a and b, not just their ratio — use atan2 rather than a plain arctangent or you can land in the wrong quadrant.
Checking your result
Verify addition and subtraction by re-adding the real and imaginary parts separately by hand. For multiplication, confirm with the FOIL expansion and check that i squared was replaced with -1. For division, multiply your computed quotient by z2 — you should get back z1. The modulus should never be negative, and the argument should always fall between -180 and 180 degrees.
Applications
Complex numbers describe anything that needs both a magnitude and a direction or phase in a single value: AC circuit analysis (impedance combines resistance and reactance as R + jX), signal processing and Fourier transforms, control systems, and quantum mechanics. In these contexts the modulus often represents a magnitude, such as an amplitude, and the argument represents a phase shift.