Matrix inverse
Left and Right Inverse
Inverse via Cofactor Matrix
Inverse via Gaussian Elimination
The gaussian elimination method can be extended to calculate the inverse of a matrix. Because the inverse of a matrix is only defined for square matrices, this algorithm only works for square matrices such as matrices, matrices, .
Just like when solving a system of linear equations, we first transform the matrix into an augmented matrix. However, instead of having the constants on the right side of the vertical line we add the identity matrix of the same size as the matrix on the right side of the vertical line.
Given the matrix:
We can calculate the inverse of by transforming it into the following augmented matrix:
The goal of the algorithm is now to transform the left side of the augmented matrix into the identity matrix . We are still only allowed to perform the same operations as before:
- Swapping two rows
- Multiplying a row by a nonzero number
- Adding a multiple of one row to another row, the multiple can also be negative resulting in subtracting a multiple of one row from another row.
Important it is important that when we perform an operation on the left side of the augmented matrix, we also perform the same operation on the right side!
By then transforming the left hand side firts into row echelon form and then into reduced row echelon form and then lastly performing back substitution we should get on the left hand side the identity matrix and on the right hand side the inverse of the matrix so that we have:
Which fullfills the definition of the inverse of a matrix:
This gives us the inverse of the matrix :