Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 37 · Polynomial and Rational Functions

Complex Numbers and the Fundamental Theorem of Algebra

Learn complex numbers, their arithmetic and conjugates, complex roots of quadratics, and the Fundamental Theorem of Algebra, with runnable Python.

The equation x² + 1 = 0 has no real solution, because a real number squared is never negative. Mathematicians fixed this by inventing a new number, i, defined by i² = -1. With it every polynomial equation gets a full set of solutions. This lesson introduces complex numbers and shows why they complete the story of polynomial zeros.

What is a complex number?

A complex number has the form a + bi, where a and b are real numbers. a is the real part, and b is the imaginary part. Every real number is complex (with b = 0).

Powers of i cycle with period four: i¹ = i, i² = -1, i³ = -i, i⁴ = 1, then repeat. So i²⁷ = i³ = -i, since 27 leaves remainder 3 when divided by 4.

You can plot a + bi as the point (a, b) in the complex plane, with the real axis horizontal and the imaginary axis vertical.

Arithmetic

Treat i like a variable, but replace i² by -1.

  • Add: (3 + 2i) + (1 - 5i) = 4 - 3i.
  • Multiply: (3 + 2i)(1 - 5i) = 3 - 15i + 2i - 10i² = 3 - 13i + 10 = 13 - 13i.

The conjugate of a + bi is a - bi. Multiplying a number by its conjugate gives a real number: (a + bi)(a - bi) = a² + b². This is how you divide:

(2 + i) / (1 - 3i) = (2 + i)(1 + 3i) / ((1 - 3i)(1 + 3i)) = (2 + 6i + i + 3i²) / 10 = (-1 + 7i) / 10.

The modulus |a + bi| = √(a² + b²) is the distance from the origin.

Python writes the imaginary unit as j and supports complex arithmetic natively.

Python Complex arithmetic in Python

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Complex solutions of quadratics

Recall the quadratic formula x = (-b ± √D) / (2a) with D = b² - 4ac. When D < 0, write √D = i√|D| and you get two complex solutions.

Example: x² - 4x + 13 = 0. D = 16 - 52 = -36, so x = (4 ± 6i)/2 = 2 ± 3i.

The two solutions are conjugates of each other. This always happens for polynomials with real coefficients: complex zeros come in conjugate pairs.

Python A quadratic solver that handles complex roots

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The Fundamental Theorem of Algebra

Every non-constant polynomial with complex coefficients has at least one complex zero. Consequently, a polynomial of degree n has exactly n complex zeros, counting multiplicity, and factors completely into n linear factors:

P(x) = aₙ(x - r₁)(x - r₂)···(x - rₙ).

This explains why a cubic always has at least one real zero (the non-real ones come in pairs, and 3 is odd), while a quartic can have none.

Example: x³ - 1 = (x - 1)(x² + x + 1). The quadratic factor has D = -3, giving zeros (-1 ± i√3)/2. Together with 1, that is three zeros for a cubic.

Python All the zeros of a polynomial

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Real zeros are the x-intercepts of the graph. Non-real zeros do not appear on the usual x-y graph at all, but they still count towards the degree.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is (3 + 2i)(1 - 5i)?

    3 - 15i + 2i - 10i² = 3 - 13i + 10 = 13 - 13i.
  2. 2. What is i²⁷?

    Powers of i repeat every 4. 27 leaves remainder 3, and i³ = -i.
  3. 3. A polynomial with real coefficients has the zero 2 + 3i. Which must also be a zero?

    Non-real zeros of real polynomials come in conjugate pairs.
  4. 4. How many complex zeros (with multiplicity) does a degree-5 polynomial have?

    The Fundamental Theorem of Algebra gives exactly n zeros, counting multiplicity.

Summary

  • i² = -1; a complex number is a + bi and plots at (a, b).
  • Multiply as with binomials, replace i² by -1; divide by multiplying by the conjugate.
  • When D < 0, a quadratic has two conjugate complex roots.
  • A degree n polynomial has exactly n complex zeros, counted with multiplicity.

Next: Exponential Functions and Growth