LINEAR-ALGEBRA

How a Matrix Cuts Itself in Half: The FFT's Recursive Magic

IKey Formulas

Formula Name Description
wn=e2ฯ€i/nw_n = e^{2\pi i / n} Primitive nn-th root of unity Entries of FnF_n are powers of wnw_n
(wn)2=wn/2(w_n)^2 = w_{n/2} Squaring identity Links FnF_n to Fn/2F_{n/2}
Fn=[IDIโˆ’D][Fn/200Fn/2]PF_n = \begin{bmatrix} I & D \\ I & -D \end{bmatrix} \begin{bmatrix} F_{n/2} & 0 \\ 0 & F_{n/2} \end{bmatrix} P FFT factorization Three-factor split
T(n)=n2logโก2nT(n) = \tfrac{n}{2}\log_2 n FFT cost vs. n2n^2 naive

IISquaring the roots of unity

Squaring each nn-th root doubles its angle, collapsing the nn points onto the n/2n/2-th roots.

๐Ÿ’ก So Fn/2F_{n/2} hides inside FnF_n โ€” the same n/2n/2 roots reappear, which is exactly the smaller transform.

IIINaive cost vs FFT cost

How does n2n^2 compare with n2logโก2n\tfrac{n}{2}\log_2 n as the transform size nn grows?

๐Ÿ’ก The gap widens without bound, so a million-point transform that is hopeless naively runs in real time via the FFT.

IVThe recursion tree

Each split doubles the blocks and halves their size, so every level costs the same n/2n/2.

VQuiz Questions

Question 1

Let w64=e2ฯ€i/64w_{64} = e^{2\pi i / 64} be the primitive 64th root of unity. What does (w64)2(w_{64})^2 equal?

โœ… Correct! Squaring doubles the angle, which halves the order.

โŒ Not quite. Recall: squaring eiฮธe^{i\theta} gives eiโ‹…2ฮธe^{i \cdot 2\theta}. Doubling the angle in 2ฯ€/n2\pi/n form gives 2ฯ€/(n/2)2\pi/(n/2).

Show solution

Solution:

Squaring an exponential doubles the angle: (w64)2=(e2ฯ€i/64)2=e4ฯ€i/64=e2ฯ€i/32=w32.(w_{64})^2 = \left(e^{2\pi i / 64}\right)^2 = e^{4\pi i / 64} = e^{2\pi i / 32} = w_{32}.

This is the linchpin identity of the FFT: (wn)2=wn/2(w_n)^2 = w_{n/2}. It guarantees that Fn/2F_{n/2} is hiding inside FnF_n.

Question 2

For n=1024n = 1024, how many complex multiplications does one application of the FFT factorization (one level of splitting) save compared to the naive n2n^2 method?

Hint: one level costs 2โ‹…(n/2)2+n/22 \cdot (n/2)^2 + n/2 multiplications.

โœ… Correct! One split gives about a 2ร— speedup; the dramatic gains come from applying it recursively.

โŒ Not quite. Compute 2(n/2)2+n/22(n/2)^2 + n/2 vs n2n^2 โ€” the ratio is approximately 1/21/2.

Show solution

Solution:

Naive cost: n2=10242=1,048,576n^2 = 1024^2 = 1{,}048{,}576.

One-step FFT cost: 2โ‹…(n/2)2+n/2=2โ‹…5122+512=524,288+512=524,8002 \cdot (n/2)^2 + n/2 = 2 \cdot 512^2 + 512 = 524{,}288 + 512 = 524{,}800.

That's roughly half the original work โ€” about a 2ร— speedup from a single application of the factorization. The big speedups come from applying the factorization recursively, all the way down.

Question 3

Using the full recursive FFT, how many complex multiplications are needed for n=1024n = 1024?

โœ… Correct! (1024/2)โ‹…logโก2(1024)=512โ‹…10=5,120(1024/2)\cdot \log_2(1024) = 512 \cdot 10 = 5{,}120.

โŒ Not quite. Use the formula (n/2)logโก2n(n/2)\log_2 n with logโก2(1024)=10\log_2(1024) = 10.

Show solution

Solution:

The FFT cost is n2logโก2n\tfrac{n}{2}\log_2 n.

For n=1024n = 1024: 10242โ‹…logโก2(1024)=512โ‹…10=5,120.\frac{1024}{2} \cdot \log_2(1024) = 512 \cdot 10 = 5{,}120.

Compared to the naive n2=1,048,576n^2 = 1{,}048{,}576, this is about a 205ร— speedup.

Question 4

True or False: The FFT computes a different (approximate) transform than the naive matrix-vector product, trading accuracy for speed.

โœ… Correct! The factorization is an exact algebraic identity โ€” same DFT, faster computation.

โŒ Not quite. The FFT is an exact algorithm, not an approximation. It computes the very same DFT.

Show solution

Solution:

The FFT computes exactly the same discrete Fourier transform as the naive method โ€” the same matrix FnF_n, the same output, the same numbers down to floating-point round-off. Only the route changes.

The factorization Fn=[IDIโˆ’D][Fn/200Fn/2]PF_n = \begin{bmatrix} I & D \\ I & -D \end{bmatrix} \begin{bmatrix} F_{n/2} & 0 \\ 0 & F_{n/2} \end{bmatrix} P is an exact algebraic identity, not an approximation. The permutation PP costs zero multiplications (it's pointer arithmetic), so the only floating-point work is in the twiddle multiplies and the recursive sub-FFTs.

Solved: 0 / 4