Part 9: Complex Numbers and the Fourier Matrix
9.1 Complex Numbers x + i y = r e i θ x + iy = re^{i\theta} x + i y = r e i θ : Unit Circle r = 1 r = 1 r = 1
A complex number is z = x + i y z = x + iy z = x + i y where i 2 = − 1 i^2 = -1 i 2 = − 1 .
Polar Form (Euler's formula):
e i θ = cos θ + i sin θ z = r e i θ = r ( cos θ + i sin θ ) e^{i\theta} = \cos\theta + i\sin\theta \\
z = re^{i\theta} = r(\cos\theta + i\sin\theta) e i θ = cos θ + i sin θ z = r e i θ = r ( cos θ + i sin θ )
where r = ∣ z ∣ = x 2 + y 2 r = |z| = \sqrt{x^2 + y^2} r = ∣ z ∣ = x 2 + y 2 is the modulus and θ = arg ( z ) \theta = \arg(z) θ = arg ( z ) is the argument .
Complex Conjugate: z ˉ = x − i y = r e − i θ \bar{z} = x - iy = re^{-i\theta} z ˉ = x − i y = r e − i θ .
Key identity: ∣ z ∣ 2 = z z ˉ = x 2 + y 2 |z|^2 = z \bar{z} = x^2 + y^2 ∣ z ∣ 2 = z z ˉ = x 2 + y 2 .
The unit circle: z = e i θ z = e^{i\theta} z = e i θ has ∣ z ∣ = 1 |z| = 1 ∣ z ∣ = 1 . Points on the unit circle are cos θ + i sin θ \cos\theta + i\sin\theta cos θ + i sin θ .
Roots of Unity: The N N N th roots of 1 are e 2 π i k / N e^{2\pi i k / N} e 2 π ik / N for k = 0 , 1 , … , N − 1 k = 0, 1, \dots, N-1 k = 0 , 1 , … , N − 1 .
9.2 Complex Matrices: Hermitian S = S H S = S^H S = S H and Unitary Q − 1 = Q H Q^{-1} = Q^H Q − 1 = Q H
Complex Vectors in C n \mathbb{C}^n C n :
Inner product: ⟨ z , w ⟩ = z ˉ 1 w 1 + ⋯ + z ˉ n w n = z H w \langle z, w \rangle = \bar{z}_1 w_1 + \cdots + \bar{z}_n w_n = z^H w ⟨ z , w ⟩ = z ˉ 1 w 1 + ⋯ + z ˉ n w n = z H w
Length: ∥ z ∥ 2 = ∣ z 1 ∣ 2 + ⋯ + ∣ z n ∣ 2 = z H z \|z\|^2 = |z_1|^2 + \cdots + |z_n|^2 = z^H z ∥ z ∥ 2 = ∣ z 1 ∣ 2 + ⋯ + ∣ z n ∣ 2 = z H z
Conjugate Transpose (Hermitian): A H = A ˉ T A^H = \bar{A}^T A H = A ˉ T . Also written as A ∗ A^* A ∗ .
Hermitian Matrices: S = S H S = S^H S = S H (i.e., S i j = S ˉ j i S_{ij} = \bar{S}_{ji} S ij = S ˉ j i )
All eigenvalues are real
Eigenvectors for distinct eigenvalues are perpendicular (in the complex sense)
The spectral theorem extends: S = Q Λ Q H S = Q \Lambda Q^H S = Q Λ Q H with Q Q Q unitary
Unitary Matrices: Q − 1 = Q H Q^{-1} = Q^H Q − 1 = Q H (i.e., Q H Q = I Q^H Q = I Q H Q = I )
Columns are orthonormal in the complex inner product
Preserve length: ∥ Q z ∥ = ∥ z ∥ \|Qz\| = \|z\| ∥ Q z ∥ = ∥ z ∥
All eigenvalues satisfy ∣ λ ∣ = 1 |\lambda| = 1 ∣ λ ∣ = 1
Product of unitary matrices is unitary
9.3 Fourier Matrix F F F and the Discrete Fourier Transform
Fourier Matrix F N F_N F N : Size N × N N \times N N × N with entries:
( F N ) j k = w j k where w = e 2 π i / N (F_N)_{jk} = w^{jk} \quad \text{where } w = e^{2\pi i / N} ( F N ) j k = w j k where w = e 2 π i / N
for j , k = 0 , 1 , … , N − 1 j, k = 0, 1, \dots, N-1 j , k = 0 , 1 , … , N − 1 (using zero-based indexing).
Thus:
F N = [ 1 1 1 ⋯ 1 1 w w 2 ⋯ w N − 1 1 w 2 w 4 ⋯ w 2 ( N − 1 ) ⋮ ⋮ ⋮ ⋱ ⋮ 1 w N − 1 w 2 ( N − 1 ) ⋯ w ( N − 1 ) ( N − 1 ) ] F_N = \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 \\ 1 & w & w^2 & \cdots & w^{N-1} \\ 1 & w^2 & w^4 & \cdots & w^{2(N-1)} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & w^{N-1} & w^{2(N-1)} & \cdots & w^{(N-1)(N-1)} \end{bmatrix} F N = 1 1 1 ⋮ 1 1 w w 2 ⋮ w N − 1 1 w 2 w 4 ⋮ w 2 ( N − 1 ) ⋯ ⋯ ⋯ ⋱ ⋯ 1 w N − 1 w 2 ( N − 1 ) ⋮ w ( N − 1 ) ( N − 1 )
Key Properties:
F N F ˉ N = N I , F N − 1 = 1 N F ˉ N , 1 N F N is unitary F_N \bar{F}_N = N I, \quad F_N^{-1} = \frac{1}{N} \bar{F}_N, \quad \frac{1}{\sqrt{N}} F_N \text{ is unitary} F N F ˉ N = N I , F N − 1 = N 1 F ˉ N , N 1 F N is unitary
Discrete Fourier Transform (DFT): Given a signal f = ( f 0 , … , f N − 1 ) f = (f_0, \dots, f_{N-1}) f = ( f 0 , … , f N − 1 ) , its DFT coefficients are:
c = F N − 1 f = 1 N F ˉ N f c = F_N^{-1} f = \frac{1}{N} \bar{F}_N f c = F N − 1 f = N 1 F ˉ N f
Inverse DFT:
f = F N c f = F_N c f = F N c
Each coefficient c k c_k c k represents the amplitude of the frequency component w − k w^{-k} w − k in the signal.
9.4 Cyclic Convolution and the Convolution Rule
Cyclic Convolution: For two vectors a a a and b b b of length N N N , their cyclic convolution a ∗ b a * b a ∗ b is:
( a ∗ b ) k = ∑ j = 0 N − 1 a j b k − j m o d N (a * b)_k = \sum_{j=0}^{N-1} a_j b_{k-j \mod N} ( a ∗ b ) k = j = 0 ∑ N − 1 a j b k − j mod N
Circulant Matrices: A circulant matrix C C C is an N × N N \times N N × N matrix where each row is a cyclic shift of the first row c 0 , c 1 , … , c N − 1 c_0, c_1, \dots, c_{N-1} c 0 , c 1 , … , c N − 1 :
C = [ c 0 c 1 c 2 ⋯ c N − 1 c N − 1 c 0 c 1 ⋯ c N − 2 ⋮ ⋮ ⋮ ⋱ ⋮ c 1 c 2 c 3 ⋯ c 0 ] C = \begin{bmatrix} c_0 & c_1 & c_2 & \cdots & c_{N-1} \\ c_{N-1} & c_0 & c_1 & \cdots & c_{N-2} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ c_1 & c_2 & c_3 & \cdots & c_0 \end{bmatrix} C = c 0 c N − 1 ⋮ c 1 c 1 c 0 ⋮ c 2 c 2 c 1 ⋮ c 3 ⋯ ⋯ ⋱ ⋯ c N − 1 c N − 2 ⋮ c 0
Convolution Rule (Fundamental):
Eigenvectors of every circulant matrix are the columns of the Fourier matrix F N F_N F N
Eigenvalues are the DFT of the first column
Convolution Theorem: Convolution in the time domain equals pointwise multiplication in the frequency domain:
F − 1 ( a ∗ b ) = ( F − 1 a ) ⊙ ( F − 1 b ) or equivalently a ∗ b = F [ ( F − 1 a ) ⊙ ( F − 1 b ) ] F^{-1} (a * b) = (F^{-1} a) \odot (F^{-1} b) \quad \text{or equivalently} \quad a * b = F[(F^{-1} a) \odot (F^{-1} b)] F − 1 ( a ∗ b ) = ( F − 1 a ) ⊙ ( F − 1 b ) or equivalently a ∗ b = F [( F − 1 a ) ⊙ ( F − 1 b )]
where ⊙ \odot ⊙ denotes componentwise (Hadamard) multiplication. This is why the Fourier transform is so powerful for signal processing: it turns expensive convolution into cheap pointwise multiplication.
9.5 FFT: The Fast Fourier Transform
The Fast Fourier Transform (FFT) (Cooley-Tukey algorithm) computes the DFT in O ( N log N ) O(N \log N) O ( N log N ) operations instead of O ( N 2 ) O(N^2) O ( N 2 ) .
Key Idea: Factor F 2 N F_{2N} F 2 N using even and odd permutations:
F 2 N = [ I D I − D ] [ F N 0 0 F N ] [ even-odd permutation ] F_{2N} = \begin{bmatrix} I & D \\ I & -D \end{bmatrix} \begin{bmatrix} F_N & 0 \\ 0 & F_N \end{bmatrix} \begin{bmatrix} \text{even-odd permutation} \end{bmatrix} F 2 N = [ I I D − D ] [ F N 0 0 F N ] [ even-odd permutation ]
where D = diag ( 1 , w , w 2 , … , w N − 1 ) D = \text{diag}(1, w, w^2, \dots, w^{N-1}) D = diag ( 1 , w , w 2 , … , w N − 1 ) for w = e 2 π i / 2 N w = e^{2\pi i / 2N} w = e 2 π i /2 N .
Recursive Splitting:
Instead of one 2 N 2N 2 N -point DFT, compute two N N N -point DFTs, then combine with O ( N ) O(N) O ( N ) additional work
Apply the same recursively: an N N N -point DFT uses two N / 2 N/2 N /2 -point DFTs, etc.
Complexity: For N = 2 10 = 1024 N = 2^{10} = 1024 N = 2 10 = 1024 :
Direct DFT: N 2 ≈ 1 , 000 , 000 N^2 \approx 1,000,000 N 2 ≈ 1 , 000 , 000 operations
FFT: ( N / 2 ) log 2 N ≈ 500 × 10 = 5000 (N/2) \log_2 N \approx 500 \times 10 = 5000 ( N /2 ) log 2 N ≈ 500 × 10 = 5000 operations
Impact: The FFT is one of the most important algorithms of the 20th century. It makes Fourier analysis practical for large-scale signal processing, image compression (JPEG), spectral analysis, and solving partial differential equations.