·
a
b
c
d
x
y
z
AC
i
Randomize
Formula for multiplying two 2×2 matrices
Let A have rows (a, b) and (c, d), and let B have rows (e, f) and (g, h). The product AB is again a 2×2 matrix, and each of its entries is a row of A times a column of B:
AB = [ a·e + b·g a·f + b·h ; c·e + d·g c·f + d·h ]
The entry in row i and column j uses row i of A and column j of B. Multiply the first entries together, multiply the second entries together, and add the two products. A 2×2 product therefore takes eight multiplications and four additions.
Worked example
Let A have rows (1, 2) and (3, 4), and let B have rows (5, 6) and (7, 8).
Top left: 1·5 + 2·7 = 19. Top right: 1·6 + 2·8 = 22. Bottom left: 3·5 + 4·7 = 43. Bottom right: 3·6 + 4·8 = 50.
So AB has rows (19, 22) and (43, 50).
The order matters
Matrix multiplication is not commutative. Multiply the same two matrices in the other order and the rows of B meet the columns of A: BA has rows (5·1 + 6·3, 5·2 + 6·4) = (23, 34) and (7·1 + 8·3, 7·2 + 8·4) = (31, 46). That is a different matrix from AB.
Two things do carry over from ordinary numbers. Multiplying by the identity matrix, with rows (1, 0) and (0, 1), changes nothing. And the determinant of a product is the product of the determinants: here det(A) = −2, det(B) = −2 and det(AB) = 19·50 − 22·43 = 4.
The calculator above is set to two 2×2 matrices. Use the swap button between them to exchange A and B and see how the product changes.