# Can the magnitude of DFT of a triangular wave be max for at 0?

I'm taking an online class on Signal Processing, and one of the slides of from the class shows the magnitude of DFT for a simple triangular wave to have the maximum at 0.

How can this be possible? This means it only has presences of the component form a sine wave with frequency 0 right?

Well, that's not the only non-zero coefficient. I can see other wobbles to the left and right of it. If ONLY the 0 frequency component had a non-zero magnitude, then I'd be worried. But there are other non-zero components.

What you see in the red graph is not an impulse ($\delta$) at zero frequency (in such case we would have a constant zero frequency which is equivalent to a constant dc signal $x[n]=c$).

What you see is actually a squared $\mathrm{sinc}$ function. You can easily verify that the frequency representation of a triangular function (both in continuous and discrete time) is in the form of $\mathrm{sinc}^2$. Look at here, for instance for the continuous triangular signal to see that

$$\mathcal{F}\{\mathrm{tri}(t)\}=\mathrm{sinc}^2(f)$$

and $\mathrm{sinc}$ has a maximum at zero.