The identity matrix
The main diagonal of a square matrix runs from the top left entry to the bottom right. The identity matrix, I, has 1 in every place on the main diagonal and 0 everywhere else.
There is one identity of each size. The 2 × 2 identity is (1 0; 0 1), and the 3 × 3 identity is (1 0 0; 0 1 0; 0 0 1). In every identity, the entry in row i, column j is 1 when i = j and 0 when i and j differ.
Why multiplying by I changes nothing
Take A = (4 1; 2 3). Column 1 of I is 1 above 0, so row 1 of A with column 1 of I gives 4 × 1 + 1 × 0 = 4: it keeps the first entry of the row and multiplies the second by 0. Column 2 of I is 0 above 1, so row 1 of A with it gives 4 × 0 + 1 × 1 = 1, the second entry of the row.
Row 2 of A works the same way, giving 2 × 1 + 3 × 0 = 2 and 2 × 0 + 3 × 1 = 3. Each column of I picks out one entry of each row, in its own place, so AI = (4 1; 2 3) = A. The identity does for matrices what 1 does for numbers: 7 × 1 = 7.
Row 1 of A meets column 2 of I: 4 × 0 + 1 × 1 = 1. The 0 removes the 4 and the 1 keeps the 1, so the entry comes back unchanged.
From either side
In IA, the rows of I meet the columns of A. Row 1 of I is 1, 0, so it keeps the top entry of each column of A, and row 2 of I is 0, 1, so it keeps the bottom entry. So IA = A as well.
Matrix multiplication is not commutative in general, but AI = IA = A for every square matrix A of the same size as I. The identity commutes with everything it can multiply on both sides.
For a matrix that is not square, the identity on each side must be the right size. If P is 2 × 3, then with the 2 × 2 identity on the left, and with the 3 × 3 identity on the right. cannot be found, because has 3 columns and P has 2 rows.
Row 2 of I meets column 1 of A: 0 × 4 + 1 × 2 = 2, the bottom entry of that column, back in its own place.
Ones everywhere is not the identity
The 1s have to sit on the diagonal with 0s around them. A matrix with 1 in every place adds the entries of each row instead: A times (1 1; 1 1) gives 4 × 1 + 1 × 1 = 5 in both places of the top row and 2 + 3 = 5 in both places of the bottom row, so the product is (5 5; 5 5).
A matrix of ones adds each row of A: 4 + 1 = 5 and 2 + 3 = 5. It does not leave A unchanged.
The zero matrix
The zero matrix, O, has 0 in every place. There is one of every order, square or not.
O does for addition what 0 does for numbers: A + O = A, because every entry has 0 added to it. And A − A = O, because every entry is taken from itself.
In a product, every pairing of a row with a column of O multiplies each entry by 0, so AO = O and OA = O, just as 7 × 0 = 0.
A minus itself is the zero matrix: 4 − 4, 1 − 1, 2 − 2 and 3 − 3 are all 0.
Where O differs from 0
For numbers, if ab = 0 then a = 0 or b = 0. That is not true for matrices. (1 0; 0 0) times (0 0; 0 1) is O: row 1 of the first is 1, 0, which meets the columns 0, 0 and 0, 1 to give 0 and 0, and row 2 is 0, 0, which gives 0 and 0. Yet neither matrix is O.
A matrix that is not O can even have O as its square. (0 1; 0 0) squared gives 0 × 0 + 1 × 0 = 0 and 0 × 1 + 1 × 0 = 0 on the top row, and 0 and 0 on the bottom row, so it is O.
Neither matrix is the zero matrix, but their product is: wherever the first has a 1, the second has a 0 to meet it.
The identity and the inverse
For numbers, , and is called the reciprocal of 5. For a square matrix A, a matrix B with AB = BA = I is called the inverse of A, written . The identity is what the inverse is defined by. The zero matrix has no inverse, because O times any matrix is O, never I.
The usual mistakes
Taking the identity to be all ones. (1 1; 1 1) adds the entries of each row; only 1s on the diagonal and 0s elsewhere leave A unchanged.
Giving I as the answer to AI. The identity is one of the two factors, and multiplying by it returns the other factor, A.
Giving A as the answer to AO. That is what multiplying by I does; multiplying by O gives O.
Putting a 1 off the diagonal of a 3 × 3 identity, or a 3 anywhere in it. Every identity holds only 1s and 0s, whatever its size, with 1 exactly where the row number and the column number agree.
A price list left unchanged
In the application below, two shops’ prices are a 2 × 3 matrix P. Multiplying P on the right by the 3 × 3 identity leaves every price where it is, and changing one 1 on the diagonal to 0.5 halves one item’s price at both shops.
Worked example: Half-Price Bread, and the Identity Matrix That Leaves a Price List Unchanged
Question Two shops, A and B, sell bread, milk and eggs. Their prices in dollars are P = 435624, with one row for each shop and one column for each item. A price change is made by multiplying P on the right by a 3 × 3 matrix. (a) Find PI, where I is the 3 × 3 identity matrix, and find P − PI. What does multiplying by I do to the prices? (b) On Friday bread is half price. Find PD for D = 0.500010001, and find P − PD. What does P − PD show?
1.The identity is I = 100010001. P is 2 × 3 and I is 3 × 3, so PI can be found and is 2 × 3, the same order as P.
The identity I = 100010001 has 1s down its leading diagonal. P is 2 × 3 and I is 3 × 3, so PI is 2 × 3. 2.Row 1 of P times column 1 of I: 4 × 1 + 3 × 0 + 5 × 0 = 4. Row 1 times column 2: 4 × 0 + 3 × 1 + 5 × 0 = 3. Each column of I picks out one price and multiplies the other two by 0.
Each column of I picks out one price and multiplies the other two by 0. 3.(a) Every entry comes back unchanged: PI = 435624 = P, and P − PI = O, the 2 × 3 zero matrix. Multiplying by I changes no price.
(a) PI = P, so P − PI = O, the zero matrix: multiplying by I changes no price. 4.D is I with its first 1 replaced by 0.5. Row 1 of P times column 1 of D: 4 × 0.5 + 3 × 0 + 5 × 0 = 2, and the other two columns of D pick out the prices as I does. So PD = 235324.
D is I with its first 1 replaced by 0.5: PD = 235324. 5.(b) P − PD = 200300: it is the saving, $2 on bread at shop A and $3 on bread at shop B, and nothing on milk or eggs. Check: half of $4 is $2 and half of $6 is $3.
(b) P − PD = 200300: the saving is $2 on bread at shop A and $3 at shop B.
Answer: (a) PI = P, so P − PI = O: multiplying by I changes no price; (b) PD = 235324 and P − PD = 200300, the saving: $2 on bread at shop A and $3 at shop B
Common mistakes
- Taking the identity to be the matrix with every entry 1. That matrix would add all three prices into every entry, giving 4 + 3 + 5 = 12; only 1s on the diagonal and 0s elsewhere leave each price where it is.
- Writing IP in place of PI. With I of order 3 × 3 and P of order 2 × 3, IP cannot be found, so this identity must stand on the right of P.