Show that AB and BA can differ
Decide which of AB and BA exist for a rectangular pair. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.
Three separate statements, in increasing order of what they cost you:
1. * may not exist. exists when the columns of match the rows of. needs the columns of to match the rows of. For a rectangular pair, usually exactly one of those holds. 2. When both exist, they usually differ. Even for two square matrices of the same size, in general. 3. Some pairs do commute.** Two diagonal matrices, anything with the identity, a matrix with its own powers. Commuting is a special property of the pair.
What is always true is associativity:. The grouping never matters. The order does.
Mechanically. Entry of is row of dotted with column of. For it is row of dotted with column of. Those pair up different numbers — there is no reason for them to agree, and usually they do not. Write out both for a: has in its top-right corner, while has. Different terms.
Conceptually. Matrices act on vectors, and acting twice is a composition of two operations. "Turn left, then walk forward" is not the same as "walk forward, then turn left", even though both are two moves. Composition of functions is not commutative in general, and matrix multiplication is exactly composition.
This is why associativity survives while commutativity does not. Grouping three actions is free — do them in a different parenthesisation and it is still the same three actions in the same order. Reordering changes which action comes first.
is and is. Then is. What about? It needs's columns (that is) to match's rows (that is) — so is.
which is, while
is. Both products exist here, they have different sizes, and no entry of one can be compared with an entry of the other. "Are they equal?" is not even a well-formed question.
- Decide which of AB and BA exist for a rectangular pair
- Compute both products and compare them entry by entry
- Construct a pair with AB not equal to BA and explain the difference
Give a matrix that commutes with every matrix, and one that does not, and justify both in one sentence each.
Answer
Commutes with everything:. For any,, because scalars pass through a product.
Does not commute:. Take: then (trace, kills the first coordinate) but (trace, kills the second). Two different projections onto two different axes — the operations genuinely differ.
The general fact: the matrices that commute with everything are exactly the scalar multiples of the identity.