I'm trying to match the amplitudes of a signal before performing DFT and after. So, let's consider a 64-point sine signal with amplitude of $1$:
The DFT of such a signal will give us the amplitude (corresponding to the original signal frequency) equal to $32$, which comes from the DFT formula:
$$X[k]=\sum_{n=0}^{N-1} x[n] \Big(\cos\left(\tfrac{2\pi k}{N}n\right)-j\sin\left(\tfrac{2\pi k}{N}n\right) \Big)$$
Since the signal is a sine, the cosine part under the DFT can be omitted (because multiplication of sine and cosine with the same argument is always zero). Therefore, the DFT (at signal frequency) of the signal can be calculated as the sum of all the points of the original signal multiplied by the basis sine function with the same frequency (supposing that the frequency of the original signal matches with the DFT basis function), which is:
Finally, the numerical result of DFT for our signal (at its frequency) is the result of multiplication of the mean value of the original signal multiplied by the basis function (here it is $0.5$, see Figure above, which is EXACTLY HALF the amplitude of our original signal) and the number of points in the signal ($64$): $$0.5\cdot64=32$$
To unambiguously match this amplitude after DFT and before (which is the original signal), we need to divide the result amplitude by the number of points in the original signal and by a factor of $2$ (because exactly half the amplitude of the original signal was gradually incremented by the number of points in the original signal).
Is it just pure math and nothing else? In some books I saw the explanation with the bandwidth, but it wasn't clear and straightforward for me.