Where Does the Fourier Transform Come From?
2026-12-03
The Fourier transform is of fundamental importance in science and engineering, or so I’ve heard. It’s always been a mystery to me. Whatever I learned about it in class left my mind soon after I took the final exam.
But after graduating I eventually rediscovered a love for learning, and I found that the Fourier transform kept appearing in topics I was curious about. For example, recently I’ve become a bit obsessed with quantum mechanics, where the Fourier transform is crucial to understanding the connections between physical properties like position, momentum, time, and energy.
So finally, I decided that it was time to try and understand this thing.
Discrete Fourier Transform
I personally find it a lot easier to understand concepts where there aren’t infinities or continuums involved. This is just how my brain works. So we’re going to start in the discrete world and work our way gradually toward the continuous.
Images are the most visual, intuitive way to start investigating the Fourier transform and related concepts. We’ll begin by thinking of each row of an image as a finite, discrete signal:
A pixel is a value between 0 and 1, where 0 is black and 1 is white. The image is 960 pixels wide, so a row of pixels is a vector with n=960 entries, \mathbf{x}=\begin{pmatrix}0.21 \\ 0.20 \\ 0.20 \\ 0.21 \\ \vdots \\ 0.46 \\ 0.44 \\ 0.40 \\ 0.38\end{pmatrix}. In other words, we will consider each row of an image to be a member of the set \mathbb{R}^n of n-tuples of real numbers.
A linear transformation of \mathbf{x} can be represented as a matrix in \mathbb{R}^{n\times n}. Consider the following transformation of a row of 4 pixels by a 4 \times 4 matrix:
S_4=\begin{pmatrix} 0 & 0 & 0 & 1 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{pmatrix}
\mathbf{x}=\begin{pmatrix}0.1 \\ 0.4 \\ 0.7 \\ 1.0\end{pmatrix}
This is known as a cyclic shift matrix. It shifts each pixel one to the right, where the right-hand side cycles back to the start. In general, S_n can be constructed by putting 1’s below the diagonal and a 1 in the top-right corner. Below, we can see the effect of applying S_{960} multiple times to each row of our image (a matrix A applied k times to \mathbf{x} is A^k\mathbf{x}):
We will drop the subscript n where it’s not ambiguous. Since the cyclic shift matrix returns a row back to its original state after n applications, we have S^n=I where I=I_n is the n\times n identity matrix.
It’s often useful to know which vectors are left unchanged by a matrix, or otherwise scaled by a constant factor. The solutions to the equation A\mathbf{v}=\lambda\mathbf{v} tell us what these are for the matrix A. The vectors \mathbf{v} satisfying this equation are known as the eigenvectors of A, and the corresponding scalars \lambda are known as the eigenvalues.
For a matrix in \mathbb{R}^{n\times n} what we end up with is a polynomial equation (x-\lambda_0)(x-\lambda_1)\cdots(x-\lambda_{n-1})=0 with roots \lambda_0,\dots,\lambda_{n-1}, which are the eigenvalues. The Fundamental Theorem of Algebra tells us that the n roots always exist, provided that we allow for complex roots, \lambda_k\in\mathbb{C}.
The repeated application of a matrix A to one of its eigenvectors has the property A^k\mathbf{v}=\lambda^k\mathbf{v}. Therefore, for an eigenvector of S, we have \mathbf{v}=I\mathbf{v}=S^n\mathbf{v}=\lambda^n\mathbf{v} which implies, for all eigenvalues of S, \lambda^n=1. If we allow \lambda\in\mathbb{C}, there are n solutions to this equation: \omega_k=e^{i2\pi k/n}, \quad 0 \leq k < n. These are known as the nth roots of unity. In the complex plane, they’re equally spaced points around the unit circle:
It turns out that the nth roots of unity are precisely the n distinct eigenvalues of S: \lambda_k=\omega_k^{-1}=e^{-i2\pi k/n}. The minus sign in the exponent is the standard convention and only changes the order of the eigenvalues.
We’ll write an arbitrary complex number z as z=re^{i\phi} where r is the magnitude and \phi is the phase. The roots of unity have magnitude r=1. When we visualize complex numbers we use a color to indicate the phase, where \phi=0 is red, \phi=\tfrac{2\pi}{3} is green, and \phi=\tfrac{4\pi}{3} is blue.
Below, you can see the eigenvectors of S and how they behave under repeated applications of S.
These are vectors in \mathbb{C}^n, the set of all n-tuples of complex numbers. Shifting them to the right is equivalent to multiplication by a phase factor, i.e. a pure rotation in the complex plane. This property is what makes them eigenvectors of S.
We can also visualize them as an image, where the same eigenvector is repeated in each row:
For a pixel in column j, the entry of the eigenvector for \lambda_k is \mathbf{v}_k[j]=e^{i2\pi kj/n}. It can be shown that \mathbf{v}_0,\dots,\mathbf{v}_{n-1} form a basis of \mathbb{C}^n, of which \mathbb{R}^n is a subset. Therefore, any vector \mathbf{x}\in\mathbb{R}^n can be written as a linear combination \mathbf{x}=\sum_{k=0}^{n-1}\hat{x}_k\mathbf{v}_k.
To compute the coefficients \hat{x}_k, we can use a change of basis. If V\in\mathbb{C}^{n\times n} is the matrix whose columns are \mathbf{v}_k, and \hat{\mathbf{x}} is the vector of coefficients, then the above is equivalent to \begin{aligned} \mathbf{x}&=V\hat{\mathbf{x}} \\ V^{-1}\mathbf{x}&=\hat{\mathbf{x}}. \end{aligned}
After applying V^{-1} to each row of our image, it looks like this:
Note that in the visualizations, we’re sorting the eigenbasis in ascending order of the frequency of the eigenvectors. This is another standard convention; just keep in mind that the order is different than the indices k we’ve defined above.
Because V represents the inverse of the above transformation, it will take the vector of coefficients \hat{\mathbf{x}} and reconstruct the row of pixels \mathbf{x}. The partial sums show how it builds the image from different frequencies:
In component form, \hat{\mathbf{x}}=V^{-1}\mathbf{x} is \hat{\mathbf{x}}[k] = \frac{1}{n}\sum_{j=0}^{n-1}\mathbf{x}[j]e^{-i2\pi kj/n}. This is known as the discrete Fourier transform (DFT). The inverse, \mathbf{x}=V\hat{\mathbf{x}}, is \mathbf{x}[j] = \sum_{k=0}^{n-1}\hat{\mathbf{x}}[k]e^{i2\pi kj/n}, known as the inverse discrete Fourier transform (IDFT).
As we’ve seen, these operations are just a change of basis. The DFT changes from the standard basis to an eigenbasis (known as the Fourier basis) of a cyclic shift matrix. The IDFT changes from the Fourier basis back to the standard basis.
From here, we’ll use \mathcal{F} to indicate the DFT, defining it as \begin{aligned} \mathcal{F}&\equiv nV^{-1} \\ \mathcal{F}^{-1}&\equiv \tfrac{1}{n}V. \end{aligned} The standard convention moves the factor 1/n into the IDFT. The scaling factor doesn’t matter much; what matters is that the two operations are inverses of each other and \mathcal{F} changes to the Fourier basis.
Circulant Matrices and Convolution
At this point, it may seem somewhat arbitrary that the matrix S happened to spit out the discrete Fourier transform. What is it about this matrix that’s so special?
As it turns out, S is not the only matrix that we could have used to discover the Fourier basis. The key property is that it’s a circulant matrix. For example, a 4 \times 4 circulant matrix has the form \begin{pmatrix} a & d & c & b\\ b & a & d & c\\ c & b & a & d\\ d & c & b & a \end{pmatrix}. It’s fully determined by its first column. In general, if the first column of a circulant matrix is \mathbf{c}_0, then the others are given by a repeated cyclic shift \mathbf{c}_k = S^k\mathbf{c}_0. The action of a matrix C on a vector \mathbf{x} is a linear combination of the columns. For circulant C this is C\mathbf{x}=\sum_{k=0}^{n-1}\mathbf{x}[k]\mathbf{c}_k =\sum_{k=0}^{n-1}\mathbf{x}[k]S^k\mathbf{c}_0 which is equivalent to the circular convolution of \mathbf{x} with the first column \left(\mathbf{x}\circledast\mathbf{c}_0\right)[j] = \sum_{k=0}^{n-1}\mathbf{x}[k]\,\mathbf{c}_0[j-k], where indices are taken modulo n, so that \mathbf{c}_0[-1] = \mathbf{c}_0[n-1]. We call \mathbf{c}_0 the kernel of the convolution.
Below, you can see what convolution looks like on a row of 8 pixels. The kernel represents a blur operation with pixel radius r:
r=1
And this is what it looks like when we convolve the rows of our image with a blur kernel:
Since every convolution with a fixed kernel can be written as a circulant matrix C, we can think of the eigenvectors of C as the eigenvectors of the associated convolution operation. It turns out that these always include the Fourier basis vectors, as we already saw in the case of the cyclic shift matrix S.
Below, you can see the effect of the same convolution on a Fourier basis vector:
Even though a blur of an arbitrary vector spreads pixels out, a blur of an eigenvector is a pure scaling.
We won’t go deep into the algebra of circulant matrices here. Suffice it to say that the Fourier basis is an eigenbasis of every circulant matrix C, and therefore the DFT diagonalizes C C=\mathcal{F}^{-1}D\mathcal{F}, where D is the diagonal matrix of eigenvalues of C. The eigenvalues are given by the DFT of the associated convolution kernel, D=\operatorname{diag}\left(\mathcal{F}\mathbf{c}_0\right). A diagonal matrix acting on a vector is an element-wise multiplication, so we can also write it as D\mathbf{x}=\mathcal{F}\mathbf{c}_0\odot\mathbf{x}.
We can neatly summarize the relationship with the equation C\mathbf{x}=\mathbf{x}\circledast\mathbf{c}_0= \mathcal{F}^{-1}\left(\mathcal{F}\mathbf{c}_0\odot\mathcal{F}\mathbf{x}\right)= \mathcal{F}^{-1}D\mathcal{F}\mathbf{x}. In words, from left to right,
- Application of a circulant matrix is the same as a circular convolution.
- A circular convolution in the standard basis is the same as element-wise multiplication by the kernel in the Fourier basis.
- The DFT diagonalizes all circular convolutions.
So where does the Fourier transform come from? The best answer I can give at this point is: it is the unique change of basis (up to normalization and reordering) that simultaneously diagonalizes all (circular) convolutions. This applies equally well to the discrete Fourier transform as it does to the continuous Fourier transform, which we will now turn to.
To Infinity (and Beyond)
Everything we’ve covered so far has been linear algebra, which is the theory of finite-dimensional vector spaces. The generalization of this theory to infinite dimensions is known as functional analysis.
To say where the Fourier transform comes from in this context, we need to translate what we’ve found to infinite-dimensional vector spaces. We can think of a vector in \mathbb{R}^n as a function \mathbf{x}:\{0,\dots,n-1\}\to\mathbb{R}. Once we see vectors as functions in this way, there’s nothing stopping us from changing the index set \{0,\dots,n-1\} to something else, for instance f:\mathbb{R}\to\mathbb{R}. Our vectors will then be real-valued functions, and we’ll have all of the same concepts of linear algebra to play with: basis, eigenvalues, eigenvectors, etc. When we sum over our index set, instead of \sum_{k=0}^{n-1} f(k) we will now have \int_{-\infty}^\infty f(x)\,dx.
In \mathbb{R}^n, the standard basis \mathbf{e}_0,\dots,\mathbf{e}_{n-1} is \mathbf{e}_k[j]=\delta_{jk}= \begin{cases} 1 & j = k \\ 0 & j \neq k. \end{cases} This is known as the Kronecker delta. In infinite dimensions, we replace this with the Dirac delta, which we can think of as \delta(x) = \begin{cases} \infty & x=0 \\ 0 & x \neq 0. \end{cases} It’s an infinitely high spike at one point in space. By definition, \delta is zero everywhere except x=0, and has the property \int_{-\infty}^\infty \delta(x)\,dx = 1. Strictly speaking, \delta is not a function, so we might be concerned that our basis vectors aren’t actually in the vector space we’re working with. There are ways to fix this, but we will leave those details for another day.
Every function f:\mathbb{R}\to\mathbb{R} can be written in the standard basis as a linear combination of delta functions, f(x)=\int_{-\infty}^\infty f(x')\delta(x-x')\,dx'.
The Fourier basis consists of the complex exponentials e_{\xi}(x)=e^{i2\pi \xi x}, and the change of basis of f from the standard basis to the Fourier basis is given by1 \hat{f}(\xi)= \int_{-\infty}^\infty f(x)e^{-i2\pi \xi x}\,dx.
This is the Fourier transform. If we look at the DFT again, \hat{\mathbf{x}}[k] = \sum_{j=0}^{n-1}\mathbf{x}[j]e^{-i2\pi kj/n} we can see that both represent the same operation on vectors over their respective index sets, with \tfrac{kj}{n}\to \xi x.
The change of basis back from the Fourier basis to the standard basis is the inverse Fourier transform, f(x)=\int_{-\infty}^\infty \hat f(\xi)e^{i2\pi\xi x}\,d\xi.
Unlike in finite dimensions, these changes of basis are not defined for all functions f:\mathbb{R}\to\mathbb{R} and \hat f:\mathbb{R}\to\mathbb{C}. Suffice it to say that with the appropriate restrictions on our function space, the Fourier transform is a bijection and the inverse Fourier transform is its inverse, just like we have for the DFT and the IDFT.
To stay consistent with our previous notation, we can also write \begin{aligned} \hat f&=\mathscr{F} f \\ f&=\mathscr{F}^{-1} \hat f \end{aligned} where the Fourier transform \mathscr{F} is a linear operator acting on functions f:\mathbb{R}\to\mathbb{C}. This is the infinite-dimensional analog of our DFT matrix.
We found in finite dimensions that the DFT diagonalizes all circular convolutions. In \mathbb{R}^n, circular convolution can be defined entirely by its action on the basis vectors \mathbf{e}_{j}\circledast\mathbf{e}_k=\mathbf{e}_{(j+k) \operatorname{mod} n} which is a cyclic shift of the index set.
The index set \mathbb{R} never wraps around, so in this case the Fourier transform diagonalizes all (non-circular) convolutions, defined by the property \delta(x-a)\ast\delta(x-b)=\delta\big(x-(a+b)\big).
For functions f and g, the convolution f\ast g is given by2 (f\ast g)(x)=\int_{-\infty}^\infty f(a)\,g(x-a)\,da.
And as we can see below, the Fourier basis functions are eigenfunctions of convolution: \begin{aligned} \left(f\ast e_\xi\right)(x) &=\int_{-\infty}^\infty f(a)\,e^{i2\pi\xi(x-a)}\,da \\ &=e^{i2\pi\xi x}\int_{-\infty}^\infty f(a)\,e^{-i2\pi\xi a}\,da \\ &=\hat f(\xi)e_\xi(x) \end{aligned} with eigenvalues given by the Fourier transform of the kernel. This naturally leads to the convolution theorem: because \mathscr{F} diagonalizes convolution, it becomes multiplication in the Fourier basis, f\ast g = \mathscr{F}^{-1}(\mathscr{F}f\cdot\mathscr{F}g). This is the continuous analog of the result we found in the previous section.
Translation Invariance
So we now know where the Fourier transform comes from, more or less. But to me, this still doesn’t explain intuitively why it shows up everywhere. The key property we’ve been dancing around is translation invariance.
For example, in physics we often assume that the laws of physics are the same no matter where you are in space. This is equivalent to saying that if f(x) is a valid state or solution of a physical system, then so is the translation f(x-a). We can characterize translation-invariant systems relative to the translation operator T_a, (T_a\,f)(x) = f(x-a). Suppose L is a linear operator that describes some behavior of a physical system. L is translation-invariant if for all a\in\mathbb{R}, L(T_af) = T_a(Lf), i.e. it doesn’t matter whether we translate the system first and then apply the laws of physics, or apply the laws of physics first and then translate the system. In other words, we can say that L is translation-invariant if it commutes with all translation operators, LT_a=T_aL. As we’ve already seen, the translation of a Fourier basis vector e_\xi is equivalent to a pure phase rotation, i.e. it is an eigenfunction of T_a. So we have T_aLe_\xi = LT_ae_\xi = Le^{-i2\pi\xi a}e_\xi = e^{-i2\pi\xi a}Le_\xi, and Le_\xi is also an eigenfunction of T_a, with the same eigenvalue as e_\xi.
Because e_\xi is the only function (up to scale) with eigenvalue e^{-i2\pi\xi a} for every a, Le_\xi must be a multiple of it, Le_\xi=\lambda_\xi e_\xi. Therefore, we have shown that if L is translation-invariant, then it is also diagonal in the Fourier basis.
This explains why the Fourier transform is ubiquitous. Any behavior, process, operation, transformation, etc. that can be described as linear and translation-invariant is equivalent to a pure scaling in the Fourier basis and a convolution in the standard basis.
Notes
In a complex function space, the inner product is \langle f,g \rangle = \int_{-\infty}^\infty f(x)g(x)^*\,dx, so when we change basis, we multiply by the complex conjugate of the basis vector components. This is where the minus sign comes from in our convention for the Fourier transform.↩︎
With f and g written out in the standard basis, \begin{aligned} (f\ast g)(x) &=\left(\int_{-\infty}^\infty f(a)\,\delta(x-a)\,da\right)\ast\left(\int_{-\infty}^\infty g(b)\,\delta(x-b)\,db\right) \\ &=\int_{-\infty}^\infty\int_{-\infty}^\infty f(a)\,g(b)\,\big(\delta(x-a)\ast\delta(x-b)\big)\,db\,da \\ &=\int_{-\infty}^\infty f(a)\int_{-\infty}^\infty g(b)\,\delta\big(b-(x-a)\big)\,db\,da \\ &=\int_{-\infty}^\infty f(a)\,g(x-a)\,da. \end{aligned} ↩︎