What is a complex number?
A complex number has two parts: a real part and an imaginary part, written as a + bi. The real part is an ordinary number, and the imaginary part is a multiple of i, which is defined as the square root of −1. The number 3 + 4i has a real part of 3 and an imaginary part of 4, and it lives on a two-dimensional plane instead of on a number line.
Complex numbers were invented because some equations have no real answer. The equation x² + 1 = 0 has no solution among real numbers, since no real number squared gives −1, but it has two complex solutions, i and −i. Once mathematicians accepted i as a number, a whole new arithmetic opened up, and it turned out to be essential for electrical engineering, signal processing and quantum mechanics.
This calculator adds, subtracts, multiplies and divides complex numbers, and shows the magnitude and the conjugate of the result. Type the real and imaginary parts of two numbers, pick an operation, and the answer appears instantly, in the same a + bi form you would write by hand.
How complex number arithmetic works
Addition and subtraction are the easy operations: combine the real parts together and the imaginary parts together. Adding 3 + 4i and 1 + 2i gives 4 + 6i, because 3 + 1 is 4 and 4 + 2 is 6. Subtraction works the same way: 3 + 4i minus 1 + 2i is 2 + 2i. The two parts never mix, which is why a complex number needs two numbers to describe it.
Multiplication uses the rule that i² = −1. Multiplying 3 + 4i by 1 + 2i gives 3 + 6i + 4i + 8i², and since 8i² is −8, the result is −5 + 10i. The real part comes from ac − bd and the imaginary part from ad + bc, which is the formula in the box above. Division is the trickiest operation: multiply the top and bottom by the conjugate of the divisor, which turns the bottom into a real number.
Dividing 3 + 4i by 1 + 2i gives 2.2 − 0.4i. The working is (3 + 4i)(1 − 2i) divided by (1 + 2i)(1 − 2i), which is (11 − 2i) divided by 5. A quadratic equation calculator shows where complex numbers first appear in school maths, when a quadratic has a negative discriminant.
Magnitude and conjugate explained
The magnitude, or modulus, of a complex number is its distance from zero on the complex plane, found with Pythagoras: the square root of the real part squared plus the imaginary part squared. The magnitude of 4 + 6i is the square root of 16 + 36, which is the square root of 52, or about 7.21. The magnitude is always a real, non-negative number, and it tells you the size of the number regardless of its direction.
The conjugate of a + bi is a − bi, the same number with the imaginary part flipped. The conjugate of 4 + 6i is 4 − 6i. Conjugates are useful because multiplying a number by its conjugate always gives a real number: (4 + 6i)(4 − 6i) is 16 + 36, or 52, which is the magnitude squared. That is the trick that makes division work.
Engineers use magnitude and conjugate constantly. In alternating current circuits, the magnitude of the impedance tells you how much the circuit resists the current, and the conjugate is used to match impedances for maximum power transfer. A scientific calculator can check a magnitude by hand with its square root key.
A worked example: adding, multiplying and dividing
Start with 3 + 4i and 1 + 2i. Adding them gives 4 + 6i, with a magnitude of 7.21 and a conjugate of 4 − 6i. Subtracting gives 2 + 2i, with a magnitude of 2.83. These two operations are just bookkeeping on the two parts, and they are the ones students meet first.
Multiplying gives −5 + 10i, with a magnitude of 11.18. Notice that the magnitude of the product equals the product of the magnitudes: the magnitude of 3 + 4i is 5, the magnitude of 1 + 2i is about 2.24, and 5 times 2.24 is 11.18. That is a general rule, and it is a good way to check a multiplication by hand.
Dividing gives 2.2 − 0.4i, with a magnitude of 2.24. Here the magnitude of the answer equals the first magnitude divided by the second: 5 divided by 2.24 is 2.24, allowing for rounding. If your division answer has a very different magnitude from this ratio, something has gone wrong in the working.
Who uses complex numbers
Electrical engineers use complex numbers every day, because alternating current has both a size and a phase, and a complex number carries both in one symbol. Impedance, the resistance of a circuit to alternating current, is a complex number, and whole circuit problems become simple algebra once they are written this way.
Signal processing engineers use them to analyse sound, images and radio waves, where the Fourier transform turns a signal into complex numbers that describe each frequency. Physicists use them in quantum mechanics, where the wave function itself is complex, and in fluid flow, where complex numbers describe the flow around an aeroplane wing.
Students meet complex numbers in algebra and in the quadratic formula, where a negative discriminant means the roots are complex. A square root calculator shows why the square root of a negative number needs a new kind of number at all.
Control engineers use complex numbers to design systems that stay stable, from thermostats to aeroplane autopilots. The stability of a control system is judged by the positions of poles, which are complex numbers, on the complex plane: poles on the left side mean the system settles down, while poles on the right side mean it runs away. Moving a pole by changing a gain is the engineer's daily work, and it is all complex arithmetic.
Complex numbers vs real numbers
Real numbers live on a line, and every real number is either positive, negative or zero. Complex numbers live on a plane, and they have a direction as well as a size, which is why they need two numbers to describe them. Every real number is also a complex number with an imaginary part of zero, so the complex numbers contain the real numbers rather than replacing them.
Arithmetic with complex numbers follows the same rules as real arithmetic, with one extra rule: i² = −1. Addition, subtraction and multiplication all work as you would expect, and division works once you learn the conjugate trick. The only operation that behaves very differently is ordering: there is no natural way to say that one complex number is bigger than another, because they point in different directions.
For everyday calculations such as money, measurements and counts, real numbers are enough, and a percentage calculator does the job. Complex numbers earn their keep when a problem has two linked quantities, such as size and phase, or when an equation has no real solution.
Common complex number mistakes
The most common mistake is forgetting that i² is −1, not 1, when multiplying. The product (3 + 4i)(1 + 2i) contains 8i², which is −8, and forgetting the minus sign gives 11 + 10i instead of the correct −5 + 10i. Always replace i² with −1 the moment it appears.
Second: dividing by multiplying the top and bottom by the wrong conjugate, or by forgetting to divide both parts by the denominator. The division (3 + 4i) divided by (1 + 2i) gives (11 − 2i) divided by 5, so both parts must be divided by 5, giving 2.2 − 0.4i, not 11 − 2i. Third: confusing the conjugate with the negative. The conjugate of 4 + 6i is 4 − 6i, while the negative is −4 − 6i, and they are different numbers.
Fourth: treating the magnitude as the sum of the parts. The magnitude of 4 + 6i is 7.21, not 10, because the parts combine by Pythagoras, not by addition. Fifth: entering the imaginary part without its sign, which turns 3 − 4i into 3 + 4i and changes every answer that follows.
A sixth mistake is confusing the symbols i and j. Mathematicians write the imaginary unit as i, while electrical engineers write it as j, because i already means current in their equations. The two symbols mean exactly the same thing, and a formula written with j works identically with i. If you copy a formula from an engineering book into a maths class, translate j to i first, or the notation will confuse everyone who reads it.
How to use this complex number calculator
Type the real and imaginary parts of the first number, then the real and imaginary parts of the second number. Pick the operation: add, subtract, multiply or divide. The result, its magnitude and its conjugate update instantly, and you can change any input to see how the answer moves.
To check a division by hand, multiply the answer by the divisor and confirm you get the first number back. To check a multiplication, compare the magnitudes: the magnitude of the product should equal the product of the two magnitudes. If either check fails, re-check the signs of the imaginary parts.
Everything runs in your browser. No sign-up, no account, no data sent anywhere. The calculator rounds results to two decimal places, which is enough for most hand calculations; if you need more precision, work from the exact fractions, such as 11/5 for the real part of the division example above.