Why does the transpose of a matrix product equal B^T A^T rather than A^T B^T?
answer
- check whether the shapes even allow it
- transpose swaps a matrix's row and column counts
- the shared inner dimension must still line up
- the factors come out in reverse order
basics
~20 sTransposing swaps each matrix's row and column counts, so the factors must reverse for the shapes to line up. Entry (i,j) of (AB)^T is entry (j,i) of AB, which is row i of B^T dotted with column j of A^T.
solid answer
~40 sTwo arguments, and a strong answer gives both. **Shapes**: if `A` is `m x n` and `B` is `n x p`, then `AB` is `m x p` and `(AB)^T` is `p x m`. Transposing the factors gives `A^T` of shape `n x m` and `B^T` of shape `p x n`. Only `B^T A^T` is conformable — `(p x n)(n x m)` gives `p x m`, the right answer — whereas `A^T B^T` is `(n x m)(p x n)` and is undefined unless `m = p`. **Entries**: `[(AB)^T][i,j] = (AB)[j,i] = sum over k of A[j,k]*B[k,i] = sum over k of (B^T)[i,k]*(A^T)[k,j] = (B^T A^T)[i,j]`. The same reversal shows up in the inverse of a product, `(AB)^-1 = B^-1 A^-1`, and it chains: `(ABC)^T = C^T B^T A^T`.
go deeper
Memorise the identity and the shape reason behind it: transposing flips each matrix's dimensions, so the factors have to swap places for the product to be defined. Practise it on a small row-times-column example.
Derive it, do not just quote it. Give the shape argument, then the entry argument showing that (AB)^T at (i,j) equals (AB) at (j,i), and note that the rule chains through longer products.
Use shape checks as a routine correctness tool when manipulating expressions, and connect the reversal to the same behaviour of inverses. Be able to show in one line why A^T A is symmetric.
Treat order-reversing identities as a review checklist item. Sign, order and transpose errors in derivations are cheap to catch with a shape pass and expensive to catch downstream, and it is worth teaching that habit explicitly.
## What transpose does The transpose `A^T` of a matrix `A` reflects it across the main diagonal: row `i` of `A` becomes column `i` of `A^T`, so `(A^T)[i,j] = A[j,i]`. An `m x n` matrix transposes to an `n x m` matrix. Applying transpose twice returns the original, `(A^T)^T = A`, and transpose distributes over addition without any surprise: `(A + B)^T = A^T + B^T`. Multiplication is where the twist appears. ## The shape argument Start with `A` of shape `m x n` and `B` of shape `n x p`, so `AB` is `m x p` and therefore `(AB)^T` is `p x m`. Now look at what the transposed factors offer: ``` A^T is n x m B^T is p x n ``` Try the naive order first: `A^T B^T` is `(n x m)(p x n)`. The inner numbers are `m` and `p`, which have no reason to agree, so in general this expression does not even exist. Try the reversed order: `B^T A^T` is `(p x n)(n x m)`. The inner numbers are `n` and `n`; they match, and the result is `p x m` — precisely the shape `(AB)^T` must have. The shapes alone tell you that if any product of the transposed factors can equal `(AB)^T`, it has to be the reversed one. This is a good habit in general: when you are unsure of an identity, check whether the two sides can even have the same shape. It rules out the wrong version immediately, without arithmetic. ## The entrywise proof Shapes show which candidate is possible; the entry computation shows the identity is true. Take any valid indices `i` (from 1 to `p`) and `j` (from 1 to `m`): ``` [(AB)^T][i,j] = (AB)[j,i] by the definition of transpose = sum over k of A[j,k]*B[k,i] by the definition of the product = sum over k of B[k,i]*A[j,k] numbers commute = sum over k of (B^T)[i,k]*(A^T)[k,j] = (B^T A^T)[i,j] ``` The only step doing real work is the third: the individual entries are ordinary numbers, so they may be swapped inside the sum. The matrices themselves are not swapped — their indices are — and the effect of rewriting both index pairs in transposed form is that `B` moves to the front. ## A tiny worked check Let `A = [[1, 2]]`, a `1 x 2` row, and `B = [[3],[4]]`, a `2 x 1` column. Then `AB = [[11]]`, a `1 x 1` matrix, and `(AB)^T = [[11]]` as well. Now `A^T` is `2 x 1` and `B^T` is `1 x 2`, so `B^T A^T = [[3, 4]] [[1],[2]] = [[11]]`. Correct. Meanwhile `A^T B^T` is `(2 x 1)(1 x 2) = [[3, 4],[6, 8]]`, a `2 x 2` matrix — a perfectly legal product here, since `m = p = 1` happens to hold, but a completely different object from `(AB)^T`. It is a useful reminder that the wrong version is not always undefined; sometimes it exists and is simply wrong. ## Chaining and relatives The rule extends to longer products by applying it repeatedly: ``` (ABC)^T = C^T B^T A^T ``` The whole chain reverses. The same reversal governs inverses of products, `(AB)^-1 = B^-1 A^-1` whenever both inverses exist, and for the same underlying reason: both transpose and inversion are order-reversing operations on products. A memorable way to hold it is the socks-and-shoes picture — to undo "socks then shoes" you take off shoes first, then socks. Other facts worth having ready alongside the identity: a matrix is called **symmetric** when `A^T = A`, which forces it to be square; `A^T A` and `A A^T` are always defined for any `A` and are always symmetric, since `(A^T A)^T = A^T (A^T)^T = A^T A`. That last derivation is itself a one-line application of the reversal rule, which is why interviewers like the question — it is a small identity that shows up constantly the moment you start manipulating expressions. ## Common mistakes The dominant error is writing `(AB)^T = A^T B^T` by analogy with `(A + B)^T = A^T + B^T`. Addition is entrywise and order-blind, so it transposes term by term; multiplication mixes rows with columns, so it does not. The second common error is applying the rule but forgetting it chains — reversing only the outer two factors of a triple product. Check with shapes and both errors surface immediately.
- What is (ABC)^T for three conformable matrices?`C^T B^T A^T` — the entire chain reverses. Apply the two-factor rule twice: treat `AB` as one block, so `((AB)C)^T = C^T (AB)^T = C^T B^T A^T`. A shape check confirms it; reversing only the outer two factors is a common slip that a shape check catches instantly.
- Why is A^T A always a square symmetric matrix, whatever the shape of A?If `A` is `m x n`, then `A^T` is `n x m`, so `A^T A` is `(n x m)(m x n)` — defined and `n x n`. Symmetry follows from the reversal rule: `(A^T A)^T = A^T (A^T)^T = A^T A`. The same argument makes `A A^T` symmetric, but it is `m x m`, a different matrix in general.
- Why does (A + B)^T transpose term by term while (AB)^T reverses the factors?Addition is entrywise and order-blind: cell `(i,j)` of the sum depends only on cell `(i,j)` of each operand, so reflecting the sum reflects each term. Multiplication pairs rows of the left operand with columns of the right, and reflecting swaps those roles, which forces the factors to trade places.
Undoing a sequence runs it backwards: to reverse socks-then-shoes you remove the shoes first. Transpose reverses a product the same way, putting the last factor first.
saying these in an interview costs you the question
- Writes the transpose of a product as A transpose times B transpose
- Assumes the naive order is at least well defined
- Reverses only the outer factors of a three-matrix product
- Confuses the entrywise rule for sums with the rule for products
- Cannot state that transpose swaps the row and column counts