Algebra

How to Find the Inverse of a Matrix (2×2 and 3×3)

By Math Solving Space · · 2 min read

On this page
  1. The 2×2 formula
  2. Worked example 1
  3. Larger matrices: Gauss–Jordan elimination
  4. Worked example 2: a 3×3 matrix
  5. What inverses are used for
  6. Common mistakes
  7. Practice questions
  8. Frequently asked questions

The inverse of a square matrix AA is the matrix A−1A^{-1} with AA−1=IAA^{-1} = I, the identity. It exists only when the determinant is not zero. For a 2×2 matrix there is a quick formula; for larger matrices, row-reduce [A∣I][A \mid I] until the left side becomes II.

The 2×2 formula

(abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

Swap the diagonal, negate the other two entries, and divide by the determinant.

Worked example 1

A=(2153)A = \begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix}. The determinant is 2×3−1×5=12 \times 3 - 1 \times 5 = 1, so

A−1=(3−1−52)A^{-1} = \begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix}

Check: (2153)(3−1−52)=(1001)\begin{pmatrix} 2 & 1 \\ 5 & 3 \end{pmatrix}\begin{pmatrix} 3 & -1 \\ -5 & 2 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} ✓

Larger matrices: Gauss–Jordan elimination

  1. Write AA next to the identity: [A∣I][A \mid I].
  2. Use row operations (swap rows, scale a row, add a multiple of one row to another) to turn the left side into II.
  3. The right side is now A−1A^{-1}.

Worked example 2: a 3×3 matrix

A=(123014560)⇒A−1=(−2418520−15−4−541)A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix} \quad\Rightarrow\quad A^{-1} = \begin{pmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{pmatrix}

Its determinant is 1, which is why the inverse has whole-number entries.

What inverses are used for

Solving Ax=bA\mathbf{x} = \mathbf{b}: multiply both sides by A−1A^{-1} to get x=A−1b\mathbf{x} = A^{-1}\mathbf{b}. This is the matrix version of dividing.

Common mistakes

  • Negating the diagonal instead of the off-diagonal in the 2×2 formula.
  • Forgetting to divide by the determinant.
  • Assuming AB=BAAB = BA: matrix multiplication order matters.

Practice questions

  1. Inverse of (4726)\begin{pmatrix} 4 & 7 \\ 2 & 6 \end{pmatrix}?
  2. Does (1224)\begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix} have an inverse?
  3. What is I−1I^{-1}?

Answers: 1) 110(6−7−24)\frac{1}{10}\begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix} 2) No, the determinant is 0 3) II

The matrix calculator shows every row operation with exact fractions and checks AA−1=IAA^{-1} = I. Find determinants with the determinant calculator, explained in how to find the determinant.

Frequently asked questions

Can a non-square matrix have an inverse?

No. Only square matrices can have a (two-sided) inverse.

How do I check an inverse?

Multiply it by the original matrix. You should get the identity matrix.

Why do some inverses contain fractions?

Because you divide by the determinant. When the determinant is ±1, the entries stay whole numbers.

Open the calculator →

#matrices#linear algebra