Find Matrix Inverse Using Row Operations

Learn how to find the inverse of a matrix using elementary row operations. Step-by-step examples for 2x2, 3x3, and 4x4 matrices, as well as testing for invertibility, are presented below.

Page Content

Introduction

We present examples on how to find the inverse of a matrix using the three elementary row operations:

  1. Interchange two rows.
  2. Add a multiple of one row to another row.
  3. Multiply a row by a non-zero constant.

Examples with detailed solutions are included. You can also verify your work using the Inverse of a Matrix Using Row Reduction Calculator.

Inverse of a Matrix

Let \( A \) be an \( n \times n \) square matrix. If a matrix \( A^{-1} \) is the inverse of matrix \( A \), then: \[ A A^{-1} = I_n = A^{-1} A \] where \( I_n \) is the \( n \times n \) identity matrix.

To find the inverse matrix \( A^{-1} \), we form the augmented matrix \( [A \mid I_n] \) and apply row operations to reduce the left side to the identity matrix. If \( A \) is invertible, the row reduction process yields: \[ [I_n \mid A^{-1}] \] where the right side of the augmented matrix becomes \( A^{-1} \).

Examples with Solutions

Example 1: Inverse of a 2 by 2 Matrix

Find the inverse of the matrix:

\[ A = \begin{bmatrix} 1 & -1 \\ 2 & -1 \end{bmatrix} \] Solution

Write the augmented matrix \( [A \mid I_2] \):

\[ \begin{bmatrix} 1 & -1 & \mid & 1 & 0 \\ 2 & -1 & \mid & 0 & 1 \end{bmatrix} \]

Perform row operations to bring the left side into reduced row echelon form:

Subtract \( 2R_1 \) from \( R_2 \) (\( R_2 \to R_2 - 2R_1 \)):

\[ \begin{bmatrix} 1 & -1 & \mid & 1 & 0 \\ 0 & 1 & \mid & -2 & 1 \end{bmatrix} \]

Add \( R_2 \) to \( R_1 \) (\( R_1 \to R_1 + R_2 \)):

\[ \begin{bmatrix} 1 & 0 & \mid & -1 & 1 \\ 0 & 1 & \mid & -2 & 1 \end{bmatrix} \]

The augmented matrix is now in the form \( [I_2 \mid A^{-1}] \), giving:

\[ A^{-1} = \begin{bmatrix} -1 & 1 \\ -2 & 1 \end{bmatrix} \]
Example 2: Inverse of a 3 by 3 Matrix

Find the inverse of the matrix:

\[ A = \begin{bmatrix} 2 & 1 & -1 \\ 3 & 1 & 0 \\ -1 & 0 & 2 \end{bmatrix} \] Solution

Write the augmented matrix \( [A \mid I_3] \):

\[ \begin{bmatrix} 2 & 1 & -1 & \mid & 1 & 0 & 0 \\ 3 & 1 & 0 & \mid & 0 & 1 & 0 \\ -1 & 0 & 2 & \mid & 0 & 0 & 1 \end{bmatrix} \]

Apply elementary row operations to achieve reduced row echelon form.

\( R_1 \to \frac{1}{2}R_1 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & \mid & \frac{1}{2} & 0 & 0 \\ 3 & 1 & 0 & \mid & 0 & 1 & 0 \\ -1 & 0 & 2 & \mid & 0 & 0 & 1 \end{bmatrix} \]

\( R_2 \to R_2 - 3R_1 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & \mid & \frac{1}{2} & 0 & 0 \\ 0 & -\frac{1}{2} & \frac{3}{2} & \mid & -\frac{3}{2} & 1 & 0 \\ -1 & 0 & 2 & \mid & 0 & 0 & 1 \end{bmatrix} \]

\( R_3 \to R_3 + R_1 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & \mid & \frac{1}{2} & 0 & 0 \\ 0 & -\frac{1}{2} & \frac{3}{2} & \mid & -\frac{3}{2} & 1 & 0 \\ 0 & \frac{1}{2} & \frac{3}{2} & \mid & \frac{1}{2} & 0 & 1 \end{bmatrix} \]

\( R_2 \to -2R_2 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & \mid & \frac{1}{2} & 0 & 0 \\ 0 & 1 & -3 & \mid & 3 & -2 & 0 \\ 0 & \frac{1}{2} & \frac{3}{2} & \mid & \frac{1}{2} & 0 & 1 \end{bmatrix} \]

\( R_3 \to R_3 - \frac{1}{2}R_2 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & \mid & \frac{1}{2} & 0 & 0 \\ 0 & 1 & -3 & \mid & 3 & -2 & 0 \\ 0 & 0 & 3 & \mid & -1 & 1 & 1 \end{bmatrix} \]

\( R_3 \to \frac{1}{3}R_3 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & \mid & \frac{1}{2} & 0 & 0 \\ 0 & 1 & -3 & \mid & 3 & -2 & 0 \\ 0 & 0 & 1 & \mid & -\frac{1}{3} & \frac{1}{3} & \frac{1}{3} \end{bmatrix} \]

\( R_2 \to R_2 + 3R_3 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & -\frac{1}{2} & \mid & \frac{1}{2} & 0 & 0 \\ 0 & 1 & 0 & \mid & 2 & -1 & 1 \\ 0 & 0 & 1 & \mid & -\frac{1}{3} & \frac{1}{3} & \frac{1}{3} \end{bmatrix} \]

\( R_1 \to R_1 + \frac{1}{2}R_3 \):

\[ \begin{bmatrix} 1 & \frac{1}{2} & 0 & \mid & \frac{1}{3} & \frac{1}{6} & \frac{1}{6} \\ 0 & 1 & 0 & \mid & 2 & -1 & 1 \\ 0 & 0 & 1 & \mid & -\frac{1}{3} & \frac{1}{3} & \frac{1}{3} \end{bmatrix} \]

\( R_1 \to R_1 - \frac{1}{2}R_2 \):

\[ \begin{bmatrix} 1 & 0 & 0 & \mid & -\frac{2}{3} & \frac{2}{3} & -\frac{1}{3} \\ 0 & 1 & 0 & \mid & 2 & -1 & 1 \\ 0 & 0 & 1 & \mid & -\frac{1}{3} & \frac{1}{3} & \frac{1}{3} \end{bmatrix} \]

The resulting matrix on the right is the inverse \( A^{-1} \):

\[ A^{-1} = \begin{bmatrix} -\frac{2}{3} & \frac{2}{3} & -\frac{1}{3} \\ 2 & -1 & 1 \\ -\frac{1}{3} & \frac{1}{3} & \frac{1}{3} \end{bmatrix} \]
Example 3: Inverse of a 4 by 4 Matrix

Find the inverse of the matrix:

\[ A = \begin{bmatrix} 0 & 1 & -1 & 1 \\ 2 & 2 & 0 & -2 \\ 1 & 1 & -2 & 0 \\ 0 & 1 & 2 & 0 \end{bmatrix} \] Solution

Write the augmented matrix \( [A \mid I_4] \):

\[ \begin{bmatrix} 0 & 1 & -1 & 1 & \mid & 1 & 0 & 0 & 0 \\ 2 & 2 & 0 & -2 & \mid & 0 & 1 & 0 & 0 \\ 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \end{bmatrix} \]

Interchange \( R_1 \) and \( R_3 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 2 & 2 & 0 & -2 & \mid & 0 & 1 & 0 & 0 \\ 0 & 1 & -1 & 1 & \mid & 1 & 0 & 0 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \end{bmatrix} \]

Interchange \( R_2 \) and \( R_4 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \\ 0 & 1 & -1 & 1 & \mid & 1 & 0 & 0 & 0 \\ 2 & 2 & 0 & -2 & \mid & 0 & 1 & 0 & 0 \end{bmatrix} \]

\( R_4 \to R_4 - 2R_1 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \\ 0 & 1 & -1 & 1 & \mid & 1 & 0 & 0 & 0 \\ 0 & 0 & 4 & -2 & \mid & 0 & 1 & -2 & 0 \end{bmatrix} \]

\( R_3 \to R_3 - R_2 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \\ 0 & 0 & -3 & 1 & \mid & 1 & 0 & 0 & -1 \\ 0 & 0 & 4 & -2 & \mid & 0 & 1 & -2 & 0 \end{bmatrix} \]

\( R_4 \to R_4 + \frac{4}{3}R_3 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \\ 0 & 0 & -3 & 1 & \mid & 1 & 0 & 0 & -1 \\ 0 & 0 & 0 & -\frac{2}{3} & \mid & \frac{4}{3} & 1 & -2 & -\frac{4}{3} \end{bmatrix} \]

\( R_4 \to -\frac{3}{2}R_4 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \\ 0 & 0 & -3 & 1 & \mid & 1 & 0 & 0 & -1 \\ 0 & 0 & 0 & 1 & \mid & -2 & -\frac{3}{2} & 3 & 2 \end{bmatrix} \]

\( R_3 \to R_3 - R_4 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \\ 0 & 0 & -3 & 0 & \mid & 3 & \frac{3}{2} & -3 & -3 \\ 0 & 0 & 0 & 1 & \mid & -2 & -\frac{3}{2} & 3 & 2 \end{bmatrix} \]

\( R_3 \to -\frac{1}{3}R_3 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 2 & 0 & \mid & 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 & \mid & -1 & -\frac{1}{2} & 1 & 1 \\ 0 & 0 & 0 & 1 & \mid & -2 & -\frac{3}{2} & 3 & 2 \end{bmatrix} \]

\( R_2 \to R_2 - 2R_3 \):

\[ \begin{bmatrix} 1 & 1 & -2 & 0 & \mid & 0 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 & \mid & 2 & 1 & -2 & -1 \\ 0 & 0 & 1 & 0 & \mid & -1 & -\frac{1}{2} & 1 & 1 \\ 0 & 0 & 0 & 1 & \mid & -2 & -\frac{3}{2} & 3 & 2 \end{bmatrix} \]

\( R_1 \to R_1 + 2R_3 \):

\[ \begin{bmatrix} 1 & 1 & 0 & 0 & \mid & -2 & -1 & 3 & 2 \\ 0 & 1 & 0 & 0 & \mid & 2 & 1 & -2 & -1 \\ 0 & 0 & 1 & 0 & \mid & -1 & -\frac{1}{2} & 1 & 1 \\ 0 & 0 & 0 & 1 & \mid & -2 & -\frac{3}{2} & 3 & 2 \end{bmatrix} \]

\( R_1 \to R_1 - R_2 \):

\[ \begin{bmatrix} 1 & 0 & 0 & 0 & \mid & -4 & -2 & 5 & 3 \\ 0 & 1 & 0 & 0 & \mid & 2 & 1 & -2 & -1 \\ 0 & 0 & 1 & 0 & \mid & -1 & -\frac{1}{2} & 1 & 1 \\ 0 & 0 & 0 & 1 & \mid & -2 & -\frac{3}{2} & 3 & 2 \end{bmatrix} \]

The resulting matrix on the right is the inverse \( A^{-1} \):

\[ A^{-1} = \begin{bmatrix} -4 & -2 & 5 & 3 \\ 2 & 1 & -2 & -1 \\ -1 & -\frac{1}{2} & 1 & 1 \\ -2 & -\frac{3}{2} & 3 & 2 \end{bmatrix} \]
Example 4: Noninvertible Matrix

Find the inverse of the matrix:

\[ A = \begin{bmatrix} 1 & 2 & 0 \\ 0 & 1 & 3 \\ 1 & 4 & 6 \end{bmatrix} \] Solution

Write the augmented matrix \( [A \mid I_3] \):

\[ \begin{bmatrix} 1 & 2 & 0 & \mid & 1 & 0 & 0 \\ 0 & 1 & 3 & \mid & 0 & 1 & 0 \\ 1 & 4 & 6 & \mid & 0 & 0 & 1 \end{bmatrix} \]

Perform row operations:

\( R_3 \to R_3 - R_1 \):

\[ \begin{bmatrix} 1 & 2 & 0 & \mid & 1 & 0 & 0 \\ 0 & 1 & 3 & \mid & 0 & 1 & 0 \\ 0 & 2 & 6 & \mid & -1 & 0 & 1 \end{bmatrix} \]

\( R_3 \to R_3 - 2R_2 \):

\[ \begin{bmatrix} 1 & 2 & 0 & \mid & 1 & 0 & 0 \\ 0 & 1 & 3 & \mid & 0 & 1 & 0 \\ 0 & 0 & 0 & \mid & -1 & -2 & 1 \end{bmatrix} \]

The bottom row of the left matrix consists entirely of zeros. This indicates that the rows of matrix \( A \) are linearly dependent, meaning the matrix is singular and NOT invertible.

Note that the determinant of matrix \( A \) is equal to zero (\( \det(A) = 0 \)), which can be computed beforehand to quickly determine whether a square matrix is invertible.

More References and Links

  1. Matrix Inverse Questions with Solutions
  2. Linear Algebra Hub
  3. Identity Matrix
  4. Inverse of a Matrix Using Row Reduction Calculator
  5. Solve a System of Linear Equations by Elimination
  6. Elementary Matrices