The answer lies in the meaning of "negative frequency". It couldn't be any other way but $1/N$ and the resulting $1/2$.
Full article: What is the physical significance of negative frequencies? The shortest most relevant part is a visual:
A misconception is, spectrogram discards phase and isn't invertible. The spectrogram is invertible within a global phase shift - that's strong inversion. One might think, if we overlap the right complex pulse with the left one, and get a symmetric |STFT|
, that whether the result is complex-valued depends on the original phases - that is, just like for FFT
, symmetric |FFT|
doesn't guarantee a real-valued signal. One will find, this is false.
The significance is that negative frequency encodes "spin", or direction of complex rotation, which is an independent degree of freedom, and is fundamental and irreducible. The DFT is a decomposition into complex-, not real-valued, bases, which defines the interpretations of all results. A "real-valued" signal is the result of complex rotations being mirrored for all $t$, canceling along the "imaginary" part and combining along the real. Since real-valuedness requires a combination, and all bases are of equal intensity by design, the only possibility is that each such basis is $1/2$ the intensity of the result.
Mathematically, the DFT inverts by summing various $e^{\pm j 2\pi k n/N}$ (with scalings & phase shifts), and we have the well-known identity
$$
\cos(\omega t) = \frac{1}{2} e^{-j\omega t} + \frac{1}{2} e^{j\omega t}
$$
This answer will make more sense after reading the planned followup to what I've linked, which one can be notified of by "Follow"-ing it. It'll also intuitively explain why the general $\cos(\omega t + \phi)$ only changes the phases of cisoids in above equation, but forces conjugate symmetry.
The growth with $N$ reflects growing strength of similarity with the input. That's all the DFT is, a measure of strengths of similarities, and the more samples there are, the more the similarity's been "confirmed". Mathematically, it's a dot product: out[k] = sum(x * basis[k])
. Dividing by $N$ normalizes the result, and makes similarities comparable across different $N$: if $N$ is doubled but the $1/N$ result is same (for a given bin), it implies the only difference is in sample count. Indeed, fft([x, x])
simply inserts a zero between each bin of fft(x)
, for any x
, and doubles existing bins: we have "more of the same", and each bin is twice as large, unless we make length a non-factor.
Additional detail expressed in code, also handling windowing, is provided here - it's relevant but optional reading. The most important is negative frequencies (rather, distinction between positives and negatives, neither being special). Lastly, if the "rotation" stuff sounds unfamiliar, I recommend this excellent video: But what is the Fourier transform? A visual introduction.