# The Inverse and Determinants of 2x2 and 3x3 Matrices

*For those people who need instant formulas!*

The general way to calculate the inverse of any square matrix, is to append a unity matrix after the matrix (i.e. [A | I]), and then do a row reduction until the matrix is of the form [I | B], and then B is the inverse of A. There is also a general formula based on matrix conjugates and the determinant.

In the following, DET is the determinant of the matrices at the left-hand side.
## The inverse of a 2x2 matrix:

| a_{11} a_{12} |-1 | a_{22} -a_{12} |
| a_{21} a_{22} | = 1/DET * | -a_{21} a_{11} |
with DET = a_{11}a_{22}-a_{12}a_{21}

## The inverse of a 3x3 matrix:

| a_{11} a_{12} a_{13} |-1 | a_{33}a_{22}-a_{32}a_{23} -(a_{33}a_{12}-a_{32}a_{13}) a_{23}a_{12}-a_{22}a_{13} |
| a_{21} a_{22} a_{23} | = 1/DET * | -(a_{33}a_{21}-a_{31}a_{23}) a_{33}a_{11}-a_{31}a_{13} -(a_{23}a_{11}-a_{21}a_{13}) |
| a_{31} a_{32} a_{33} | | a_{32}a_{21}-a_{31}a_{22} -(a_{32}a_{11}-a_{31}a_{12}) a_{22}a_{11}-a_{21}a_{12} |
with DET = a_{11}(a_{33}a_{22}-a_{32}a_{23})-a_{21}(a_{33}a_{12}-a_{32}a_{13})+a_{31}(a_{23}a_{12}-a_{22}a_{13})

*Alexander Thomas*

www.dr-lex.be