MathsAlgebra

Complex Number
calculator.

Work in a + bi or polar form, with arithmetic, powers, logs and every root of z.

How it's worked out

A complex number a+bia + bi has a real part a and an imaginary part b, where i2=−1i^2 = -1. To add or subtract, treat the two parts separately. To multiply, expand the brackets and swap i2i^2 for −1.

(a+bi)(c+di)\displaystyle (a + bi)(c + di)=(ac−bd)+(ad+bc)i\displaystyle {}= (ac - bd) + (ad + bc)i

Division multiplies top and bottom by the conjugate of the bottom, c−dic - di, which leaves a plain number below the line. So 3+4i1+2i\frac{3 + 4i}{1 + 2i} comes out as 115−25i\frac{11}{5} - \frac{2}{5}i. Exact fractions like these appear when all the parts are whole numbers.

a+bic+di\displaystyle \frac{a + bi}{c + di}=(ac+bd)+(bc−ad)ic2+d2\displaystyle {}= \frac{(ac + bd) + (bc - ad)i}{c^2 + d^2}

Polar form gives the same number as a size and an angle. OpenStax calls these the modulus r and the argument θ. Here multiplying takes the product of the sizes and the sum of the angles, while division divides sizes and subtracts angles.

r\displaystyle r=a2+b2\displaystyle {}= \sqrt{a^2 + b^2}
z\displaystyle z=r(cos⁡θ+isin⁡θ)\displaystyle {}= r(\cos\theta + i\sin\theta)

Powers and roots are short in this form. De Moivre's theorem raises the size to the power and multiplies the angle by it. OpenStax works (1+i)5(1 + i)^5 this way and gets −4−4i-4 - 4i. Whole powers here use repeated multiplication, so whole inputs stay exact.

zn\displaystyle z^n=rn(cos⁡nθ+isin⁡nθ)\displaystyle {}= r^n(\cos n\theta + i\sin n\theta)

A number other than 0 has n different nth roots. They share one size, the nth root of r, and their angles sit evenly around the circle.

θk\displaystyle \theta_k=θ+360∘kn\displaystyle {}= \frac{\theta + 360^\circ k}{n}

Worked examples

Mia checks a product from her homework

Mia multiplies (3+4i)(1−2i)(3 + 4i)(1 - 2i). The real part is 3 − (−8), and the imaginary part is −6 + 4, so the answer is 11−2i11 - 2i.

To check, she compares sizes. 3+4i3 + 4i has size 5 and 1−2i1 - 2i has size 2.2361, and their product is 11.1803, the size of her answer. The angles add to −10.3° as well, so the two routes agree.

Open this example in the tool

Sam lists the cube roots of 8

Everyone knows 2 is a cube root of 8, but Sam's course wants all three. The size of 8 is 8, and its angle is 0°. The cube root of the size is 2, and the angles are 0°, 120°, 240°.

The roots are 22, −1+1.7321i-1 + 1.7321i, −1−1.7321i-1 - 1.7321i. On the plane they form an equilateral triangle on a circle of radius 2, and the angles are 120° apart.

Open this example in the tool

Theo adds a resistor and an inductor in series

A 100 Ω resistor is in series with a 0.5 H inductor at 60 Hz. The inductor's reactance is ωL, which is about 188.5 Ω. Engineers treat it as an imaginary part, so the total is 100+188.5i100 + 188.5i.

The size, about 213.4 Ω, is the impedance. The angle, about 62.1°, is how far the voltage leads the current. Both match the book's formula for a circuit with no capacitor.

Open this example in the tool

Reading your result

Multiplying by i is a quarter turn. Powers of i repeat every four: 1, i, −1, −i, 1. So for any whole power, you only need the remainder after dividing by 4.

Logs and fractional powers have many values. Adding a full turn lands on the same point, so a log can be any of an endless list. This tool gives the principal value, which uses the angle from −π to π, and the steps show how the next one differs. The roots operations list every root instead.

Read small numbers as rounding. Parts far smaller than the other part show as 0. That is why eiπe^{i\pi} reads as −1 rather than carrying a tiny leftover. The exponential always reads its imaginary part in radians, whichever angle setting you pick.

A few numbers in both forms
a + biSize rAngle
1 + i1.414245°
2i290°
−3 + 4i5126.87°
5 − 12i13−67.38°

Common mistakes

  • Trusting a plain arctangent. For −1−i-1 - i, the ratio b over a is 1, and arctangent gives 45°. The point is in the lower left, so its angle is −135°. Sketch the point first.
  • Expecting a real cube root from a fractional power. The principal value of −8 to the power one third is 1+1.732i1 + 1.732i, not −2. To get −2, list all the roots.
  • Leaving out the i squared. The term bdi2bd\,i^2 turns into a minus sign. That is why the real part is ac−bdac - bd, with a minus where you might expect a plus.
  • Multiplying by the number, not its conjugate. When you divide, the bottom only turns real if you use c−dic - di.

Questions people ask

Multiply the top and bottom by the conjugate of the bottom, which is the same number with the sign of its i part flipped. That leaves a real number below the line, so you can split the fraction. For 2 + 5i over 8 + 3i the parts are 31 over 73 and 34 over 73.

Sources