# General Formula for the inverse of a 3×3 Matrix

This came about from some lunchtime fun a couple of days ago – we had an empty whiteboard and a boardpen: it was the logical thing to do.

$\textrm{let } M =\begin{pmatrix}a&b&c\\ d&e&f\\ g&h&i \end{pmatrix}.$
Now produce the matrix of minors

$\begin{pmatrix} ei-fh&di-fg&dh-eg\\ bi-ch&ai-cg&ah-bg\\ bf-ce&af-cd&ae-bd \end{pmatrix}.$

Use the alternating law of signs to produce the matrix of cofactors $M'$

$M' = \begin{pmatrix} ei-fh&fg-di&dh-eg\\ ch-bi&ai-cg&bg-ah\\ bf-ce&cd-af&ae-bd \end{pmatrix}$

Transpose $M'$

${M'}^T = \begin{pmatrix} ei-fh&ch-bi&bf-ce\\ fg-di&ai-cg&cd-af\\ dh-eg&bg-ah&ae-bd \end{pmatrix}$

$\textrm{det }M = a(ei-fh) - b(di-fg) + c(dh-eg)$

The grand formula:
$M^{-1} =$
$\frac{1}{a(ei-fh) - b(di-fg) + c(dh-eg)} \begin{pmatrix} ei-fh&ch-bi&bf-ce\\ fg-di&ai-cg&cd-af\\ dh-eg&bg-ah&ae-bd \end{pmatrix}$

I suggest you print it out and put it on your bedroom ceiling…

## 9 thoughts on “General Formula for the inverse of a 3×3 Matrix”

1. brian says:

This has some errors. The determinant is wrong; also the first row should have be

(ei – fh) (ch – ib) (bf – ce)

2. jebavarde says:

Sorry, made some typos when copying it out. Will correct.
Edit: think that’s all corrected now. Oops :P

3. Jared says:

THANKS :)

this site helped me so much in making a matrix program

haven’t seen a site that gives a single formula like this

the only other way would have been programming through that whole process of finding the determinant and minor cofactors and dividing and and and … well, that would have been so tedious :P

SO THANKS :D

4. Rahul says:

thanks for the 3×3 inverse squatrix formula. It really helped a ton!

5. Rahul says:

just wondering, what would be the correct determinant for this squatrix?

1. jebavarde says:

The determinant is now fixed I think, yeah.

6. akki says:

thanks dude…..

7. flora lee says:

thz 4 helping..finally i can solve it easily^^thank you so much^^