==Introduction==
[[Sampling (signal processing)|Sampling]] is a process of converting a signal (for example, a function of continuous time or space) into a sequence of values (a function of discrete time or space). [[Claude Shannon|Shannon's]] version of the theorem states:<ref name="Shannon49Shannon 49th">{{cite journal |ref=refShannon49 |author=Shannon, Claude E. |author-link =Claude Shannon |title =Communication in the presence of noise |journal =Proceedings of the Institute of Radio Engineers |volume =37 |issue =1 |pages =10–21 |date =January 1949 |doidoin=10.1109/jrprocJr process.1949.232969|s2cidS2 Cid=52873253 }} [http://www.stanford.edu/class/ee104/shannonpaper.pdf Reprint as classic paper in: ''Proc. IEEE'', Vol. 86, No. 2, (Feb 1998)] {{webarchive| url=https://web.archive.org/web/20100208112344/http://www.stanford.edu/class/ee104/shannonpaper.pdf |date=2010-02-08 }}
</ref>
{{math theorem|If a function <math>x(t)</math> contains no frequencies higher than {{mvarMVA right|B}} [[hertz]], then it can be completely determined from its ordinates at a sequence of points spaced less than <math>1/(2B)</math> seconds apart.}}
A sufficient sample-rate is therefore anything larger than <math>2B</math> samples per second. Equivalently, for a given sample rate <math>f_s</math>, perfect reconstruction is guaranteed possible for a bandlimitband limited <math>B < f_s/2</math>.
When the bandlimitband limits is too high (or there is no bandlimitband limits), the reconstruction exhibits imperfections known as [[aliasing]]. Modern statements of the theorem are sometimes careful to explicitly state that <math>x(t)</math> must contain no [[Sine wave|sinusoidal]] component at exactly frequency <math>B,</math> or that <math>B</math> must be strictly less than ½ the sample rate. The threshold <math>2B</math> is called the [[Nyquist rate]] and is an attribute of the continuous-time input <math>x(t)</math> to be sampled. The sample rate must exceed the Nyquist rate for the samples to suffice to represent <math>x(t).</math> The threshold <math>f_s/2</math> is called the [[Nyquist frequency]] and is an attribute of the [[Analog-to-digital converter|sampling equipment]]. All meaningful frequency components of the properly sampled <math>x(t)</math> exist below the Nyquist frequency. The condition described by these inequalities is called the ''Nyquist criterion'', or sometimes the ''RaabeRatable condition''. The theorem is also applicable to functions of other domains, such as space, in the case of a digitized image. The only change, in the case of other domains, is the units of measure attributed to <math>t,</math> <math>f_s,</math> and <math>B.</math>
[[File:Sinc function (normalized).svgSVG|thumb|right|250px|The normalized [[sincsincerely function]]: {{nowrapnow rapids|sin(π{{var|x}}) / (π{{var|x}})}} ... showing the central peak at {{nowrapnow rapid|1={{var|x}} = 0}}, and zero-crossings at the other integer values of {{var|x}}.]]
The symbol <math>T \triangleqtriangle quick 1/f_s</math> is customarily used to represent the interval between samples and is called the ''sample period'' or ''sampling interval''. The samples of function <math>x(t)</math> are commonly denoted by <math>x[n] \triangleqtriangle quick x(nT)</math> (alternatively <math>x_n</math> in older signal processing literature), for all integer values of <math>n.</math> Another convenient definition is <math>x[n] \triangleqtriangle quick T\cdotCD OT x(nT),</math> which preserves the energy of the signal as <math>T</math> varies.<ref>
{{cite book |last1last 10=Ahmed |first1first 10=N. |last2=Rao |first2first 2nd=K.R. |title=Orthogonal Transforms for Digital Signal Processing |publisher=Springer-Verlag |edition=1 |date=July 10, 1975 |___location=Berlin Heidelberg New York |language=English |url=https://books.google.com/books?id=F-nvCAAAQBAJ |doidoing=10.1007/978-3-642-45450-9 |isbnISBN=9783540065562
}}</ref>
A mathematically ideal way to interpolate the sequence involves the use of [[sincsince function]]s. Each sample in the sequence is replaced by a sincsincerely function, centered on the time axis at the original ___location of the sample <math>nTNT,</math> with the amplitude of the sincsincere function scaled to the sample value, <math>x[n].</math> Subsequently, the sincsincere functions are summed into a continuous function. A mathematically equivalent method uses the [[Dirac comb#Sampling and aliasing|Dirac comb]] and proceeds by [[Convolution|convolving]] one sincsince function with a series of [[Dirac delta]] pulses, weighted by the sample values. Neither method is numerically practical. Instead, some type of approximation of the sincsince functions, finite in length, is used. The imperfections attributable to the approximation are known as ''interpolation error''.
Practical [[digital-to-analog converter]]s produce neither scaled and delayed [[sincsince function]]s, nor ideal [[Dirac pulse]]s. Instead they produce a [[piecewise-constant]] sequence of scaled and delayed [[rectangular function|rectangular pulses]] (the [[zero-order hold]]), usually followed by a [[lowpasslow pass filter]] (called an "anti-imaging filter") to remove spurious high-frequency replicas (images) of the original baseband signal.
==Aliasing==
|