Example 13: Find and ; show
If
and
then find AB, BA. Show that AB BA.
is and is , so is and is .
Let .
Let .
is and is , so .
Want the reason behind every step, the basics and the checks?
Swapping the order of the factors changes which rows meet which columns, and it can even change the size of the answer. Here is and is , so is while is . Two matrices of different orders can never be equal, so follows the moment we know the orders. We still compute both products in full, as the question asks.
- Given
- of order and of order .
- To find / show
- and , and that .
- Plan
- Check both products are defined and find their orders. Compute the 4 entries of and the 9 entries of as row-times-column sums. Conclude using the definition of equal matrices.
Basics you need
If is and is , then is defined and is . Basics: rows, columns and the address
The entry of is row of times column of : pair the entries in order, multiply, add. Basics: pair up, multiply, add
Two matrices are equal only if they have the same order and every pair of corresponding entries is equal. Lesson: equality of matrices
, , : a product of two numbers of opposite sign is negative, of the same sign positive.
Solution
Check both products and find their orders
: is , is . Inner sizes , so is defined, of order .
: is , is . Inner sizes , so is defined, of order .
Write the orders side by side. The inner sizes must match for the product to exist; the outer sizes give the order of the answer. Swapping the factors changes the outer sizes, so and have different orders. This is the textbook's condition for both products to exist: with of order and of order , we need and . Here , , , , so both hold.Order of a product, Section 3.4.5. Lesson: matrix multiplicationCompute the four entries of
Rows of : and . Columns of : and .
Each row of has three entries and each column of has three, so every entry of is a sum of three products. Writing the products with their signs in brackets, such as , before adding is the surest way to keep the signs right.Compute the nine entries of
Now the rows come from : , , . The columns come from : , , . Each entry is a sum of two products. Write :
In the roles swap: rows of (length 2) meet columns of (length 2). That is why these sums have two terms, while those for had three. The two products are built from entirely different pairings, so there is no reason to expect them to agree.Conclude that
has order and has order . Equal matrices must have the same order, so .
We do not need to compare entries at all: there is no entry in to compare with the 11 in . Equality fails at the first requirement, the order.Definition 2, Section 3.3.1: and are equal if they are of the same order and for all . Lesson: equality of matricesWhat this shows about matrix multiplication
Even when both and exist, they need not be equal. The textbook goes on (Example 14) to show that this can happen even when and have the same order, so the failure is not only about sizes. Matrix multiplication is not commutative.
For numbers always. For matrices, the order of the factors decides which rows meet which columns, so in general you must keep the order exactly as written. See Example 14 for two matrices with .
is and is , so . This matches the textbook's solution.
A fact that is not in the textbook (a property of the trace) gives a neat test: the sum of the diagonal entries of always equals that of , whenever both products exist. Here and . They agree, which is good evidence that no diagonal entry was miscalculated.
A second spot check: entry of is row 2 of , , times column 3 of , , giving , as in Step 3.
- Thinking is " turned round". It is a different matrix, here not even the same size.
- Sign slips. and ; write the sign of every product before adding.
- Mixing up which matrix gives the rows. In the rows come from , the first factor, and the columns from .
- Comparing entries before orders. Different orders already settle .
- For of order and of order , is and is . If they cannot be equal.
- In a product the first factor supplies the rows and the second supplies the columns.
- Matrix multiplication is not commutative: never swap factors unless you have a reason.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| defined iff columns of = rows of ; order | Step 1 | Section 3.4.5 and the Remark after Example 12 (Lesson: matrix multiplication) |
| Steps 2 and 3 | Section 3.4.5, definition of the product | |
| Equal matrices have the same order and equal entries | Step 4 | Definition 2, Section 3.3.1 (Lesson: equality) |
| Matrix multiplication is not commutative | Step 5 | Section 3.4.5, "Non-commutativity of multiplication of matrices" |
| Diagonal sums of and are equal | Check box only | Beyond the syllabus (a property of the trace); not needed for the solution |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →