In applied mathematics, a DFT matrix is an expression of a discrete Fourier transform (DFT) as a transformation matrix, which can be applied to a signal through matrix multiplication. An N-point DFT is expressed as the multiplication X = W x {displaystyle X=Wx} , where x {displaystyle x} is the original input signal, W {displaystyle W} is the N-by-N square DFT matrix, and X {displaystyle X} is the DFT of the signal. The transformation matrix W {displaystyle W} can be defined as W = ( ω j k N ) j , k = 0 , … , N − 1 {displaystyle W=left({frac {omega ^{jk}}{sqrt {N}}} ight)_{j,k=0,ldots ,N-1}} , or equivalently: where ω = e − 2 π i / N {displaystyle omega =e^{-2pi i/N}} is a primitive Nth root of unity in which i 2 = − 1 {displaystyle i^{2}=-1} . We can avoid writing large exponents for ω {displaystyle omega } using the fact that for any exponent x {displaystyle x} we have the identity ω x = ω x mod N . {displaystyle omega ^{x}=omega ^{xmod N}.} 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 ( 1 / N {displaystyle 1/{sqrt {N}}} ) 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 1 / N {displaystyle 1/{sqrt {N}}} choice here makes the resulting DFT 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 O ( N 2 ) {displaystyle O(N^{2})} . Similar techniques can be applied for multiplications by matrices such as Hadamard matrix and the Walsh matrix. The two-point DFT is a simple case, in which the first entry is the DC (sum) and the second entry is the AC (difference).