See sections: "Example 1 - N even", "Example 2 - N odd" and "Representation in terms of sines and cosines" of www.statlect.com/matrix-algebra/discrete-Fourier-transform-of-a-real-signal
The transform still has complex numbers.
Summary:Therefore, we only need about half of to represent the signal, as the other half can be derived by conjugation.
- is real
"Representation in terms of sines and cosines" from www.statlect.com/matrix-algebra/discrete-Fourier-transform-of-a-real-signal then gives explicit formulas in terms of .
NumPy for example has "Real FFTs" for this: numpy.org/doc/1.24/reference/routines.fft.html#real-ffts