Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
DFT matrix
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Use American English|date = March 2019}} {{Short description|Discrete fourier transform expressed as a matrix}} In applied mathematics, a '''DFT matrix''' is a ''square matrix'' as an expression of a [[discrete Fourier transform]] (DFT) as a [[transformation matrix]], which can be applied to a signal through [[matrix multiplication]]. ==Definition== An ''N''-point DFT is expressed as the multiplication <math>X = W x</math>, where <math>x</math> is the original input signal, <math>W</math> is the ''N''-by-''N'' [[square matrix|square]] DFT matrix, and <math>X</math> is the DFT of the signal. The square matrix ensures the transformation is invertable. The transformation matrix <math>W</math> can be defined as <math>W = \left(\frac{\omega^{jk}}{{\sqrt{N}}}\right)_{j,k=0,\ldots,N-1} </math>, or equivalently: :<math> W = \frac{1}{\sqrt{N}} \begin{bmatrix} 1&1&1&1&\cdots &1 \\ 1&\omega&\omega^2&\omega^3&\cdots&\omega^{N-1} \\ 1&\omega^2&\omega^4&\omega^6&\cdots&\omega^{2(N-1)}\\ 1&\omega^3&\omega^6&\omega^9&\cdots&\omega^{3(N-1)}\\ \vdots&\vdots&\vdots&\vdots&\ddots&\vdots\\ 1&\omega^{N-1}&\omega^{2(N-1)}&\omega^{3(N-1)}&\cdots&\omega^{(N-1)(N-1)} \end{bmatrix} </math>, where <math>\omega = e^{-2\pi i/N}</math> is a [[Root of unity|primitive ''N''th root of unity]] in which <math>i^2=-1</math>. We can avoid writing large exponents for <math>\omega</math> using the fact that for any exponent <math>x</math> we have the identity <math>\omega^{x} = \omega^{x \bmod N}.</math> This is the [[Vandermonde matrix]] for the roots of unity, up to the normalization factor. Note that the normalization factor in front of the sum ( <math>1/\sqrt{N}</math> ) and the sign of the exponent in ω are merely conventions, and differ in some treatments. All of the following discussion applies regardless of the convention, with at most minor adjustments. The only important thing is that the forward and inverse transforms have opposite-sign exponents, and that the product of their normalization factors be 1/''N''. However, the <math>1/\sqrt{N}</math> choice here makes the resulting DFT matrix [[unitary matrix|unitary]], which is convenient in many circumstances. [[Fast Fourier transform]] algorithms utilize the symmetries of the matrix to reduce the time of multiplying a vector by this matrix, from the usual <math>O(N^2)</math>. Similar techniques can be applied for multiplications by matrices such as [[Hadamard matrix]] and the [[Walsh matrix]]. ==Examples== ===Two-point=== The two-point DFT is a simple case, in which the first entry is the [[DC bias|DC]] (sum) and the second entry is the AC (difference). :<math>W= \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix} </math> The first row performs the sum, and the second row performs the difference. The factor of <math>1/\sqrt{2}</math> is to make the transform unitary (see below). ===Four-point=== The four-point clockwise DFT matrix is as follows: :<math> W = \frac{1}{\sqrt{4}} \begin{bmatrix} \omega^0 & \omega^0 &\omega^0 &\omega^0 \\ \omega^0 & \omega^1 &\omega^2 &\omega^3 \\ \omega^0 & \omega^2 &\omega^4 &\omega^6 \\ \omega^0 & \omega^3 &\omega^6 &\omega^9 \\ \end{bmatrix} = \frac{1}{\sqrt{4}} \begin{bmatrix} 1 & 1 & 1 & 1\\ 1 & -i & -1 & i\\ 1 & -1 & 1 & -1\\ 1 & i & -1 & -i\end{bmatrix} </math> where <math>\omega = e^{-\frac{2 \pi i}{4}} = -i</math>. ===Eight-point=== The first non-trivial integer power of two case is for eight points: :<math>W= \frac{1}{\sqrt{8}} \begin{bmatrix} \omega^0 & \omega^0 &\omega^0 &\omega^0 &\omega^0 &\omega^0 &\omega^0 & \omega^0 \\ \omega^0 & \omega^1 &\omega^2 &\omega^3 &\omega^4 &\omega^5 &\omega^6 & \omega^7 \\ \omega^0 & \omega^2 &\omega^4 &\omega^6 &\omega^8 &\omega^{10} &\omega^{12} & \omega^{14} \\ \omega^0 & \omega^3 &\omega^6 &\omega^9 &\omega^{12} &\omega^{15} &\omega^{18} & \omega^{21} \\ \omega^0 & \omega^4 &\omega^8 &\omega^{12} &\omega^{16} &\omega^{20} &\omega^{24} & \omega^{28} \\ \omega^0 & \omega^5 &\omega^{10} &\omega^{15} &\omega^{20} &\omega^{25} &\omega^{30} & \omega^{35} \\ \omega^0 & \omega^6 &\omega^{12} &\omega^{18} &\omega^{24} &\omega^{30} &\omega^{36} & \omega^{42} \\ \omega^0 & \omega^7 &\omega^{14} &\omega^{21} &\omega^{28} &\omega^{35} &\omega^{42} & \omega^{49} \\ \end{bmatrix} = \frac{1}{\sqrt{8}} \begin{bmatrix} 1 &1 &1 &1 &1 &1 &1 &1 \\ 1 &\omega &-i &-i\omega &-1 &-\omega &i &i\omega \\ 1 &-i &-1 &i &1 &-i &-1 &i \\ 1 &-i\omega &i &\omega &-1 &i\omega &-i &-\omega \\ 1 &-1 &1 &-1 &1 &-1 &1 &-1 \\ 1 &-\omega &-i &i\omega &-1 &\omega &i &-i\omega \\ 1 &i &-1 &-i &1 &i &-1 &-i \\ 1 &i\omega &i &-\omega &-1 &-i\omega &-i &\omega \\ \end{bmatrix} </math> where :<math>\omega = e^{-\frac{2 \pi i}{8}} = \frac{1}{\sqrt{2}} - \frac{i}{\sqrt{2}}</math> (Note that <math>\omega^{8 + n} = \omega^{n}</math>.) Evaluating for the value of <math>\omega</math>, gives: <math> W=\frac{1}{\sqrt{8}} \begin{bmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & \frac{1-i}{\sqrt2} & -i & \frac{-1-i}{\sqrt2} & -1 & \frac{-1+i}{\sqrt2} & i & \frac{1+i}{\sqrt2} \\ 1 & -i & -1 & i & 1 & -i & -1 & i \\ 1 & \frac{-1-i}{\sqrt2} & i & \frac{1-i}{\sqrt2} & -1 & \frac{1+i}{\sqrt2} & -i & \frac{-1+i}{\sqrt2} \\ 1 & -1 & 1 & -1 & 1 & -1 & 1 & -1 \\ 1 & \frac{-1+i}{\sqrt2} & -i & \frac{1+i}{\sqrt2} & -1 & \frac{1-i}{\sqrt2} & i & \frac{-1-i}{\sqrt2} \\ 1 & i & -1 & -i & 1 & i & -1 & -i \\ 1 & \frac{1+i}{\sqrt2} & i & \frac{-1+i}{\sqrt2} &-1 & \frac{-1-i}{\sqrt2} & -i & \frac{1-i}{\sqrt2} \\ \end{bmatrix} </math> The following image depicts the DFT as a matrix multiplication, with elements of the matrix depicted by samples of complex exponentials: [[File:Fourierop rows only.svg]] The real part (cosine wave) is denoted by a solid line, and the imaginary part (sine wave) by a dashed line. The top row is all ones (scaled by <math>1/\sqrt{8}</math> for unitarity), so it "measures" the [[DC bias|DC component]] in the input signal. The next row is eight samples of negative one cycle of a complex exponential, i.e., a signal with a [[fractional frequency]] of β1/8, so it "measures" how much "strength" there is at fractional frequency +1/8 in the signal. Recall that a [[matched filter]] compares the signal with a time reversed version of whatever we're looking for, so when we're looking for fracfreq. 1/8 we compare with fracfreq. β1/8 so that is why this row is a [[negative frequency]]. The next row is negative two cycles of a complex exponential, sampled in eight places, so it has a fractional frequency of β1/4, and thus "measures" the extent to which the signal has a fractional frequency of +1/4. The following summarizes how the 8-point DFT works, row by row, in terms of fractional frequency: * 0 measures how much DC is in the signal * β1/8 measures how much of the signal has a fractional frequency of +1/8 * β1/4 measures how much of the signal has a fractional frequency of +1/4 * β3/8 measures how much of the signal has a fractional frequency of +3/8 * β1/2 measures how much of the signal has a fractional frequency of +1/2 * β5/8 measures how much of the signal has a fractional frequency of +5/8 * β3/4 measures how much of the signal has a fractional frequency of +3/4 * β7/8 measures how much of the signal has a fractional frequency of +7/8 Equivalently the last row can be said to have a fractional frequency of +1/8 and thus measure how much of the signal has a fractional frequency of β1/8. In this way, it could be said that the top rows of the matrix "measure" positive frequency content in the signal and the bottom rows measure negative frequency component in the signal. ==Unitary transform== The DFT is (or can be, through appropriate selection of scaling) a unitary transform, i.e., one that preserves energy. The appropriate choice of scaling to achieve unitarity is <math>1/\sqrt{N}</math>, so that the energy in the physical domain will be the same as the energy in the Fourier domain, i.e., to satisfy [[Parseval's theorem]]. (Other, non-unitary, scalings, are also commonly used for computational convenience; e.g., the [[convolution theorem]] takes on a slightly simpler form with the scaling shown in the [[discrete Fourier transform]] article.) ==Other properties== For other properties of the DFT matrix, including its eigenvalues, connection to convolutions, applications, and so on, see the [[discrete Fourier transform]] article. ==A limiting case: The Fourier operator== {{main article|Fourier operator}} {{multiple image | footer = The [[Fourier operator]] | width = 150 | image1 = Fourieropr.png | caption1 = Real part (cosine) | image2 = Fourieropi.png | caption2 = Imaginary part (sine) }} The notion of a Fourier transform is readily [[Generalized Fourier series|generalized]]. One such formal generalization of the ''N''-point DFT can be imagined by taking ''N'' arbitrarily large. In the limit, the rigorous mathematical machinery treats such linear operators as so-called [[Integral transform|integral transforms]]. In this case, if we make a very large matrix with complex exponentials in the rows (i.e., cosine real parts and sine imaginary parts), and increase the resolution without bound, we approach the kernel of the Fredholm integral equation of the 2nd kind, namely the [[Fourier operator]] that defines the continuous Fourier transform. A rectangular portion of this continuous Fourier operator can be displayed as an image, analogous to the DFT matrix, as shown at right, where greyscale pixel value denotes numerical quantity. ==See also== * [[Multidimensional transform]] * [[Generalizations of Pauli matrices#Construction: The clock and shift matrices|Clock and shift matrices]] * [[Chebotarev theorem on roots of unity]] ==References== {{refbegin}} *{{cite book |chapter=2. The Discrete Fourier Transform |chapter-url=https://www.taylorfrancis.com/chapters/mono/10.1201/9781315220529-2/discrete-fourier-transform-kamisetty-ramam-rao-patrick-yip |editor-first=P.C. |editor-last=Yip |editor2-first=K. Ramamohan |editor2-last=Rao |title=The Transform and Data Compression Handbook |publisher=CRC Press |date=2001 |doi=10.1201/9781315220529 |pages= |isbn=978-1-315-22052-9 }} β A treatment of the DFT based largely on the DFT matrix. {{refend}} ==External links== {{commonscat}} * [http://wearcam.org/ece431/course_material/fourierop_and_dit.htm Fourier Operator and Decimation In Time (DIT)] {{Matrix classes}} [[Category:Fourier analysis]] [[Category:Digital signal processing]] [[Category:Matrices (mathematics)]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Commonscat
(
edit
)
Template:Main article
(
edit
)
Template:Matrix classes
(
edit
)
Template:Multiple image
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Short description
(
edit
)
Template:Use American English
(
edit
)