Formula for 3×3 Matrix Inverse

Let \displaystyle A=\begin{pmatrix}a &b &c\\  d& e& f\\  g& h& i  \end{pmatrix}.

Then,
\displaystyle A^{-1}=\frac{1}{\det(A)}\begin{pmatrix}  ei-fh &ch-bi &bf-ce\\  fg-di &ai-cg &cd-af\\  dh-eg &bg-ah &ae-bd  \end{pmatrix}.

This method is about the same speed as the Gaussian-Elimination method. However, if you have already calculated det(A), using the formula may be slightly faster.

The formula provides an insight on why A is singular (not invertible) if det(A)=0. (Because, if det(A)=0, in the formula we would be dividing by 0 which is not allowed.)