Computing Library › Linear Algebra
Linear Algebra

The Identity Matrix

The square matrix with ones on the diagonal and zeros elsewhere acts as the multiplicative identity for matrices.

The neutral element

The identity matrix I_n is the n-by-n matrix with 1 on every diagonal entry and 0 everywhere else. It plays the role that the number 1 plays for scalars: for any conformable matrix A, both A I = A and I A = A. Multiplying a vector by I leaves it unchanged, so I represents the transformation that does nothing.

Identity I_3
100010001

Why it matters

The identity is the reference point for the inverse: a matrix A is invertible when there exists A^{-1} with A A^{-1} = A^{-1} A = I. It also appears in eigenvalue analysis through the expression A - lambda I, whose determinant gives the characteristic polynomial, and in regularization, where adding a small multiple of I to a matrix improves its conditioning.

Kronecker delta

The entries of the identity are the Kronecker delta: delta_ij equals 1 when i = j and 0 otherwise. This compact symbol is standard in physics and tensor notation, where it selects diagonal terms and contracts indices.

Scaling the identity

A scalar multiple cI is a scalar matrix; it scales every vector uniformly by c. Scalar matrices are the only matrices that commute with every other matrix of the same size, a fact tied to Schur's lemma in representation theory.

python
import numpy as np
I = np.eye(4)
A = np.random.rand(4, 4)
print(np.allclose(A @ I, A))   # True
print(np.allclose(I @ A, A))   # True

In iterative solvers used for large physics simulations, the identity anchors preconditioners: the closer a preconditioned operator is to I, the faster the iteration converges.