This was triggered by the comments in this question.

I'm using this definition of the Shannon-Nyquist theorem (form wikipedia):

If a function x(t) contains no frequencies higher than B hertz, it is completely determined by giving its ordinates at a series of points spaced 1/(2B) seconds apart.

I was under the impression that the Nyquist theorem is theoretically true in the following sense: if you decompose a signal into sinusoids, and then sample at 2x the highest frequency sinusoid, you can perfectly reproduce the original signal. This is because there's only one sinusoidal curve that fits all the samples at or below 1/2 the sampling rate, and if we're considering the highest frequency component in the original signal, it must be a sinusoid (or else it wouldn't be the highest frequency in the signal).

But others commenting on the question linked above said this only applies to continuous signals. One person elaborated on this as follows:

think about continuous signal reconstruction from discrete-time values: in theory, every value between two sample instants requires the sinc sidelobes of all countably infinitely many samples before and after. That's a bit problematic, especially because we don't know the future. Assuming periodic repetition is one of the common tricks to get around that, so that with only a limited amount of past and no future, we can reasonably sinc-interpolate

I don't really understand this - does it mean that what I said above about the Nyquist theorem is not completely true?

  • \$\begingroup\$ Converting to sinusoids via fourier transform is simply one convenient transformation from phase space to frequency space, you are putting too much stock, in my view, into a physical meaning for this in terms of sinusoids. Your example that you begin with, presupposes a known signal with a known maximum frequency component. If this constraint is not there, aliasing would mean there are in fact infinite number of reconstruction to any given sampling. \$\endgroup\$
    – crasic
    Mar 4, 2021 at 13:40
  • \$\begingroup\$ The Shannon/Nyquist limit (sampling at the twice of the signal frequency) applies if the signal is periodic and sinusoidal. Otherwise you could, for example, reconstruct a triangle wave from the sample points. The question about knowing the future is something abstract like the negative frequency \$\endgroup\$ Mar 4, 2021 at 13:42
  • \$\begingroup\$ Consider a phase space compact signal, a square wave is not an infinite number of sine waves, it is a function defined by phase space equation x(0>t>1)=1. The frequency space representation of this is infinitely asymptotic, but that does not mean that a square wave is physically many sine waves as many tend to infer following their first into to fourier, it is a bona fide phase space signal, and using frequency space analysis is useful for understanding filtering and sampling artifacts, but not a useful physical model for the signal in all cases. \$\endgroup\$
    – crasic
    Mar 4, 2021 at 13:45
  • \$\begingroup\$ @crasic yes the whole point is that it has a known maximum frequency component. I added the definition that I'm using to the question. \$\endgroup\$
    – John B
    Mar 4, 2021 at 13:46
  • \$\begingroup\$ @LorenzoMarcantonio no you couldn't reconstruct a triangle for the reason I explained in my question: if the signal you're reconstructing is not a sine wave, then it's not the highest frequency component in the original signal, and therefore you haven't used a high enough sampling rate. \$\endgroup\$
    – John B
    Mar 4, 2021 at 13:47

2 Answers 2


if you decompose a signal into sinusoids, and then sample at 2x the highest frequency sinusoid, you can perfectly reproduce the original signal.

If the signal can be perfectly decomposed into sinusoids, then by definition, the signal is bandlimited to the frequency of the highest one, and Nyquist applies.

This applies whether the signal is continuous or sampled, as long as we keep our assumptions about the sampling consistent.

If we just have a bunch of uniformly taken samples, and no further information, then we don't have enough information to reconstruct a unique signal from which those samples were taken. We need to make an assumption about which alias was being used. Usually, we make the simplest assumption that the first (or should it be zeroth?) alias was sampled, and the signal has frequencies in the range DC to sample_rate/2.

Often, especially with high IF software defined ratios, a higher alias is sampled, and the signal has frequencies from fs/2 to fs, or even fs to 3fs/2.

If you have a perfect triangle wave, or a square wave, then you have frequencies going to infinity, and your 'if I can decompose ...' condition is false. Once bandlimited, a square or triangle wave looks rounded, and maybe gains overshoots, depending on the group delay of the filter used to remove the high frequency components.

  • \$\begingroup\$ Thanks, this is exactly how I understood it. \$\endgroup\$
    – John B
    Mar 4, 2021 at 14:15

Shannon-Nyquist - only for repeating signals?

No. Shannon-Nyquist theorem holds for signals which have no components higher than half the sampling frequency. This does not entail that the signal is "periodic" or "repeating".

For example, this modified "sinc" function:

$$msinc(x) = \frac{sin(\omega x)}{x}$$

is not periodic, but has no frequency components above \$\omega\$ (if I recall correctly).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.