Nyquist and aliasing, explained, with examples

JimKasson

Community Leader
Forum Moderator
Messages
52,277
Solutions
52
Reaction score
59,062
Location
Monterey, CA, US
I wrote a computer program to generate some sampling examples, and then wrote a post to explain how aliasing works and tie the examples to the theory.


If it's not clear, I will take questions and comments here.

Thanks,

Jim
 
I wrote a computer program to generate some sampling examples, and then wrote a post to explain how aliasing works and tie the examples to the theory.

https://blog.kasson.com/the-last-word/nyquist-and-aliasing-with-examples/

If it's not clear, I will take questions and comments here.

Thanks,

Jim
Very interesting Jim. I assume this (somewhat) explains why they selected 44.1kHz for the CD sampling rate?
Well, yes, but they didn't think through the phase effect of the antialiasing filters they had to use when the passband upper edge and the stopband lower edge were so close to each other. If I remember right, the DAT folks picked 48 KHz, which is much better if you're trying to digitize 20KHz signals properly.
 
I wrote a computer program to generate some sampling examples, and then wrote a post to explain how aliasing works and tie the examples to the theory.

https://blog.kasson.com/the-last-word/nyquist-and-aliasing-with-examples/

If it's not clear, I will take questions and comments here.

Thanks,

Jim
Very interesting Jim. I assume this (somewhat) explains why they selected 44.1kHz for the CD sampling rate?
Well, yes, but they didn't think through the phase effect of the antialiasing filters they had to use when the passband upper edge and the stopband lower edge were so close to each other. If I remember right, the DAT folks picked 48 KHz, which is much better if you're trying to digitize 20KHz signals properly.
I realize that the CD standard is pretty old but isn't it surprising that they didn't think it through?

Ideally then, all of the encoding for streaming should be at 48KHz (or higher) for streaming purposes? ;-)
 
I wrote a computer program to generate some sampling examples, and then wrote a post to explain how aliasing works and tie the examples to the theory.

https://blog.kasson.com/the-last-word/nyquist-and-aliasing-with-examples/

If it's not clear, I will take questions and comments here.

Thanks,

Jim
Very interesting Jim. I assume this (somewhat) explains why they selected 44.1kHz for the CD sampling rate?
Well, yes, but they didn't think through the phase effect of the antialiasing filters they had to use when the passband upper edge and the stopband lower edge were so close to each other. If I remember right, the DAT folks picked 48 KHz, which is much better if you're trying to digitize 20KHz signals properly.
I realize that the CD standard is pretty old but isn't it surprising that they didn't think it through?
At the time, many people thought that phase effects at high audio frequencies were inaudible.
Ideally then, all of the encoding for streaming should be at 48KHz (or higher) for streaming purposes? ;-)
These days, I think we might as well use 96 KHz or higher, if high fidelity is the goal.
 
Nice write up Jim. Mathematicians seem to always be wanting to correct history. The sampling theorem has a long history and is actually closely tied to the Paley-Wiener Theorem which dates back to the early 1930's. In fact the Paley-Wiener space of functions is the necessary ingredient in the proof of the sampling theorem.

Harry Nyquist laid significant ground work in late '20's and early '30's to the sampling theorem. Nyquist didn't supply the proof, however. The proof and the generalization were proved by Claude Shannon, also of Bell Labs in 1948. Actually the theorem predates Nyquist. The British mathematician W. T. Wittaker of Whittaker and Watson fame stated the theorem in 1915 in his work on special functions.

We had two worlds of mathematics and engineering during the Cold War. The Soviet engineer/mathematican, Vladimir Kotel'nikov stated and proved the sampling theorem in about 1930, almost two decades before Shannon's proof. In Russia it was known as Kotelnikov's theorem.

The Paley-Wiener functions were critical in Shannon's proof. The work of Paley-Wiener can be traced back to the tradition of Cauchy. The Paley-Wiener space provides the underpinnings for digital signal processing.

Here is a fairly complete and interesting history of the sampling theorem.


It is normal to refer to the Nyquist, Shannon, Nyquist-Shannon, Shannon-Whittaker, Whittaker-Kotel'nikov-Shannon sampling theorem or whatever you want to call it, when aliasing is discussed in imagery. It works in a fixed linear dimension and it is easy to explain and comprehend.

However, the sampling on a two dimensional sensor is not periodic of a constant sampling frequency in all directions - in fact it can't be. That is true even though the set of functions whose Fourier transform have compact support are the target Paley-Wiener functions.

Daniel Petersen who was a student of Middleton and Middleton published what has become known as the Petersen-Middleton theorem in 1962 extending the sampling theorem to N dimensional Euclidean space and the concept of wave number limited replaces band limited as the necessary and sufficient condition.

At the end of the day if the spacial frequency content it too high for the sampling, aliasing will result.

Here is a reference to the Pedersen-Middleton paper.

https://pdf.sciencedirectassets.com/273276/1-s2.0-S0019995800X00666/1-s2.0-S0019995862906332/main.pdf?X-Amz-Security-Token=IQoJb3JpZ2luX2VjECYaCXVzLWVhc3QtMSJHMEUCICkCkSFu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BD9Kpx1lrikKfDBINQILXcH4BeywGV2g8H8dQbBtCRam5kmhtjrlgWuBhtTnLLp5TDtdgJwXd8eauFq2xKxN28rUMaVz8wjdXWUwa716X7Nnvk%2BgzMx%2BxMwyNmUgLLD86DZaRTS%2FY6e8lAmkOb6IlVcrCcOfGM8l0fnjyM0Vxt7ytwFtdcpSxhbTGN94rdo0dx8Tvn3erKrzZB82A%2F2xPrdOFgei3pYYVji5AUCrcLijC&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250826T233858Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Credential=ASIAQ3PHCVTYTTMX7WXT%2F20250826%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=65ed1525b8f3bca6abe456dc586ac957027c8eaedda635e4476feee304c7c445&hash=d5cdd0f68bee938ec1ca8133d259461b2898b9c667b0d0624dda736c3b9c3494&host=68042c943591013ac2b2430a89b270f6af2c76d8dfd086a07176afe7c76c2c61&pii=S0019995862906332&tid=spdf-dd3c1d0f-2a97-4d55-8340-1f874e63a13d&sid=e0aaa2f87695024e1c29ee95363c8ee676bbgxrqa&type=client&tsoh=d3d3LnNjaWVuY2VkaXJlY3QuY29t&rh=d3d3LnNjaWVuY2VkaXJlY3QuY29t&ua=0f165e5857535101585401&rr=97572a73fd14337d&cc=us
 
I wrote a computer program to generate some sampling examples, and then wrote a post to explain how aliasing works and tie the examples to the theory.

https://blog.kasson.com/the-last-word/nyquist-and-aliasing-with-examples/

If it's not clear, I will take questions and comments here.

Thanks,

Jim
Very interesting Jim. I assume this (somewhat) explains why they selected 44.1kHz for the CD sampling rate?
Well, yes, but they didn't think through the phase effect of the antialiasing filters they had to use when the passband upper edge and the stopband lower edge were so close to each other. If I remember right, the DAT folks picked 48 KHz, which is much better if you're trying to digitize 20KHz signals properly.
I realize that the CD standard is pretty old but isn't it surprising that they didn't think it through?
At the time, many people thought that phase effects at high audio frequencies were inaudible.
Ideally then, all of the encoding for streaming should be at 48KHz (or higher) for streaming purposes? ;-)
These days, I think we might as well use 96 KHz or higher, if high fidelity is the goal.
Thanks for the follow up on my not-really-related questions. :-D
 
Nice write up Jim. Mathematicians seem to always be wanting to correct history. The sampling theorem has a long history and is actually closely tied to the Paley-Wiener Theorem which dates back to the early 1930's. In fact the Paley-Wiener space of functions is the necessary ingredient in the proof of the sampling theorem.

Harry Nyquist laid significant ground work in late '20's and early '30's to the sampling theorem. Nyquist didn't supply the proof, however.
I am a Shannon fan. but I thought that since the post was aimed at the relatively mathematically unsophisticated photographer, that leaving him out was the way to go.
The proof and the generalization were proved by Claude Shannon, also of Bell Labs in 1948. Actually the theorem predates Nyquist. The British mathematician W. T. Wittaker of Whittaker and Watson fame stated the theorem in 1915 in his work on special functions.

We had two worlds of mathematics and engineering during the Cold War. The Soviet engineer/mathematican, Vladimir Kotel'nikov stated and proved the sampling theorem in about 1930, almost two decades before Shannon's proof. In Russia it was known as Kotelnikov's theorem.

The Paley-Wiener functions were critical in Shannon's proof. The work of Paley-Wiener can be traced back to the tradition of Cauchy. The Paley-Wiener space provides the underpinnings for digital signal processing.

Here is a fairly complete and interesting history of the sampling theorem.

https://dornsife.usc.edu/sergey-lot...s/sites/211/2023/06/Sampling-AMSNotices-1.pdf
Thanks for that.
It is normal to refer to the Nyquist, Shannon, Nyquist-Shannon, Shannon-Whittaker, Whittaker-Kotel'nikov-Shannon sampling theorem or whatever you want to call it, when aliasing is discussed in imagery. It works in a fixed linear dimension and it is easy to explain and comprehend.

However, the sampling on a two dimensional sensor is not periodic of a constant sampling frequency in all directions - in fact it can't be. That is true even though the set of functions whose Fourier transform have compact support are the target Paley-Wiener functions.

Daniel Petersen who was a student of Middleton and Middleton published what has become known as the Petersen-Middleton theorem in 1962 extending the sampling theorem to N dimensional Euclidean space and the concept of wave number limited replaces band limited as the necessary and sufficient condition.

At the end of the day if the spacial frequency content it too high for the sampling, aliasing will result.
 
It's fascinating how perfectly ordinary words arranged in perfectly ordinary sentences and paragraphs that look like perfectly ordinary English language and which read like perfectly constructed and clear English, can convey zero meaning. There are probably decades of mathematical training and assumed knowledge implicit in your post, Truman, without which it may as well have been written in Klingon!

Let me have a go at translating some of your text into layman's language:

dhsds dwddwe dh vopji mpdkjpqim qfjpoqij opifjpoijpqojimo[qweifjpm q[wefjkmpqokf[o [fj[qfji jhfksjfksj. dhsds dwddwe dh vopji mpdkjpqim qfjpoqij opifjpoijpqojimo[qweifjpm q[wefjkmpqokf[ o [fj[qfji jhfksjfksj dhsds dwddwe [o [fj[qfji jhfksjfksj.

That's basically what a lot of your post looks like to me :-)

This is, of course, entirely my ignorance, no fault of yours.

--
2024: Awarded Royal Photographic Society LRPS Distinction
Photo of the day: https://www.whisperingcat.co.uk/wp/photo-of-the-day-2025/
Website: https://www.whisperingcat.co.uk/wp/
DPReview gallery: https://www.dpreview.com/galleries/0286305481
Flickr: http://www.flickr.com/photos/davidmillier/ (very old!)
 
Last edited:
Very helpful and easy to follow, thanks
 

Keyboard shortcuts

Back
Top