Understanding where the constant $2/N$ comes from in Fourier transformation I'm implementing Fourier transformation in my analysis and I wanted dig a bit deeper on the reasons why the absolute value of Fourier transformation is usually multiplied by the constant $2/N$ to get the peak amplitude value of a sinewave with certain frequency.
In the book Understanding Digital Signal Processing by Lyons, the author states the following relationship between the peak amplitude $A$ of a sinewave and the output magnitude $M_r$ of the discrete Fourier transformation (DFT) for that particular sinewave is:
$$M_r=AN/2,\;\;\;\;\;\; \tag{1}$$
where the $r$ stands for real input values to DFT and $N$ is the number of input values to DFT. From this relationship, I trivially get the amplitude I want to as $A=2M_r/N$, which I see is many times done in many fft-examples in Matlab found throughout the web.
Now my big question was, why is the relationship in $(1)$ true? I started to read more from the book Fourier Analysis and Its Applications by Folland and I found the following in his book (in section about DFT):
$$\widehat{f}\left(\frac{2\pi m}{\Omega}\right)\approx \frac{\Omega}{N}\widehat{a}_m,\;\;\;m=0,1,...,N-1\;\;\;\;\;\;\tag{2}$$
where $\widehat{f}$ is the amplitude function, $\widehat{a}_m$ is the $m^{th}$ output of DFT, $N$ is again the number of inputs and $\Omega$ is the length of the time interval $[0, \Omega]:$
$$\widehat{f}\left(\frac{2\pi m}{\Omega}\right)=\int_0^\Omega e^{-2\pi i m t/\Omega}\;f(t)\;dt,$$
where $f$ is the wave function. Now when I look at $(1)$ and $(2)$, there seems to be a connection between them:
$${\color{red}{\widehat{a}_m}} \approx{\color{blue}{\frac{N}{\Omega}}}{\color{green}{\widehat{f}\left(\frac{2\pi m}{\Omega}\right)}},\;\;\;\;\;\;{\color{red}{M_r}}={\color{blue}{\frac{N}{2}}}{\color{green}{A}}.$$
These two results are almost satisfying but I wondered why it seems to be the case that $\Omega=2$?
My questions: Where does this $2$ come from? Why in Lyons's book there is $2$ instead of $\Omega$?
I thought could it be somehow related to the symmetry of the DFT output? One time unit to left and right: $[-1,1]$ so the length of the interval would be $\Omega=2$? A bit vague this last part but could I be onto something here?
UPDATE:
The definition for DFT in book Understanding Digital Signal Processing is given as:
$$X(m)=\sum_{n=0}^{N-1} x(n) e^{-2\pi i nm/N},$$
where $x(n)$ is some continuous time-domain signal. In the book Fourier Analysis and Its Applications the corresponding definition is:
$$\widehat{a}_m = \sum_{n=0}^{N-1}a_n e^{-2\pi i mn/N}\;\;\;(0\leq m&lt;N),$$
where $a_n = f\left(\frac{n\Omega}{N}\right)$.
The two comes from the fact that a real valued sinusoid is really the average of two complex one.

$$ \cos( \theta ) = \frac{ e^{i \theta} + e^{-i \theta} }{2}  $$

There is the "2" in the denominator.  In the DFT, the other half is located at bin $N-k$, if $k$ is the bin number.

That definition of cosine comes straight from Euler's equation:

$$ e^{i \theta} = \cos( \theta ) + i \sin( \theta ) $$

The $N$ comes straight from the definition of the DFT.  The relationship beteen the amplitude, N, and the magnitude of the DFT bin is why I like to use the $1/N$ normalized form of the the DFT over the more conventional unnormalized form.

I recommend that you read my first blog article The Exponential Nature of the Complex Unit Circle for an understanding of Euler's equation and my blog article DFT Bin Value Formulas for Pure Real Tones for understanding the bin values of a pure tone and what "leakage" really means.  Equation (19) is the answer to your "big question".

The $\Omega$ comes from the continuous FT.  The DFT is the Discrete Fourier Transform.  Too often, they are conflated leaving confusion like yours.  It takes a lot of heavy math to understand the relationship between the two.  The premise of my blog articles is that the DFT can be learned and understood straight from the summation definition without any reference to the continuous case.

Hope this helps.

Ced