Matrix inversion using Gauss-Jordan method

Descriptions of inverting matrices using the Gauss-Jordan algorithm


This page describes how to calculate the inverse of a matrix using the Gauss-Jordan algorithm.

Only square matrices can have an inverse. But even for square matrices it is not always possible an inverse can be calculated.

A matrix for which there are no inverses is called a singular matrix. If the matrix has an inverse, the matrix is said to be non-singular.

Therefore, it is helpful, especially for large matrices, if we can determine whether an inverse exists before calculating. This can be done by calculating a single number for the matrix, the determinant that characterizes the matrix.

If the determinant is zero, it is a singular matrix and cannot be inverted. The description of how to calculate the determinant can be found here on another page.

Inverse matrix according to Gauss-Jordan algorithm

We are looking for the inverse of the matrix A

\(\displaystyle A= \begin{bmatrix}1 & 2 & 1 \\ 2 & 5 & -1 \\ 4 & 8 & 5 \end{bmatrix}\)

First we write an identity matrix next to the matrix A

\(\displaystyle \begin{bmatrix}1 & 2 & 1 \\ 2 & 5 & -1 \\ 4 & 8 & 5 \end{bmatrix} \begin{bmatrix}1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\)

The matrix A is then formed into a identity matrix by row transformation. To do this, the lines are reshaped until the result is achieved. All calculations that are carried out on the left must also be carried out on the right. If the left matrix is formed into the identity matrix, we have the inverse on the right.


Example


The following example shows the individual steps for the matrix above.

Subtract the first line twice from the second

\(\displaystyle \begin{bmatrix}1 & 2 & 1 \\ 0 & 1 & -3 \\ 4 & 8 & 5 \end{bmatrix} \begin{bmatrix}1 & 0 & 0 \\ -2 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}\)

Subtract the first line four times from the third

\(\displaystyle \begin{bmatrix}1 & 2 & 1 \\ 0 & 1 & -3 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}1 & 0 & 0 \\ -2 & 1 & 0 \\-4 & 0 & 1 \end{bmatrix}\)

Add the third line to the second three times

\(\displaystyle \begin{bmatrix}1 & 2 & 1 \\ 0 & 1 &0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}1 & 0 & 0 \\ -14 & 1 & 3 \\-4 & 0 & 1 \end{bmatrix}\)

Subtract the second line twice from the first

\(\displaystyle \begin{bmatrix}1 & 0 & 1 \\ 0 & 1 &0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}29 & -2 & -6 \\ -14 & 1 & 3 \\-4 & 0 & 1 \end{bmatrix}\)

Subtract the third line once from the first

\(\displaystyle \begin{bmatrix}1 & 0 & 0 \\ 0 & 1 &0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix}33 & -2 & -7 \\ -14 & 1 & 3 \\-4 & 0 & 1 \end{bmatrix}\)

Matrix inverse online calculator


Matrices Definition
Matrices Calculation
Matrices Addition
Matrices Subtraction
Matrices Multiplication
Matrices Inverse Cramer method
Matrices Inverse Gauss-Jordan
Matrices and Simultaneous Equations
Matrices and Determinants
Row Operations of Matrices
Matrices and Geometry, Reflection
Matrices and Geometry, Plane Rotation



Is this page helpful?            
Thank you for your feedback!

Sorry about that

How can we improve it?