DSPRelated.com

Euler's Formula

The most beautiful equation in math

Everything in this course has been building to this moment.

You've seen that sine and cosine come from a point on a circle. You've learned that complex numbers are points on a 2D plane. And you've discovered that multiplying complex numbers rotates them.

Euler's formula is the equation that ties all of this together:

e = cos(θ) + j·sin(θ)

This single equation is the reason DSP works. Let's understand what it actually says.

What It Says

Read it from right to left first: cos(θ) is the real part, sin(θ) is the imaginary part. Together they trace a point on the unit circle in the complex plane.

Now read it from left to right: e is a complex exponential. As θ increases, it moves around the unit circle.

Euler's formula says these are the same thing. The complex exponential e is a point on the unit circle at angle θ.

Try it: Watch the point trace the unit circle as θ increases. The blue line is cos(θ), the real part. The orange line is sin(θ), the imaginary part. Hit the preset buttons to jump to key angles. At θ = π/2, the point is at the top: cos = 0, sin = 1. At θ = π, it's at the left: cos = −1, sin = 0.
Key Insight: e is a compact way to write "a point on the unit circle at angle θ." The real part is cosine, the imaginary part is sine. One notation, three concepts unified.

The Famous Special Case

Set θ = π:

e = cos(π) + j·sin(π) = −1 + 0 = −1

Rearranging:

e + 1 = 0

This is Euler's identity, often called the most beautiful equation in mathematics. It connects five fundamental constants (e, j, π, 1, 0) in one equation. But for DSP, the general formula e = cosθ + j·sinθ is what you'll use every day.

Why It Changes Everything

Before Euler's formula, working with sinusoids meant juggling trig identities. Remember all those formulas from the last lesson? Watch them disappear:

Task With trig With Euler's
Rotate by angle φ cos(θ+φ) = cosθ cosφ − sinθ sinφ ej(θ+φ) = e · e
Multiply signals Product-to-sum identities Just multiply the exponentials
Extract cos from e - cosθ = ½(e + e−jθ)
Extract sin from e - sinθ = 12j(e − e−jθ)

Rotation becomes multiplication. Trig identities become exponent rules. This is why every modern DSP textbook writes signals as complex exponentials, not as sines and cosines.

Extracting Sine and Cosine

By combining e and its conjugate e−jθ, you can isolate sine and cosine:

cos(θ) = 12(e + e−jθ)

sin(θ) = 12j(e − e−jθ)

These are called the inverse Euler formulas. They say that cosine is the average of two spinning arrows (one going counterclockwise, one clockwise), and sine is their difference. You'll see this picture constantly in Fourier analysis. It's why every real sinusoid shows up as two peaks in the frequency spectrum (positive and negative frequency).

Try it: Watch the two arrows spin in opposite directions. Their average (or difference) traces out a pure cosine (or sine) wave on the right. Switch between cos and sin to see both. Notice: the two spinning arrows always combine to give a real-valued result, because the imaginary parts cancel out.
Key Insight: A real cosine wave is actually two complex exponentials spinning in opposite directions. This is not just a mathematical trick. It's the reason the Fourier transform of a real signal has both positive and negative frequencies. Every real sinusoid lives at two frequencies in the complex world.

Deriving Trig Identities (The Easy Way)

Remember the promise from the last lesson? Here's how you can derive the cosine addition formula using nothing but exponent rules:

Start: ej(A+B) = ejA · ejB
Expand left: cos(A+B) + j·sin(A+B)
Expand right: [cosA + j·sinA][cosB + j·sinB]
Multiply out: (cosA·cosB − sinA·sinB) + j(sinA·cosB + cosA·sinB)
Match real parts: cos(A+B) = cosA·cosB − sinA·sinB   ✓
Match imag parts: sin(A+B) = sinA·cosB + cosA·sinB   ✓

Both sum formulas fell out in one step. No memorization needed, just Euler's formula plus FOIL.

The DSP Connection

Here's why this matters so much for signal processing:

  • Signals become exponentials: Instead of A·sin(ωt + φ), we write A·ej(ωt + φ). Simpler algebra.
  • The Fourier transform multiplies by e−jωt: It asks "how much does my signal correlate with a spinning arrow at frequency ω?"
  • Filters multiply in the frequency domain: H(ω) is a complex number at each frequency, and its magnitude scales the signal, its angle shifts the phase. That's it.
  • Phasors: In circuit analysis, a steady-state sinusoid at frequency ω is fully described by its complex amplitude A·e. This turns differential equations into algebra.

The next lesson on Complex Exponentials will put this into motion (literally) by exploring what happens when θ = ωt and the point keeps spinning.

Frequently Asked Questions

What is Euler's formula?

Euler's formula states that e^(jθ) = cos(θ) + j·sin(θ). It connects the exponential function to trigonometry through the imaginary unit j. Geometrically, e^(jθ) is a point on the unit circle at angle θ. The real part is cos(θ) and the imaginary part is sin(θ).

What is Euler's identity?

Euler's identity is e^(jπ) + 1 = 0, obtained by setting θ = π in Euler's formula. It connects five fundamental constants (e, j, π, 1, 0) in a single equation. It means that rotating halfway around the unit circle (by π radians) lands you at -1 on the real axis.

Why is Euler's formula important for signal processing?

Euler's formula lets you write sinusoids as complex exponentials: cos(θ) = ½(e^(jθ) + e^(-jθ)). This converts trigonometric operations (which are messy) into exponential operations (which follow simple algebraic rules). The entire Fourier transform is built on this, decomposing signals into complex exponentials at different frequencies.

Quick Check

Test your understanding of the key concepts from this lesson.