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.
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
This matrix is . On the left, use , because the identity needs three columns to match the three rows of .
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 , because the two columns of must match two rows of the identity.
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 matrix,
A square matrix uses on either side. A matrix uses on the left and on the right. Both products return the original matrix.