DSPRelated.com

Complex Numbers

Not complicated, just two-dimensional

Complex numbers have a terrible name. "Complex" makes them sound difficult. "Imaginary" makes them sound fake. Neither is true.

A complex number is just a point on a 2D plane. That's it. You already understand 2D coordinates, and complex numbers are the same idea with a couple of superpowers bolted on.

A Point on a Plane

Instead of (x, y), we write a complex number as:

z = a + jb

  • a = the real part (horizontal axis)
  • b = the imaginary part (vertical axis)
  • j = the imaginary unit, where j² = −1

That's all. The "imaginary" axis is just the vertical axis of a 2D plane. Nothing imaginary about it. It's as real as the horizontal axis. Engineers use j instead of i because i already means electric current.

Try it: Drag both sliders around. The blue dashed line is the real part, the orange dashed line is the imaginary part. Together they pinpoint a location on the plane. Notice how the magnitude (length of the arrow) and angle change as you move the point.

Magnitude & Angle

Every complex number can be described two ways:

  • Rectangular: z = a + jb  (how far right, how far up)
  • Polar: z = r∠θ  (how far from the origin, at what angle)

Converting between them is just Pythagoras and basic trig:

r = √(a² + b²)     θ = atan2(b, a)

a = r·cos(θ)     b = r·sin(θ)

Key Insight: The polar form is the connection to circles and rotation. The magnitude r is the radius, and the angle θ is the position on the circle. Sound familiar? It should: it's the same unit circle from Lesson 1, now described with complex numbers.

Multiplication = Rotation

Here's the superpower. When you multiply two complex numbers:

Multiply the magnitudes, add the angles

That means multiplying by a complex number rotates and scales another complex number. This single property is why complex numbers are so powerful in signal processing.

Try it: The blue point z is fixed at 2 + 0j. The orange point w is what you multiply by. Adjust w's angle and magnitude to see the green result z·w move. Set |w| = 1 and sweep the angle, and the result traces a perfect circle. That's pure rotation. Hit Animate to watch it spin continuously.
Key Insight: Multiplying by a complex number with magnitude 1 rotates without stretching. This is exactly what happens when a signal spins around the unit circle, and it's the mathematical foundation of the Fourier transform, which multiplies your signal by spinning complex exponentials to detect frequencies.

Addition: Just Add the Parts

Addition is the easy one: just add real parts and imaginary parts separately:

(a + jb) + (c + jd) = (a+c) + j(b+d)

Geometrically, it's vector addition, the parallelogram rule. In DSP, you add complex numbers when you combine signals. Two signals at the same frequency add to give a single signal whose amplitude and phase depend on how the original signals line up.

The Conjugate

The complex conjugate of z = a + jb is:

z* = a − jb

It's the mirror image across the real axis: same real part, flipped imaginary part. You'll see it everywhere in DSP because:

  • z · z* = a² + b² = |z|²  (gives you the magnitude squared, no square root needed)
  • Frequency spectra of real signals are conjugate-symmetric: X(−f) = X(f)*

Why DSP Uses Complex Numbers

You might think: "Can't we just use regular trig?" You can, but complex numbers are dramatically simpler. Here's why:

  • Rotation is multiplication. Instead of messy trig formulas, rotating a signal is just z · w.
  • Phase and magnitude in one package. A complex number carries both amplitude and phase as a single entity, with no need to track them separately.
  • The Fourier transform is complex. Its output has real and imaginary parts (or equivalently, magnitude and phase). Without complex numbers, you'd need two separate transforms.

In the next lesson, Euler's formula will make this connection explicit: e = cosθ + j·sinθ ties together complex numbers, the unit circle, and sinusoids into one beautiful equation.

Frequently Asked Questions

What is a complex number?

A complex number is a point on a two-dimensional plane. It has a real part (horizontal) and an imaginary part (vertical), written as a + bj. The "imaginary" label is misleading; complex numbers are just as real as regular numbers. They are the natural way to represent anything with both magnitude and direction, like signals with amplitude and phase.

Why does DSP use complex numbers?

Complex numbers unify amplitude and phase into a single quantity. Instead of tracking two separate values (how big and where in the cycle), a complex number captures both. This makes Fourier transforms, filter design, and modulation equations dramatically simpler. Without complex numbers, DSP math would be nearly unworkable.

What is the complex conjugate?

The complex conjugate of a + bj is a - bj: you flip the sign of the imaginary part. Geometrically, it reflects the point across the real axis. Conjugates are used everywhere in DSP: computing signal power (multiply by conjugate), matched filtering, and converting between positive and negative frequencies.

Quick Check

Test your understanding of the key concepts from this lesson.