What is an identity matrix? Definition, dimensions, and examples

An identity matrix plays the role of 1 in matrix multiplication. Multiplying by the correctly sized identity returns the original matrix. Its size depends on which side of the matrix it appears on, so we’ll check both cases.

Put ones on the main diagonal

An identity matrix is square, with 1 in every main-diagonal position and 0 everywhere else.

I2=[1001]
I3=[100010001]

The subscript gives its number of rows and columns. In a row-column product, the single 1 selects the corresponding entry, while every zero contributes zero.

Choose the identity size on the left

A=[4-611-29]

This matrix is 3×2. On the left, use I3, because the identity needs three columns to match the three rows of A.

I3A=A

The first row of the identity selects row 1 of A, the second selects row 2, and the third selects row 3. The product has the same three rows as A.

Choose the identity size on the right

On the right, use I2, because the two columns of A must match two rows of the identity.

AI2=A

Here the identity columns preserve the two columns of A. The left and right identities have different sizes because A is rectangular.

Use the general rule

For an m×n matrix,

ImA=AAIn=A

A square n×n matrix uses In on either side. A 2×4 matrix uses I2 on the left and I4 on the right. Both products return the original 2×4 matrix.