1. Home
  2. Explore
  3. Mathematics
  4. Circulant Matrices

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Circulant Matrices

Circulant Matrices, Convolution, and Fourier Eigenvectors

Circulant matrices and cyclic shifts

A circulant matrix is a square matrix in which each row is obtained by cyclically shifting the row above it. For example,

C=[c0c1c2c3c3c0c1c2c2c3c0c1c1c2c3c0].C= \begin{bmatrix} c_0 & c_1 & c_2 & c_3\\ c_3 & c_0 & c_1 & c_2\\ c_2 & c_3 & c_0 & c_1\\ c_1 & c_2 & c_3 & c_0 \end{bmatrix}.C=​c0​c3​c2​c1​​c1​c0​c3​c2​​c2​c1​c0​c3​​c3​c2​c1​c0​​​.

Although an N×NN\times NN×N matrix generally has N2N^2N2 entries, a circulant matrix is determined by only NNN numbers: its first row (or, equivalently, its first column). Every other entry is fixed by the cyclic-shift pattern.

A convenient way to construct a circulant matrix is from a cyclic-shift permutation matrix. With zero-based indexing, define PPP so that

(Px)r=x(r+1) mod N.(Px)_r=x_{(r+1)\bmod N}.(Px)r​=x(r+1)modN​.

Thus, PPP shifts the entries of a vector cyclically. Any circulant matrix with first row (c0,c1,…,cN−1)(c_0,c_1,\ldots,c_{N-1})(c0​,c1​,…,cN−1​) can be written as

C=c0I+c1P+c2P2+⋯+cN−1PN−1.C=c_0I+c_1P+c_2P^2+\cdots+c_{N-1}P^{N-1}.C=c0​I+c1​P+c2​P2+⋯+cN−1​PN−1.

This representation makes an important property clear: circulant matrices are polynomials in the same shift matrix. In particular, products of circulant matrices are also circulant, and circulant matrices of the same size commute:

C1C2=C2C1.C_1C_2=C_2C_1.C1​C2​=C2​C1​.

Convolution matrices and image processing

Toeplitz matrices and noncyclic convolution

A Toeplitz matrix has constant diagonals. Unlike a circulant matrix, it does not wrap its entries around at the boundaries. Multiplying a Toeplitz matrix by a vector performs a noncyclic convolution, with boundary behavior depending on how the finite signal is handled.

These matrices also describe linear shift-invariant systems: the same operation is applied at each position, rather than assigning a completely unrelated weight to every position. In engineering, such operations are often described as filtering or convolution.

For example, applying the same set of weights to neighboring pixels throughout an image can detect or emphasize features without storing a distinct weight for every pixel pair. This parameter sharing is useful because it greatly reduces the number of weights compared with using an arbitrary dense matrix.

Why shared weights matter

An image with 1,000×1,0001{,}000\times1{,}0001,000×1,000 pixels has one million pixel values. A color image with three channels has about three million values. If an arbitrary dense matrix were applied to a vector of that size, it would require roughly (3,000,000)2(3{,}000{,}000)^2(3,000,000)2 weights. Such a matrix would be impractically large to store and optimize.

A convolutional operation instead reuses a small collection of weights at many locations. This reflects the assumption that a useful pattern—such as an edge or texture—can matter wherever it appears in an image. A circulant matrix illustrates this idea particularly clearly because its cyclic structure is completely specified by a single row. In practical image processing, convolution matrices are often Toeplitz-like rather than circulant because images generally do not wrap around at their edges.

Filtering and pooling

A low-pass filter reduces rapid changes in a signal or image, which correspond to high spatial frequencies. For instance, averaging neighboring pixel values smooths an image: slowly varying regions change little, while fine speckling and abrupt pixel-to-pixel changes are reduced. Averaging two neighboring values with weights such as 12\frac1221​ and 12\frac1221​ is a simple example.

Pooling is a separate operation that reduces the size of an image representation. In a 3×33\times33×3 region, for example, max pooling replaces the nine values with their maximum. This reduces the number of values passed to later computations. Max pooling is generally nonlinear, so it is distinct from multiplying by a convolution matrix.


Eigenvalues of the cyclic-shift matrix

The cyclic-shift matrix PPP is a permutation matrix, so it is orthogonal:

PTP=I.P^{T}P=I.PTP=I.

Consequently, it preserves vector lengths. Its singular values are all 111, because the singular values are the square roots of the eigenvalues of PTP=IP^TP=IPTP=I.

The eigenvalues of PPP are found especially easily from the fact that shifting a vector NNN times returns it to its original position:

PN=I.P^N=I.PN=I.

If Px=λxPx=\lambda xPx=λx for an eigenvector xxx, then applying PNP^NPN gives

λNx=x,\lambda^N x=x,λNx=x,

so every eigenvalue satisfies

λN=1.\lambda^N=1.λN=1.

The eigenvalues are therefore the NNNth roots of unity:

1,  w,  w2,  …,  wN−1,w=e2πi/N.1,\;w,\;w^2,\;\ldots,\;w^{N-1}, \qquad w=e^{2\pi i/N}.1,w,w2,…,wN−1,w=e2πi/N.

They lie evenly spaced on the unit circle in the complex plane. For N=4N=4N=4, the roots are 111, iii, −1-1−1, and −i-i−i. For N=8N=8N=8, they are the eight equally spaced eighth roots of unity.

Complex eigenvalues are natural here: a real cyclic shift can have complex eigenvectors and eigenvalues even though the matrix itself has only real entries.


Orthogonal eigenvectors and normal matrices

Different important matrix families have eigenvectors that can be chosen orthogonal or orthonormal.

  • Real symmetric matrices satisfy AT=AA^T=AAT=A. Their eigenvalues are real, and their eigenvectors can be chosen orthonormally.

  • Diagonal matrices have the coordinate directions as eigenvectors.

  • Orthogonal matrices satisfy QTQ=IQ^TQ=IQTQ=I. They preserve lengths, so each eigenvalue λ\lambdaλ has magnitude 111.

  • Real skew-symmetric matrices satisfy AT=−AA^T=-AAT=−A. Their eigenvalues are purely imaginary or zero when considered over the complex numbers.

For example, the matrix

[01−10]\begin{bmatrix} 0&1\\ -1&0 \end{bmatrix}[0−1​10​]

represents a rotation through a right angle. Its eigenvalues are iii and −i-i−i. A nonzero real vector cannot be an eigenvector for this rotation because the rotation changes its direction; the complex eigenvectors provide the corresponding eigen-directions.

These families fit within the broader class of normal matrices. A complex matrix MMM is normal when it commutes with its conjugate transpose:

M∗M=MM∗,M^*M=MM^*,M∗M=MM∗,

where M∗M^*M∗ is the conjugate transpose. For a real matrix, this condition uses the ordinary transpose. The spectral theorem states that a complex matrix is normal precisely when it can be diagonalized by a unitary matrix: its eigenvectors can be chosen as an orthonormal basis.

Circulant matrices are normal. Their products remain circulant, and the conjugate transpose of a circulant matrix is also circulant. Since circulant matrices commute, a circulant matrix commutes with its conjugate transpose. This guarantees an orthonormal eigenvector basis.


Fourier eigenvectors

The eigenvectors of the cyclic shift are built from the same roots of unity as its eigenvalues. For each k=0,…,N−1k=0,\ldots,N-1k=0,…,N−1, define

qk=[1wkw2k⋮w(N−1)k].q_k= \begin{bmatrix} 1\\ w^k\\ w^{2k}\\ \vdots\\ w^{(N-1)k} \end{bmatrix}.qk​=​1wkw2k⋮w(N−1)k​​.

Under the shift convention (Px)r=x(r+1) mod N(Px)_r=x_{(r+1)\bmod N}(Px)r​=x(r+1)modN​,

Pqk=wkqk.Pq_k=w^kq_k.Pqk​=wkqk​.

Thus, qkq_kqk​ is an eigenvector with eigenvalue wkw^kwk. Reversing the direction of the shift changes the eigenvalue to w−kw^{-k}w−k; this is a convention difference, not a change in the underlying Fourier structure.

The Fourier matrix collects all these eigenvectors as columns:

F=[111⋯11ww2⋯wN−11w2w4⋯w2(N−1)⋮⋮⋮⋮1wN−1w2(N−1)⋯w(N−1)2],Fr,k=wrk.F= \begin{bmatrix} 1&1&1&\cdots&1\\ 1&w&w^2&\cdots&w^{N-1}\\ 1&w^2&w^4&\cdots&w^{2(N-1)}\\ \vdots&\vdots&\vdots&&\vdots\\ 1&w^{N-1}&w^{2(N-1)}&\cdots&w^{(N-1)^2} \end{bmatrix}, \qquad F_{r,k}=w^{rk}.F=​111⋮1​1ww2⋮wN−1​1w2w4⋮w2(N−1)​⋯⋯⋯⋯​1wN−1w2(N−1)⋮w(N−1)2​​,Fr,k​=wrk.

The entries are powers of a single root of unity. Since every circulant matrix is a polynomial in PPP, all circulant matrices of size NNN share these Fourier eigenvectors. Their eigenvalues differ, but their eigenvector matrix is the same.

For a circulant matrix C=∑ℓ=0N−1cℓPℓC=\sum_{\ell=0}^{N-1}c_\ell P^\ellC=∑ℓ=0N−1​cℓ​Pℓ, the eigenvalue associated with qkq_kqk​ is

λk=∑ℓ=0N−1cℓwkℓ.\lambda_k=\sum_{\ell=0}^{N-1}c_\ell w^{k\ell}.λk​=∑ℓ=0N−1​cℓ​wkℓ.

This shows why Fourier analysis is so closely connected to cyclic convolution: the Fourier eigenvalues encode how the convolution acts on each frequency component.


Orthogonality of the Fourier eigenvectors

The Fourier eigenvectors are orthogonal because sums of distinct powers of a root of unity cancel. For two column indices kkk and mmm, their inner product is

qk∗qm=∑r=0N−1w(m−k)r.q_k^*q_m = \sum_{r=0}^{N-1}w^{(m-k)r}.qk∗​qm​=∑r=0N−1​w(m−k)r.

If k=mk=mk=m, every term is 111, so the inner product is NNN. If k≠mk\ne mk=m, the terms form a complete geometric sum around the unit circle and add to 000. Therefore,

F∗F=NI.F^*F=NI.F∗F=NI.

Each column of FFF has length N\sqrt{N}N​, so the normalized Fourier matrix

U=1NFU=\frac{1}{\sqrt{N}}FU=N​1​F

is unitary: its columns are orthonormal.

The cancellation can also be seen geometrically. For N=3N=3N=3, the three roots 111, e2πi/3e^{2\pi i/3}e2πi/3, and e4πi/3e^{4\pi i/3}e4πi/3 form the vertices of an equilateral triangle centered at the origin, so their sum is zero. More generally, the NNN roots of unity are evenly distributed around the circle, and their sum is zero for N>1N>1N>1.


Discrete Fourier transform and computational significance

The discrete Fourier transform (DFT) expresses a finite vector in terms of its frequency components. The Fourier matrix is its matrix representation, up to normalization and the chosen sign convention. Because circulant matrices are diagonalized by the Fourier matrix, a cyclic convolution can be transformed into componentwise multiplication in the frequency domain.

This connection is fundamental in engineering, mathematics, signal processing, and image processing. The fast Fourier transform (FFT) is an efficient algorithm for computing the DFT, making Fourier-based methods practical for large data sets. The roots of unity, the Fourier eigenvectors, and the shared diagonalization of circulant matrices are all manifestations of the same underlying periodic structure.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent