I'm going through a Coursera course on signal processing, and we're just introduced to DFTs. We are told that if you have a complex sinusoidal signal $x[n]$ where $n=0,1...\ N-1$, its DFT is given as $$X[k]=\sum_{n=0}^{N-1} x[n] e^{-j2\pi kn/N}$$ And this makes sense to me. Because $x[n]$ has $N$ samples. You take each one, multiply it with the sample of a basis function, essentially taking the dot product of the signal with the basis function, and you get how much of that frequency is present in the input signal. But we are told that if you have a real sinusoidal signal $y[n]$ where $n=0,1...\ N-1$, then the DFT is given as $$X[k]=\sum_{n=-N/2}^{N/2-1} y[n] e^{-j2\pi kn/N}$$ **My question:** ***Why do we sum over the different values?*** What is the intuition and explanation behind this? I'm not even sure what $y[-N/2]$ would mean. Is the $-N/2^{th}$ sample the same as the $N/2^{th}$ sample because we assume the input signal is periodic? Even if so, why is taking the DFT summation over such a range beneficial? We could also do this for complex sinusoidal signals since they're periodic too right? What's the advantage?