This post explains an easy and efficient way to implement the inverse of a 3x3 matrix. Itâ€™s based on vector operations like previous posts.

Given a 3x3 matrix:

We construct the following three vectors, one for each row of the matrix:

The inverse of the matrix is:

The expression is the determinant of like explained in a previous post. If the determinant is zero, then the matrix has no inverse. Note that the expression appears two times, so it only needs to be calculated once.

Pseudo-code: