# Connections Between Fourier basis and Discrete Fourier Tansform

I need some help to understand discrete Fourier Transform.

Suppose we have a toy daily temperate data.

The Fourier basis expansion can be

$$\begin{bmatrix} 1&\cos 0 & \sin 0 \\ 1&\cos \frac \pi 4 & \sin \frac \pi 4 \\ \cdots & \cdots & \cdots\\ 1&\cos \frac {7\pi} 4 &\sin \frac {7\pi} 4 \end{bmatrix}=\begin{bmatrix} 1&1 & 0 \\ 1&\sqrt 2/2 & \sqrt 2/2 \\ \cdots & \cdots & \cdots\\ 1&\sqrt 2/2 &-\sqrt 2/2 \end{bmatrix}$$

I think I understand this. It is just like polynomial basis expansion, but the basis function is different. And we are essentially fitting the model

$$f(x)=\beta_0+\beta_1 \cos(2\pi x/24)+\beta_2 \sin(2\pi x/24)$$

Note that data matrix $\mathbf X$ is all reall numbers.

But how to understand Discrete Fourier Transform from basis expansion perspective? Where the result is a length $8$ vector with complex numbers?

Can I say, after the expansion, the data matrix $\mathbf X$ becomes a $8 \times 2$ matrix, where I treat the imaginary part as another "feature"?

• the complex exponentials use the properties of complex numbers for making the properties of $\cos$ and $\sin$ explicit from $e^{ix} = \cos(x)+i\sin(x)$, from this you easily get that the $N \times N$ DFT matrix $W_{nk} = e^{-2 i \pi nk/N}$ is unitary (i.e. orthonormal in the complex valued matrices sense). Taking the real and imaginary separately of your signal and of the DFT matrix, you get back the real matrix/transformation you wrote – reuns Jul 25 '16 at 17:21