Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


Matrix Formulation of the DFT

The DFT can be formulated as a complex matrix multiply, as we show in this section. (This section can be omitted without affecting what follows.) For basic definitions regarding matrices, see Appendix H.

The DFT consists of inner products of the input signal $ \underline{x}$ with sampled complex sinusoidal sections $ \underline{s}_k$ :

$\displaystyle X(\omega_k) \isdef \left<\underline{x},\underline{s}_k\right> \isdef \sum_{n=0}^{N-1}\underline{x}(n) e^{-j 2\pi n k/N},
\quad k=0,1,2,\ldots,N-1
$

By collecting the DFT output samples into a column vector, we have

$\displaystyle \underbrace{
\left[\begin{array}{c}
X(\omega_0) \\
X(\omega_1) \\
X(\omega_2) \\
\vdots \\
X(\omega_{N-1})
\end{array}\right]
}_{\displaystyle\underline{X}}
=
\underbrace{
\left[\begin{array}{cccc}
\overline{s_0(0)} & \overline{s_0(1)} & \cdots & \overline{s_0(N-1)} \\
\overline{s_1(0)} & \overline{s_1(1)} & \cdots & \overline{s_1(N-1)} \\
\overline{s_2(0)} & \overline{s_2(1)} & \cdots & \overline{s_2(N-1)} \\
\vdots & \vdots & \vdots & \vdots \\
\overline{s_{N-1}(0)} & \overline{s_{N-1}(1)} & \cdots & \overline{s_{N-1}(N-1)}
\end{array}\right]
}_{\displaystyle\mathbf{S}^\ast_N}
\underbrace{
\left[\begin{array}{c}
x(0) \\
x(1) \\
x(2) \\
\vdots \\
x(N-1)
\end{array}\right]
}_{\displaystyle\underline{x}}
$

or

$\displaystyle \underline{X}= \mathbf{S}^\ast_N \underline{x}
= \left[\begin{array}{c} \underline{s}_0^\ast \\ [2pt] \vdots \\ [2pt] \underline{s}_{N-1}^\ast\end{array}\right]\underline{x}
= \left[\begin{array}{c} \left<\underline{x},\underline{s}_0\right> \\ [2pt] \vdots \\ [2pt] \left<\underline{x},\underline{s}_{N-1}\right>\end{array}\right]
$

where $ \mathbf{S}^\ast_N$ denotes the DFT matrix $ \mathbf{S}^\ast_N[k,n]\isdef W_N^{-kn} \isdef
e^{-j2\pi k n/N}$ , i.e.,

\begin{eqnarray*}
\mathbf{S}^\ast_N
&\!\!\isdef \!\!& \left[\begin{array}{cccc} \underline{s}_0 & \underline{s}_1 & \cdots & \underline{s}_{N-1} \end{array}\right]^\ast\\ [10pt]
&\!\!\isdef \!\!&
\left[\!\begin{array}{cccc}
\overline{s_0(0)} & \overline{s_0(1)} & \cdots & \overline{s_0(N-1)} \\
\overline{s_1(0)} & \overline{s_1(1)} & \cdots & \overline{s_1(N-1)} \\
\overline{s_2(0)} & \overline{s_2(1)} & \cdots & \overline{s_2(N-1)} \\
\vdots & \vdots & \vdots & \vdots \\
\overline{s_{N-1}(0)} & \overline{s_{N-1}(1)} & \cdots & \overline{s_{N-1}(N-1)}
\end{array}\!\right] \\ [10pt]
&\!\!\isdef \!\!&
\left[\!\begin{array}{ccccc}
1 & 1 & 1 & \cdots & 1 \\
1 & e^{-j 2\pi/N} & e^{-j 4\pi/N} & \cdots & e^{-j 2\pi (N-1)/N} \\
1 & e^{-j 4\pi/N} & e^{-j 8\pi/N} & \cdots & e^{-j 2\pi 2(N-1)/N} \\
\vdots & \vdots & \vdots & \vdots & \vdots \\
1 & e^{-j 2\pi(N-1)/N} & e^{-j 2\pi 2(N-1)/N} & \cdots & e^{-j 2\pi (N-1)(N-1)/N}
\end{array}\!\right].
\end{eqnarray*}

The notation $ A^\ast\isdef \overline{A^{\hbox{\tiny T}}}$ denotes the Hermitian transpose of the complex matrix $ A$ (transposition and complex conjugation).

Note that the $ k$ th column of $ \mathbf{S}_N$ is the $ k$ th DFT sinusoid, so that the $ k$ th row of the DFT matrix $ \mathbf{S}^\ast_N$ is the complex-conjugate of the $ k$ th DFT sinusoid. Therefore, multiplying the DFT matrix times a signal vector $ \underline{x}$ produces a column-vector $ \underline{X}=\mathbf{S}^\ast_N\underline{x}$ in which the $ k$ th element $ \underline{X}[k]$ is the inner product of the $ k$ th DFT sinusoid with $ \underline{x}$ , or $ \underline{X}[k]=\underline{s}^\ast_k\underline{x}
= \left<\underline{x},s_k\right>$ , as expected.

Computation of the DFT matrix in Matlab is illustrated in §I.4.3.

The inverse DFT matrix is simply $ \mathbf{S}_N/N$ . That is, we can perform the inverse DFT operation as

$\displaystyle \underline{x}= \frac{1}{N} \mathbf{S}_N \underline{X}. \protect$ (6.2)

Since the forward DFT is $ \underline{X}=\mathbf{S}^\ast_N\underline{x}$ , substituting $ \underline{x}$ from Eq.(6.2) into the forward DFT leads quickly to the conclusion that

$\displaystyle \mathbf{S}^\ast_N \mathbf{S}_N = N\cdot \mathbf{I}. \protect$ (6.3)

This equation succinctly states that the columns of $ \mathbf{S}_N$ are orthogonal, which, of course, we already knew. I.e., $ \left<\underline{s}_k,\underline{s}_n\right>=0$ for $ k\ne n$ , and $ \left<\underline{s}_k,\underline{s}_k\right>=N$ :

\begin{eqnarray*}
\mathbf{S}^\ast_N \mathbf{S}_N
&\!\!=\!\!&
\left[\!\begin{array}{ccccc}
\left<\underline{s}_0,\underline{s}_0\right> & \left<\underline{s}_0,\underline{s}_1\right> & \cdots & \left<\underline{s}_0,\underline{s}_{N-1}\right> \\
\left<\underline{s}_1,\underline{s}_0\right> & \left<\underline{s}_1,\underline{s}_1\right> & \cdots & \left<\underline{s}_1,\underline{s}_{N-1}\right> \\
\left<\underline{s}_2,\underline{s}_0\right> & \left<\underline{s}_2,\underline{s}_1\right> & \cdots & \left<\underline{s}_2,\underline{s}_{N-1}\right> \\
\vdots & \vdots & \vdots & \vdots \\
\left<\underline{s}_{N-1},\underline{s}_0\right> & \left<\underline{s}_{N-1},\underline{s}_1\right> & \cdots & \left<\underline{s}_{N-1},\underline{s}_{N-1}\right>
\end{array}\!\right] \\ [5pt]
&\!\!=\!\!&
\left[\!\begin{array}{cccccc}
N & 0 & 0 & \cdots & 0 \\
0 & N & 0 & \cdots & 0 \\
0 & 0 & N & \cdots & 0 \\
\vdots & \vdots & \vdots & \vdots & \vdots \\
0 & 0 & 0 & \cdots & N
\end{array}\!\right]
= N\cdot \mathbf{I}.
\end{eqnarray*}

The normalized DFT matrix is given by

$\displaystyle \tilde{\mathbf{S}}^\ast_{N} \isdef \frac{1}{\sqrt{N}} \mathbf{S}^\ast_{N}
$

and the corresponding normalized inverse DFT matrix is simply $ \tilde{\mathbf{S}}_N$ , so that Eq.(6.3) becomes

$\displaystyle \tilde{\mathbf{S}}^\ast_N \tilde{\mathbf{S}}_N = \mathbf{I}.
$

This implies that the columns of $ \tilde{\mathbf{S}}_N$ are orthonormal. Such a complex matrix is said to be unitary.

When a real matrix $ \mathbf{Q}$ satisfies $ \mathbf{Q}^{\!\hbox{\tiny T}}\mathbf{Q}= \mathbf{I}$ , then $ \mathbf{Q}$ is said to be orthogonal. ``Unitary'' is the generalization of ``orthogonal'' to complex matrices.


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Mathematics of the Discrete Fourier Transform (DFT), with Audio Applications --- Second Edition'', by Julius O. Smith III, W3K Publishing, 2007, ISBN 978-0-9745607-4-8
Copyright © 2024-04-02 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA