Ma · Mathematics

How to Find the Inverse of a Circulant Matrix

Published By the 9to5Science editorial team

At a glance

  1. 1. Form the symbol polynomial

    Use the first row to define p(z) = c₀ + c₁z + ··· + cₙ₋₁zⁿ⁻¹.

  2. 2. Evaluate at roots

    Evaluate p at all nth roots of unity.

  3. 3. Check invertibility

    The circulant matrix is invertible exactly when none of these values is zero.

  4. 4. Invert the eigenvalues

    Take the reciprocal of each nonzero eigenvalue.

  5. 5. Apply the inverse DFT

    The inverse DFT gives the first row of the inverse circulant matrix.

A circulant matrix is completely determined by one row: every subsequent row is a cyclic shift of the preceding row. The useful fact is that circulant matrices are diagonalized by the discrete Fourier transform (DFT). This turns matrix inversion into nn scalar divisions.

The inverse, when it exists, is itself circulant. The main task is therefore to determine when the matrix is invertible and compute the first row of its inverse.

Define the circulant matrix and its polynomial

Let

C=(c0c1c2⋯cn−1cn−1c0c1⋯cn−2cn−2cn−1c0⋯cn−3⋮⋮⋮⋱⋮c1c2c3⋯c0).C=\begin{pmatrix} c_0&c_1&c_2&\cdots&c_{n-1}\\ c_{n-1}&c_0&c_1&\cdots&c_{n-2}\\ c_{n-2}&c_{n-1}&c_0&\cdots&c_{n-3}\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ c_1&c_2&c_3&\cdots&c_0 \end{pmatrix}.

Associate with its first row the polynomial

p(z)=c0+c1z+c2z2+⋯+cn−1zn−1.p(z)=c_0+c_1z+c_2z^2+\cdots+c_{n-1}z^{n-1}.

Let

ωm=e2πim/n,m=0,1,…,n−1,\omega_m=e^{2\pi i m/n},\qquad m=0,1,\ldots,n-1,

be the nnth roots of unity. The eigenvalues of CC are

λm=p(ωm)=∑k=0n−1ckωmk.\lambda_m=p(\omega_m)=\sum_{k=0}^{n-1}c_k\omega_m^k.

Thus, the eigenvalues are exactly the discrete Fourier transform of the first row.

Invertibility criterion

The matrix CC is invertible if and only if every eigenvalue is nonzero:

C is invertible  ⟺  p(ωm)≠0for every m=0,…,n−1.C\text{ is invertible} \iff p(\omega_m)\ne 0\quad\text{for every }m=0,\ldots,n-1.

Equivalently, p(z)p(z) and zn−1z^n-1 have no common root. This gives a quick test without calculating a determinant.

When the matrix is invertible, its inverse has eigenvalues

1p(ωm),\frac{1}{p(\omega_m)},

because the eigenvalues of an inverse matrix are the reciprocals of the original nonzero eigenvalues.

Formula for the inverse

Write the first row of C−1C^{-1} as

(d0,d1,…,dn−1).(d_0,d_1,\ldots,d_{n-1}).

Then the coefficients are obtained using the inverse DFT:

dr=1n∑m=0n−1ωm−rp(ωm),r=0,1,…,n−1.d_r=\frac{1}{n}\sum_{m=0}^{n-1}\frac{\omega_m^{-r}}{p(\omega_m)}, \qquad r=0,1,\ldots,n-1.

Therefore,

C−1=circ⁡(d0,d1,…,dn−1).C^{-1}=\operatorname{circ}(d_0,d_1,\ldots,d_{n-1}).

The same result can be expressed polynomially. Define

q(z)=d0+d1z+⋯+dn−1zn−1.q(z)=d_0+d_1z+\cdots+d_{n-1}z^{n-1}.

Then qq is the unique polynomial of degree less than nn satisfying

p(z)q(z)≡1(modzn−1).p(z)q(z)\equiv 1\pmod{z^n-1}.

In practical terms, multiply p(z)q(z)p(z)q(z) and reduce every znz^n to 11; the result must be 11.

Worked example

Consider

C=(210021102).C=\begin{pmatrix} 2&1&0\\ 0&2&1\\ 1&0&2 \end{pmatrix}.

Its first row gives

p(z)=2+z.p(z)=2+z.

The cube roots of unity are 11, ω\omega, and ω2\omega^2, where ω3=1\omega^3=1 and ω≠1\omega\ne1. The eigenvalues are

2+1=3,2+ω,2+ω2.2+1=3, \qquad 2+\omega, \qquad 2+\omega^2.

None is zero, so CC is invertible.

To find the first row of the inverse, seek

q(z)=d0+d1z+d2z2q(z)=d_0+d_1z+d_2z^2

such that

(2+z)q(z)≡1(modz3−1).(2+z)q(z)\equiv1\pmod{z^3-1}.

Try

q(z)=19(4−2z+z2).q(z)=\frac{1}{9}(4-2z+z^2).

Indeed,

(2+z)(4−2z+z2)=8−4z+2z2+4z−2z2+z3=8+z3≡9(modz3−1).\begin{aligned} (2+z)(4-2z+z^2) &=8-4z+2z^2+4z-2z^2+z^3\\ &=8+z^3\\ &\equiv9\pmod{z^3-1}. \end{aligned}

Hence

q(z)=49−29z+19z2,q(z)=\frac{4}{9}-\frac{2}{9}z+\frac{1}{9}z^2,

so

C−1=(49−29191949−29−291949).C^{-1}=\begin{pmatrix} \frac49&-\frac29&\frac19\\ \frac19&\frac49&-\frac29\\ -\frac29&\frac19&\frac49 \end{pmatrix}.

Direct multiplication confirms that CC−1=ICC^{-1}=I.

A computational procedure

For a large matrix, use the following algorithm:

  1. Read the first row (c0,…,cn−1)(c_0,\ldots,c_{n-1}).
  2. Compute its DFT, obtaining λm=p(ωm)\lambda_m=p(\omega_m).
  3. Check whether any λm\lambda_m is zero or numerically very close to zero.
  4. Replace each eigenvalue by 1/λm1/\lambda_m.
  5. Apply the inverse DFT.
  6. Use the resulting vector as the first row of C−1C^{-1}.

Using fast Fourier transforms, this can be done in approximately O(nlog⁡n)O(n\log n) operations rather than the O(n3)O(n^3) work of ordinary dense matrix inversion. For numerical calculations, if all eigenvalues are nonzero but the smallest is very small in magnitude compared with the largest, the matrix may be poorly conditioned; for a circulant matrix, κ2(C)=max⁡m∣λm∣/min⁡m∣λm∣\kappa_2(C)=\max_m|\lambda_m|/\min_m|\lambda_m|.

Common mistakes

Confusing cyclic-shift conventions

Some authors define a circulant matrix using left shifts rather than right shifts. The eigenvalue formula may then use ωm−k\omega_m^{-k} instead of ωmk\omega_m^k. The invertibility criterion is unchanged, but the displayed first row of the inverse may be reversed cyclically.

Checking only the row sum

The value p(1)=c0+⋯+cn−1p(1)=c_0+\cdots+c_{n-1} is only one eigenvalue. A nonzero row sum does not guarantee invertibility; all nn values p(ωm)p(\omega_m) must be nonzero.

Assuming every circulant matrix is invertible

For example, the all-ones matrix has first-row polynomial

p(z)=1+z+⋯+zn−1.p(z)=1+z+\cdots+z^{n-1}.

This polynomial vanishes at every nontrivial nnth root of unity, so the matrix is singular for n>1n>1.

Forgetting that the inverse remains circulant

Once one row of C−1C^{-1} has been found, the other rows are obtained by the same cyclic shifts. There is no need to compute every entry independently.

References

  1. Circulant Matrices, Philip J. Davis
  2. Matrix Computations, Gene H. Golub and Charles F. Van Loan

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.