Linear Algebra
Basic

Identity Matrix

The identity matrix leaves any matrix unchanged under multiplication.

Formula

AI=IA=AAI = IA = A

Variables

IIdentity matrix
AMatrix

Example

Any matrix A times the identity I returns A unchanged, like multiplying a number by 1.

How it works

The identity matrix is the square matrix with 1s on the main diagonal and 0s everywhere else. When it multiplies another matrix, each row/column entry is preserved because the 1s pick out matching components and the 0s contribute nothing, so the result is unchanged. This is the matrix version of multiplying a number by 1.

When to use it

Use this when checking matrix multiplication, simplifying algebra with matrices, or finding inverses and solving linear systems. It is also a basic tool in proofs and in computer graphics or engineering calculations involving transformations.

Worked example, step by step

Let A = [[4, -1], [7, 3]] and I = [[1, 0], [0, 1]]. Compute AI: AI = [[4, -1], [7, 3]] [[1, 0], [0, 1]] First row, first column: 4·1 + (-1)·0 = 4 First row, second column: 4·0 + (-1)·1 = -1 Second row, first column: 7·1 + 3·0 = 7 Second row, second column: 7·0 + 3·1 = 3 So AI = [[4, -1], [7, 3]] = A Now compute IA: IA = [[1, 0], [0, 1]] [[4, -1], [7, 3]] First row, first column: 1·4 + 0·7 = 4 First row, second column: 1·(-1) + 0·3 = -1 Second row, first column: 0·4 + 1·7 = 7 Second row, second column: 0·(-1) + 1·3 = 3 So IA = [[4, -1], [7, 3]] = A

Common mistakes to avoid

  • Using a non-square matrix as an identity matrix
  • Putting 1s in every position instead of only on the main diagonal
  • Assuming AI = IA for any matrices without checking that the dimensions allow the products

Did You Know?

The identity matrix is the number 1 of matrix multiplication — it leaves everything unchanged.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026