I have been reading chapter 8 - The Discrete Fourier Transform of the book The Scientist and Engineer's Guide to Digital Signal Processing and chapter 12 - Discrete Fourier transform of the book Continuous and Discrete Time Signals and Systems. I'm not sure if I have understood real DFT properly.
From what I understood, in real DFT, if the samples in time domain have size $N$, then the output is consist of $\frac{N}{2} + 1$ complex number. Denote the output as X[ ], then Re X[ ] (real part of the complex numbers) is a list of amplitudes of cosine wave, and Im X[ ] (imaginary part of the complex numbers) is a list of amplitudes of sine wave. As is illustrated in the image:
And all of these waves have phase equal to $0$.
Yet if we use the forward DFT formula $$ X[r] = {\sum}_{k=0}^{N-1} x[k]e^{-j(2 \pi k r / M)} $$ to compute ($M$ is usually considered to be equal to $N$), the output is a sequence consisting of $N$ complex numbers, for a input sample with size $N$. And each of those complex numbers represents a frequency component. Denote a complex number in the list as $a + bi$.
Is it the case that the frequency components have amplitude $A = \sqrt{a^2 + b^2}$, phase $\varphi = \arccos{(\frac{a}{A})}$ and they are shifted sine waves?