How to calculate the inverse of a matrix

Overview

A square matrix AA is said to be invertible if there is another matrix, CC such that, AC=IAC = I or CA=ICA = I, where II represents the identity matrix. Matrix CC is said to be the inverse of matrix AA and is denoted as A1A^{-1}:

Properties

An invertible matrix AA should fulfill the following identities:

  • A(A1)=(A1)A=IA(A^{-1}) = (A^{-1})A = I

  • (A1)1=A(A^{-1})^{-1} = A

  • (AT)1=(A1)T(A^T)^{-1} = (A^{-1})^T

  • (AB)1=B1A1(AB)^{-1} = B^{-1}A^{-1}

  • (Ak)1=(A1)k(A^k)^{-1} = (A^{-1})^k, where kk is a constant power of the matrix.

The invertible matrix AA must also maintain the following properties:

  • Matrix AA should be a square matrix with n×nn \times n dimensions.

  • The rows and columns of matrix AA must be linearly independent.

  • Any diagonal entry of matrix AA must not be zero.

  • The solution to Ax=bAx = b can be calculated as x=A1bx= A^{-1}b if matrix AA is invertible.

  • A square matrix AA with orthonormal columns follows the identity ATA=IA^TA = I. Hence, its inverse will be A1=ATA^{-1} = A^T.

The inverse of a 2×22 \times 2 matrix

Here's how we calculate the inverse of a 2×22 \times 2 matrix:

Note: If the determinant of matrix AA equals zero, the matrix is non-invertible.

Example

Let's consider the following matrix:

We can calculate the inverse of matrix AA using the following steps:

The inverse matrix will be as follows:

The inverse of a 3×33 \times 3 matrix

The inverse of a 3×33 \times 3 matrix can be calculated using any of these two methods:

  • The Gauss Jordan method

  • The Laplace expansion

The Gauss Jordan method

The Gauss Jordan procedure is an efficient and quick method to calculate the inverse of a matrix. It starts with two matrices, the invertible matrix AAand the identity matrix II. The identity matrix is transformed into the inverse matrix later:

Let's consider the following matrix:

The inverse of matrix AA can be calculated in the following way:

We can convert matrix AA into an identity matrix, II, using the Gauss Jordan procedure in the following way:

The right side of the matrix represents A1A^{-1}.

The Laplace expansion

The Laplace expansion is also known as the cofactor method used to calculate the determinant of an n×nn \times n matrix and calculate its inverse. A1A^{-1} is calculated in the following way:

Here the matrix's adjoint is the cofactor matrix's transpose, which is calculated using Cij=(1)i+jMijC_{ij} = (-1)^{i+j} M_{ij}.

Example

Let's see an example to clarify the procedure. Let's consider the following matrix:

The determinant of the matrix equals 4.

Note: To calculate the determinant of the matrix in detail, click here.

The matrix of cofactors CC can be calculated in the following way:

Calculating the cofactor matrix
1 of 10

The adjoint of matrix AA is the transpose of the cofactor matrix CC:

According to the formula, the inverse of matrix AA equals the following:

Quiz

Here are a few questions that you can practice:

Question 1

Calculate the determinant of the following matrix: A=[412020102]A = \begin{bmatrix} 4 & 1 & 2 \\ 0 & 2 & 0 \\ 1 & 0 & 2 \\ \end{bmatrix}

Show Answer
Question 2

Calculate the determinant of the following matrix: A=[1102314100131104]A = \begin{bmatrix} 1 & -1 & 0 & 2\\ 3 & 1 & 4 & 1 \\ 0 & 0 & 1 & 3\\ 1 & -1 & 0 & 4\\ \end{bmatrix}

Show Answer

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved