# Aliasing and the Nyquist Frequency
When we take discrete samples of a continuous signal, we lose some information about the original signal. This information loss creates some ambiguity as to what the original signal looked like before we sampled it. For a given set of samples, there are an infinite number of waveforms that could be drawn that pass through all of the data points. To better understand the issue at hand, consider a scenario where we have a sample rate of 5 Hz, and we are sampling a 1 Hz sine wave and a 6 Hz sine wave (illustrated below).
We can see that both the sine waves intersect at the exact time the samples are taken. This makes the 1 Hz sine wave and the 6 Hz sine wave indistinguishable from one another when sampling at a rate of 5 Hz. This phenomena is known *aliasing*. Signals are said to have *aliased* when they are sampled at a rate of $F_s$ and their frequency content lies outside of the *Nyquist window* $\left(0 \text{ to } \frac{F_s}{2} \right)$ Hz. $\frac{F_s}{2}$ is known as the *Nyquist frequency*. To determine which frequencies will alias to a specified frequency in the Nyquist window, the following relationship can be used:
$$f_a = f_0 + k \, F_s$$
where $k$ can be any positive or negative integer and $f_a$ is the aliased frequency that will show up within the Nyquist window at the frequency $f_0$ when sampled at a rate of $F_s$.
The frequency within the Nyquist window that a frequency outside of the Nyquist window will alias to can be determined with the following equation:
$$f_0 = f_a \, \% \, F_s$$
where $\%$ is the modulo operator.