# How does summation over time samples influences DFT?

In case of DFT where we have following $$Y_{k}=\frac{1}{N}\sum_{n=0}^{N-1}y_ne^{-j{\frac{2\pi nk}{N}}}$$

• What happens in case when we change summation, e.g., increase or decrease number of $n$ that we are summation over?
• How does the rest of equation change? For example if we decide to sum over $NM$ (if $M<1$ we have windowing and if $M>1$ we have zero padding so I do not assume adding any new info data just scaling the duration of the signal) samples would we rewrite the latter equation like this $$Y_{k}=\sum_{n=0}^{MN-1}y_ne^{-j{\frac{2\pi nk}{MN}}}\tag{1}$$ or this $$Y_{k}=\sum_{n=0}^{MN-1}y_ne^{-j{\frac{2\pi nk}{N}}}\quad \tag{2}$$
• And what is the explanation behind. Also what is the appropriate scaling when summation limits change?

If the length of your data is $NM$ long (regardless of $N$), your DFT should be $NM$ long, so the correct equation is (1).
You may want to define: $$y'_n = \left \{ \begin{array}{cl} y_n, & 0 \le n \le N-1\\ 0, & n \ge N\\ \end{array} \right .$$ and operate on that because $y_n$ for $n\ge N$ is not defined.
• And what is then approporiate scaling-$\frac{1}{MN}$ or $\frac{1}{N}$? For example if I zeropadd my signal would I scale then over all samples (where part of them are essentially zero),i.e.,$\frac{1}{MN}$ or just over ones which are actually representing data ,i.e., $\frac{1}{N}$? – Cali Jul 14 '16 at 7:49
• The scalings are a matter of choice. I'd go with $\frac{1}{MN}$, but some forms of the DFT and its inverse prefer $\frac{1}{\sqrt{MN}}$ on both the forward and inverse transforms. – Peter K. Jul 14 '16 at 12:07
• But if I scale with $\frac{1}{MN}$ that means that amplitude of zeropadded signal would be different compared to original signal? If I am adding zeros why would my amplitude change? – Cali Jul 14 '16 at 12:38