Example 14: for two matrices
If
then
and
Clearly AB BA.
The entries differ (), so .
Want the reason behind every step, the basics and the checks?
In Example 13, because the two products had different sizes. Here both and are , so and are both , and still they differ. So non-commutativity is not just a matter of sizes: the order of the factors changes the answer itself. To show two same-size matrices are unequal, one entry that differs is enough.
- Given
- The matrices and .
- To show
- and are as stated, and .
- Plan
- Compute all four entries of each product, compare them entry by entry, and then look at the picture behind the numbers: and are two reflections, and doing two reflections in a different order gives a different result.
Basics you need
The entry of is row of times column of . For matrices: . Basics: pair up, multiply, add
Same order and every corresponding entry equal. So one unequal entry proves two matrices of the same order are different. Lesson: equality of matrices
A square matrix has as many rows as columns. A diagonal matrix is a square matrix whose entries off the main diagonal are all 0; here is diagonal. Lesson: types of matrices
Solution
Both products are defined and both are
and are square of the same order 2. For : , inner sizes equal, result . For : the same. So and exist and have the same order.
This is the case the textbook raises after Example 13: "perhaps AB and BA could be the same if they were of the same order". We now test that guess.If and are square matrices of the same order, both and are defined (Remark after Example 12). Basics: rows, columns and the addressCompute
Rows of : and . Columns of : and .
Multiplying on the left by keeps row 1 of and changes the sign of row 2: multiplies the first row by 1 and the second row by . Row 2 of is , so it becomes .Compute
Rows of : and . Columns of : and . Write :
Multiplying by on the right acts on columns instead: it keeps column 1 of and changes the sign of column 2. Column 2 of is , which becomes . Acting on rows and acting on columns are different operations, which is the root of .Compare entry by entry
Both are , so we compare corresponding entries. The entries are in and in . They are different, so .
In fact the entries differ too ( against ), and every entry of is the negative of the matching entry of : .
Equality needs all corresponding entries equal, so a single mismatch is a complete proof of inequality. Matching orders did not rescue commutativity: matrix multiplication is not commutative, even for square matrices of the same order.Definition 2, Section 3.3.1: equal matrices have the same order and equal corresponding entries. Lesson: equality of matricesThe picture behind the numbers (beyond the textbook)
This step is not in the textbook's solution and is not needed for the answer; it shows what the two matrices do. Multiply each matrix by a column :
So reflects a point in the -axis and reflects it in the line . means "apply first, then ", and means "apply first, then ". For :
first, then :
first, then :
Beyond the textbook: reflects in the -axis and reflects in the line . Starting from , doing then (that is, ) ends at , but doing then (that is, ) ends at . The two routes end at different points, so the two products cannot be the same matrix. Check with the matrices of Steps 2 and 3: sends to , and sends it to . The grouping is the associative law of Section 3.4.6.Writing means acts first: the factor nearest the column acts on it first. Lesson: properties of the operationsNot every pair fails: the textbook's note
Non-commutativity means is not guaranteed, not that it always fails. The textbook's Note gives diagonal matrices:
Entry by entry, the first product is , , , ; the second is , , , .
For diagonal matrices of the same order, each product just multiplies the diagonal entries in matching places: and . Multiplication of numbers is commutative, so the products agree. Our is not diagonal, so the Note does not apply to the pair , of this example. (Being non-diagonal does not by itself force : for instance every square matrix commutes with itself. For our pair, Step 4 is what proves it.)
Both are but their entries differ (), so , as the textbook states. Matrix multiplication is not commutative.
Apply both products to the column . gives . gives . Different outputs for the same input, so the matrices differ; and , confirming .
- Believing same order means . This example is the counterexample.
- Overcorrecting. in general does not mean for every pair; diagonal matrices of the same order commute.
- Reading as "A first". Acting on a column, : acts first.
- Sign slips with . , not .
- To show two matrices of the same order are unequal, exhibit one position where the entries differ.
- Left multiplication by a diagonal matrix scales rows; right multiplication scales columns. These are different, which is one way to see why order matters.
- Geometrically, means "do , then ". Two reflections done in different orders usually end in different places.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Square matrices of the same order: and both defined | Step 1 | Remark after Example 12, Section 3.4.5 |
| Steps 2, 3 and 6 | Section 3.4.5, definition of the product (Lesson: matrix multiplication) | |
| Equality of matrices | Step 4 | Definition 2, Section 3.3.1 |
| and as reflections of the plane | Step 5 | Beyond the textbook (not needed for the solution) |
| Step 5 | Associative law, Section 3.4.6 (Lesson: properties) | |
| Diagonal matrices of the same order commute | Step 6 | Note after Example 14, Section 3.4.5; diagonal matrix, Section 3.3 (Lesson: types) |
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 →