Solution:
Concept: The product AB exists only when the number of columns of A equals the number of rows of B. The element in row i, column j of AB is found by multiplying the elements of row i of A by the matching elements of column j of B and adding the results. If A is m×n and B is n×p, then AB is m×p. Two matrices are equal only when they have the same order and every element of one equals the element in the same position (same row, same column) of the other. So one matrix equation gives one ordinary equation for each position.
Given: All three matrices are 2 × 2, so both products are possible and are 2 × 2.
Step 1 — Work out BA.
B comes first, so we multiply the rows of B by the columns of A.
BA=[01−b0][a002]=[0×a+(−b)×01×a+0×00×0+(−b)×21×0+0×2]=[0+0a+00−2b0+0]=[0a−2b0]
Step 2 — Work out M2.
M2 means M×M.
M2=[11−11][11−11]=[1×1+(−1)×11×1+1×11×(−1)+(−1)×11×(−1)+1×1]=[1−11+1−1−1−1+1]=[02−20]
Step 3 — Compare the elements.
Since BA=M2, the elements in the same positions are equal. Row 1, column 2 gives an equation in b: we divide both sides by −2.
−2bb=−2=−2−2=1
Row 2, column 1 gives a directly.
a=2
The two elements on the leading diagonal are 0 on both sides, so they agree.
Check: With a as 2 and b as 1, the product BA becomes [02−20], the same matrix as M2.
Watch out: The product is BA, not AB: B comes first. Working out AB instead gives different positions for a and b.
Therefore, a=2 and b=1.