Inverse of Diagonal Matrix — Formula & Examples

Inverse of Diagonal Matrix — Formula & Examples

What the Inverse of a Diagonal Matrix Is

The inverse of a diagonal matrix is another diagonal matrix in which each main-diagonal entry is the reciprocal of the matching entry in the original, provided none of those entries is zero. A diagonal matrix is a square matrix whose only non-zero entries lie on the main diagonal — every off-diagonal entry is 0.

If you stopped reading here, you would have the answer: flip each diagonal number to 1 over itself, leave the zeros alone, and that is the inverse. The rest of the article proves why it works and shows exactly when it does not.

The Formula For a Diagonal Matrix

D=[d_1 & 0 & \cdots & 0 \ 0 & d_2 & \cdots & 0 \ \vdots & \vdots & \ddots & \vdots \ 0 & 0 & \cdots & d_n \end{bmatrix}
with every d_i ≠ 0, the inverse is

D^{-1}=[\frac{1}{d_1} & 0 & \cdots & 0 \ 0 & \frac{1}{d_2} & \cdots & 0 \ \vdots & \vdots & \ddots & \vdots \ 0 & 0 & \cdots & \frac{1}{d_n} \end{bmatrix}
Here d_1, d_2, …, d_n are the diagonal entries, and each becomes \frac{1}{d_i} in the inverse. No [determinant] and no adjugate are needed — a genuine shortcut compared with the general [inverse of a matrix].

A Short Proof

To confirm D^{-1} is the inverse, multiply it by D and check that the product is the [identity matrix]. The product of two diagonal matrices is diagonal, with each entry the product of the matching entries:

D⋅D^{-1}=[d_1 \cdot \frac{1}{d_1} & 0 \ 0 & d_2 \cdot \frac{1}{d_2} \end{bmatrix} = \begin{bmatrix} 1 & 0 \ 0 & 1 \end{bmatrix} = I

Each diagonal product is d_i \cdot \frac{1}{d_i} = 1, and every off-diagonal entry stays 0. The same check works the other way (D^{-1}⋅D = I), so D^{-1} is the inverse. This is exactly why the reciprocal rule holds.

Properties of the Inverse of a Diagonal Matrix

A few properties follow directly from the reciprocal rule and are worth stating on their own.

The first bullet is the one that decides everything: check the diagonal for a zero before you reach for reciprocals.

Examples of the Inverse of a Diagonal Matrix

Each example states the matrix in bold, then works the inverse.

Example 1

Find the inverse of B=[2 & 0 \ 0 & 7 \end{bmatrix}.

Replace each diagonal entry with its reciprocal:

B^{-1}=[\frac{1}{2} & 0 \ 0 & \frac{1}{7} \end{bmatrix}

Example 2

Find the inverse of D=[2 & 0 \ 0 & 0 \end{bmatrix}. (Watch the tempting move first.)

The instinct is to flip both entries: \frac{1}{2} and \frac{1}{0}.

But \frac{1}{0} is undefined. Check the reason: the second row is all zeros, so the determinant is 2×0=0. A zero determinant means the matrix is singular.

Conclusion: D has no inverse. A diagonal matrix with any zero on its diagonal cannot be inverted.

Example 3

Find the inverse of A=[2 & 0 & 0 \ 0 & -3 & 0 \ 0 & 0 & 5 \end{bmatrix}.

Take the reciprocal of each diagonal entry, carrying the sign:

A^{-1}=[\frac{1}{2} & 0 & 0 \ 0 & -\frac{1}{3} & 0 \ 0 & 0 & \frac{1}{5} \end{bmatrix}

Example 4

Find the inverse of C=[\frac{1}{4} & 0 \ 0 & \frac{2}{3} \end{bmatrix}.

The reciprocal of a fraction flips it:

C^{-1}=[4 & 0 \ 0 & \frac{3}{2} \end{bmatrix}

Example 5

Verify that the inverse of the identity matrix is itself.

The 2×2 identity is diagonal with entries 1 and 1. The reciprocal of 1 is 1:

I^{-1}=[1 & 0 \ 0 & 1 \end{bmatrix} = I

So the identity matrix is its own inverse.

Example 6

A scaling problem: matrix S=[3 & 0 \ 0 & 3 \end{bmatrix}.

Find the matrix that undoes the stretch:

S^{-1}=[\frac{1}{3} & 0 \ 0 & \frac{1}{3} \end{bmatrix}

Multiplying by S^{-1} shrinks each vector back by a factor of 3 — the geometric meaning of the reciprocal.

Why the Reciprocal Rule Works

The rule is not a lucky pattern — it comes straight from what a diagonal matrix does. Reading a diagonal matrix geometrically, it scales the first axis by d_1, the second by d_2, and so on. Its inverse must undo each scaling, and the undo of "multiply by d_i" is "multiply by \frac{1}{d_i}." Nothing gets mixed between axes, which is why the off-diagonal zeros stay zero.

This is where diagonal matrices earn their keep:

Where Students Trip Up on the Inverse of a Diagonal Matrix

Mistake 1: Inverting when a diagonal entry is zero

Where it slips in: applying the reciprocal rule on autopilot.

Don't do this: write \frac{1}{0} for a zero diagonal entry and keep going.

The correct way: first check that every diagonal entry is non-zero. If any is zero, the matrix is singular and has no inverse.

Mistake 2: Reciprocating the whole matrix, off-diagonal included

Where it slips in: confusing "reciprocal of the matrix" with "reciprocal of each diagonal entry."

Don't do this: try to take \frac{1}{0} on the off-diagonal zeros too.

The correct way: only the diagonal entries flip; the off-diagonal zeros stay 0. The inverse of a diagonal matrix is still diagonal.

Mistake 3: Dropping the sign

Where it slips in: entries like -3, where the reader takes \frac{1}{3} and forgets the minus.

Don't do this: write the inverse of -3 as \frac{1}{3}.

The correct way: the reciprocal of -3 is -\frac{1}{3} — the sign carries through. This is the same care needed when [solving matrices] with negative entries.

Key Takeaways

Practice Questions

Find each inverse, or state why it does not exist.

  1. Invert [4 & 0 \ 0 & 9 \end{bmatrix}.
  2. Invert [-2 & 0 \ 0 & 5 \end{bmatrix}.
  3. Invert [3 & 0 \ 0 & 0 \end{bmatrix}.
  4. Invert [1 & 0 & 0 \ 0 & -6 & 0 \ 0 & 0 & 2 \end{bmatrix}.
  5. Invert [\frac{2}{5} & 0 \ 0 & 10 \end{bmatrix}.

Answers

  1. [\frac{1}{4} & 0 \ 0 & \frac{1}{9} \end{bmatrix}
  2. [-\frac{1}{2} & 0 \ 0 & \frac{1}{5} \end{bmatrix}
  3. No inverse — the zero on the diagonal makes the matrix singular.
  4. [1 & 0 & 0 \ 0 & -\frac{1}{6} & 0 \ 0 & 0 & \frac{1}{2} \end{bmatrix}
  5. [\frac{5}{2} & 0 \ 0 & \frac{1}{10} \end{bmatrix}.