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"?

