On this page
If a square matrix has zeros everywhere except its main diagonal, finding its inverse takes seconds: flip each diagonal entry upside down. No cofactors, no adjoint. Here is why that works, when it fails, and how the same reason gives you any power of the matrix in one line, a shortcut worth having for Class 12 and JEE Main matrix work.
What is the inverse of a diagonal matrix?
A diagonal matrix is a matrix whose entries outside the main diagonal are all zero (Wikipedia: Diagonal matrix). It is square and is usually written diag(c₁, c₂, …, cₙ) (Wolfram MathWorld). If you need a refresher on how it differs from scalar and identity matrices, see our guide to telling diagonal, scalar and identity matrices apart.
The rule: diag(a₁, …, aₙ) is invertible if and only if every aᵢ is nonzero, and then its inverse is diag(1/a₁, …, 1/aₙ) (Wikipedia: Diagonal matrix).
So for D = diag(4, −2, 5), you get D⁻¹ = diag(1/4, −1/2, 1/5). Signs stay; each entry flips.
Why does the inverse just take reciprocals?
Because diagonal matrices multiply entry by entry: diag(a₁, …, aₙ) times diag(b₁, …, bₙ) is diag(a₁b₁, …, aₙbₙ) (Wikipedia: Diagonal matrix). Entry (i, j) of the product is a sum of terms aᵢₖbₖⱼ, and a term survives only if k = i and k = j. When i ≠ j that cannot happen, so off-diagonal entries stay zero and each diagonal entry is just aᵢbᵢ.
Now choose bᵢ = 1/aᵢ. Every product aᵢbᵢ is 1, so you get the identity matrix, in either order. A matrix B with AB = BA = I is uniquely determined by A and is called its inverse (Wikipedia: Invertible matrix). So the reciprocals are not just one possible answer. They are the only answer.
There is a picture behind this too. The matrix diag(2, 1/2) stretches the x-direction by 2 and squashes the y-direction to half, turning a circle into the flat ellipse in the diagram above. To undo it, shrink x by half and stretch y by 2: that is diag(1/2, 2). Our post on how an inverse matrix undoes a transformation shows this view for general matrices.
What about a zero on the diagonal? The determinant of diag(c₁, …, cₙ) is the product c₁c₂⋯cₙ (Wolfram MathWorld), and a matrix is invertible if and only if its determinant is nonzero (Wikipedia: Invertible matrix). One zero entry makes the whole product zero: that direction is squashed flat, and nothing can stretch it back.
How do you find powers of a diagonal matrix?
Use the same entry-by-entry rule again and again. D² = D × D = diag(a₁², …, aₙ²), and each extra factor of D multiplies every entry by its own aᵢ once more, so Dⁿ = diag(a₁ⁿ, …, aₙⁿ). Since D⁻¹ is also diagonal, negative powers follow the same rule: D⁻ⁿ = diag(a₁⁻ⁿ, …, aₙ⁻ⁿ).
Worked example: take D = diag(2, −1, 1/3).
Check the diagonal for zeros: there are none, so D⁻¹ exists.
Flip each entry: D⁻¹ = diag(1/2, −1, 3).
Raise each entry to the fifth power: D⁵ = diag(32, −1, 1/243).
For D⁻², square the entries of D⁻¹: D⁻² = diag(1/4, 1, 9).
Check with determinants: det D = 2 × (−1) × 1/3 = −2/3, and det D⁻¹ = 1/2 × (−1) × 3 = −3/2, which is 1 ÷ (−2/3), as it should be.
For a general matrix you must compute a few powers and guess the pattern; our walk-through on finding Aⁿ by spotting the pattern shows that longer route.
Why do diagonal matrices matter for powers of any matrix?
Many matrices can be turned into diagonal ones. If A has n independent eigenvectors, you can write A = SΛS⁻¹, where Λ is a diagonal matrix of the eigenvalues of A (MIT OpenCourseWare 18.06SC, Diagonalization and powers of A). Then A² = SΛS⁻¹SΛS⁻¹ = SΛ²S⁻¹, because the S⁻¹S in the middle cancels, and in the same way Aᵏ = SΛᵏS⁻¹. The hard power of A becomes the easy diagonal power of Λ.
Four traps to check before you write D⁻¹
Is it really diagonal? The reciprocal rule needs every off-diagonal entry to be zero. The triangular matrix with rows (1, 1) and (0, 1) has inverse with rows (1, −1) and (0, 1), which is not entry-by-entry reciprocals.
Is there a zero on the diagonal? Then there is no inverse.
Did you flip the zeros? Off-diagonal zeros stay zero; only diagonal entries get reciprocals.
Did you change a sign? The reciprocal of −2 is −1/2, not 1/2.
If the rule makes sense but you keep choosing the wrong method on mixed matrix questions, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If the gap is earlier, in what diagonal, scalar or identity matrices are, each idea has its own lesson in the Fermi Concept Library.
Next time you meet a diagonal matrix: scan for zeros, flip, and move on.



