logo

Discrete Fourier Transform Matrix 📂Fourier Analysis

Discrete Fourier Transform Matrix

Description

The discrete Fourier transform is an adaptation of the Fourier transform for finite-dimensional vectors or digital signals. The definition of the discrete Fourier transform is as follows.

The linear transformation defined as FN:CNCN\mathcal{F}_{N} : \mathbb{C}^{N} \to \mathbb{C}^{N} is called the discrete Fourier transform (DFT).

FN(a)=a^,a^m=n=0N1ei2πmn/Nan(0m<N) \mathcal{F}_{N}(\mathbf{a}) = \hat{\mathbf{a}},\quad \hat{a}_{m}=\sum_{n=0}^{N-1}e^{-i2\pi mn /N} a_{n}\quad (0\le m < N)

Here, a=(a0,a1,,aN1)\mathbf{a} = (a_{0}, a_{1}, \dots, a_{N-1}), a^=(a^0,a^1,,a^N1)CN\hat{\mathbf{a}} = (\hat{a}_{0}, \hat{a}_{1}, \dots, \hat{a}_{N-1}) \in \mathbb{C}^{N} hold.

In other words, this transformation can be represented as a product of a matrix. Let F=[Fij]F = [F_{ij}] be the discrete Fourier transform matrix. Then, according to the definition, FF is represented as follows.

F=[11111ei2π/Nei4π/Nei2(N1)π/N1ei4π/Nei8π/Nei4(N1)π/N1ei2(N1)π/Nei4(N1)π/Nei2(N1)(N1)π/N] F = \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 \\ 1 & e^{-i2\pi/N} & e^{-i4\pi/N} & \cdots & e^{-i2(N-1)\pi/N} \\ 1 & e^{-i4\pi/N} & e^{-i8\pi/N} & \cdots & e^{-i4(N-1)\pi/N} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & e^{-i2(N-1)\pi/N} & e^{-i4(N-1)\pi/N} & \cdots & e^{-i2(N-1)(N-1)\pi/N} \end{bmatrix}

If ω=ei2π/N\omega = e^{-i2\pi/N} is denoted as follows,

F=[11111ωω2ωN11ω2ω4ω2(N1)1ωN1ω2(N1)ω(N1)2] F = \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 \\ 1 & \omega & \omega^2 & \cdots & \omega^{N-1} \\ 1 & \omega^2 & \omega^4 & \cdots & \omega^{2(N-1)} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & \omega^{N-1} & \omega^{2(N-1)} & \cdots & \omega^{(N-1)^{2}} \end{bmatrix}

Therefore, the discrete Fourier transform of the NN-dimensional vector x\mathbf{x} is as follows:

x^=Fx \widehat{\mathbf{x}} = F \mathbf{x}

The inverse transform can be achieved by simply changing the sign according to the definition. If denoted as ω=ei2π/N\overline{\omega} = e^{i2\pi/N},

F1=1N[11111ωω2ωN11ω2ω4ω2(N1)1ωN1ω2(N1)ω(N1)2]=1NF F^{-1} = \dfrac{1}{N} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 \\ 1 & \overline{\omega} & \overline{\omega}^2 & \cdots & \overline{\omega}^{N-1} \\ 1 & \overline{\omega}^2 & \overline{\omega}^4 & \cdots & \overline{\omega}^{2(N-1)} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & \overline{\omega}^{N-1} & \overline{\omega}^{2(N-1)} & \cdots & \overline{\omega}^{(N-1)^{2}} \end{bmatrix} = \dfrac{1}{N} \overline{F}

2D Discrete Fourier Transform

Suppose a 2D N×NN \times N matrix X=[x1x2xN]\mathbf{X} = [\mathbf{x}_{1}\quad \mathbf{x}_{2}\quad \cdots\quad \mathbf{x}_{N}] is given. The 2D discrete Fourier transform involves applying a 1D DFT to each row and column. Applying DFT to each column, by the definition of matrix multiplication, can be expressed as follows. FX F \mathbf{X} To apply the DFT to each row, transpose the rows and columns, which corresponds to a transpose matrix. (FXT)T=XFT (F \mathbf{X}^{\mathsf{T}})^{\mathsf{T}} = \mathbf{X} F^{\mathsf{T}} Therefore, the 2D discrete Fourier transform is as follows: X^=FXFT \widehat{\mathbf{X}} = F \mathbf{X} F^{\mathsf{T}} The inverse transform is as follows: X=1N2FX^FT \mathbf{X} = \dfrac{1}{N^{2}} \overline{F} \widehat{\mathbf{X}} \overline{F}^{\mathsf{T}}

Implementation