Why the Order Reverses
Transposing a matrix exchanges its rows and columns. For a product, that exchange does not leave the factors in their original order: the transpose of a product \( \mathbf{A}\mathbf{B} \) is \( \mathbf{B}^{\top}\mathbf{A}^{\top} \). The reversal matters because matrix multiplication is not commutative in general. The identity is useful whenever a calculation involves a product and its transpose, and it applies to rectangular matrices as well as square ones.
Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\) and \(\mathbf{B}\in\mathbb{R}^{n\times p}\), so that the product \(\mathbf{A}\mathbf{B}\) is defined and has size \(m\times p\). The transpose \(\mathbf{M}^{\top}\) of a matrix \(\mathbf{M}\) is formed by exchanging rows and columns: its entry in row \(i\), column \(j\) is the entry of \(\mathbf{M}\) in row \(j\), column \(i\). In particular, \(\mathbf{A}^{\top}\) has size \(n\times m\), and \(\mathbf{B}^{\top}\) has size \(p\times n\).
The dimensions allow the reversed product: \(\mathbf{B}^{\top}\) is \(p\times n\), and \(\mathbf{A}^{\top}\) is \(n\times m\), so \(\mathbf{B}^{\top}\mathbf{A}^{\top}\) is \(p\times m\). This matches the size of \((\mathbf{A}\mathbf{B})^{\top}\). The dimension check is important: reversing the factors works because transposing also changes each factor’s dimensions.
Proof by Comparing Entries
The entry formula for matrix multiplication gives each entry of \(\mathbf{A}\mathbf{B}\) as a sum of products. To prove that two matrices are equal, it is enough to show that their entries agree in every row and column. Here the sums match term by term, with the scalar factors in each term exchanged.
Proof. Assume \(\mathbf{A}\in\mathbb{R}^{m\times n}\) and \(\mathbf{B}\in\mathbb{R}^{n\times p}\). We show that the \((i,j)\)-entries of the two \(p\times m\) matrices agree for every \(1\le i\le p\) and \(1\le j\le m\). By the definition of transpose and the entry formula for a product, \(((\mathbf{A}\mathbf{B})^{\top})_{ij}=(\mathbf{A}\mathbf{B})_{ji}=\sum_{k=1}^{n}a_{jk}b_{ki}\). For the product in the reversed order, \((\mathbf{B}^{\top}\mathbf{A}^{\top})_{ij}=\sum_{k=1}^{n}(\mathbf{B}^{\top})_{ik}(\mathbf{A}^{\top})_{kj}=\sum_{k=1}^{n}b_{ki}a_{jk}\). The scalars are real, so \(a_{jk}b_{ki}=b_{ki}a_{jk}\) for each \(k\). The two sums are therefore equal for every \(i,j\). The matrices have the same dimensions and all their corresponding entries agree, so they are equal. \(\square\)
The index positions explain the reversal. An entry of the product uses an entry from a row of \(\mathbf{A}\) and an entry from a column of \(\mathbf{B}\). Transposing the result exchanges the output row and column indices. In the reversed product, those same entries appear in the opposite factor order, while their scalar values can be interchanged inside each term. This entry-by-entry reasoning also shows why the statement is not restricted to square matrices.
Worked Example: A Rectangular Product
Take a \(2\times3\) matrix and a \(3\times2\) matrix. Their product is \(2\times2\), and its transpose should agree with the product of the transposes in reversed order.
Compute all four entries of \(\mathbf{A}\mathbf{B}\) by taking row-column products:
Thus \((\mathbf{A}\mathbf{B})^{\top}=\begin{bmatrix}-4&5\\-1&4\end{bmatrix}\). Now transpose each factor and multiply in reversed order. The dimensions are \(2\times3\) times \(3\times2\), so this product is defined and is also \(2\times2\).
Check: The computed \(\mathbf{A}\mathbf{B}\) is \(\begin{bmatrix}-4&-1\\5&4\end{bmatrix}\), whose transpose is \(\begin{bmatrix}-4&5\\-1&4\end{bmatrix}\). The independently computed \(\mathbf{B}^{\top}\mathbf{A}^{\top}\) has exactly those entries.
Checking Dimensions and the Identity Together
A rectangular example makes the size changes visible. If \(\mathbf{A}\) is \(m\times n\) and \(\mathbf{B}\) is \(n\times p\), then the original product requires the number of columns of \(\mathbf{A}\) to equal the number of rows of \(\mathbf{B}\). After transposing, \(\mathbf{B}^{\top}\) is \(p\times n\) and \(\mathbf{A}^{\top}\) is \(n\times m\). Their inner dimensions still match, and the output dimensions are \(p\times m\). These are exactly the dimensions obtained by transposing the original \(m\times p\) product.
Proof. Since \(\mathbf{B}\) is \(n\times p\), \(\mathbf{B}^{\top}\) is \(p\times n\). Since \(\mathbf{A}\) is \(m\times n\), \(\mathbf{A}^{\top}\) is \(n\times m\). The shared inner dimension \(n\) makes \(\mathbf{B}^{\top}\mathbf{A}^{\top}\) defined, with \(p\) rows and \(m\) columns. The product \(\mathbf{A}\mathbf{B}\) has \(m\) rows and \(p\) columns, so its transpose has \(p\) rows and \(m\) columns as well. \(\square\)
Worked Example: A Product with Three Rows
Let \(\mathbf{A}\) be \(3\times1\) and \(\mathbf{B}\) be \(1\times2\). The original product has size \(3\times2\), while \(\mathbf{B}^{\top}\mathbf{A}^{\top}\) has size \(2\times3\).
Because \(\mathbf{B}\) has one row, each row of the product is the corresponding entry of \(\mathbf{A}\) multiplied by that row of \(\mathbf{B}\):
Now \(\mathbf{B}^{\top}\) is \(2\times1\) and \(\mathbf{A}^{\top}\) is \(1\times3\). Multiplying gives:
Check: Transposing the displayed \(3\times2\) product exchanges its rows and columns, giving the same \(2\times3\) matrix as the reversed product. This also confirms the dimension prediction.
Square Matrices and a Common Mistake
When both factors are square matrices of the same size, all the products in the identity are dimensionally defined. That can make it tempting to think the order reversal is optional. It is not: the transpose of \(\mathbf{A}\mathbf{B}\) is \(\mathbf{B}^{\top}\mathbf{A}^{\top}\), not generally \(\mathbf{A}^{\top}\mathbf{B}^{\top}\). The factors must be reversed as well as transposed.
Worked Example: A Square Product
Use the matrices below to check the identity and see why the order of the factors matters.
First compute the original product and transpose it:
The transposes, multiplied in reversed order, give:
Check: The result agrees entry by entry with \((\mathbf{A}\mathbf{B})^{\top}\). For contrast, keeping the transposed factors in the original order gives \(\mathbf{A}^{\top}\mathbf{B}^{\top}=\begin{bmatrix}1&3\\2&7\end{bmatrix}\), which does not equal \(\begin{bmatrix}7&3\\2&1\end{bmatrix}\).
Common mistake: reversing without transposing. A wrong calculation might claim \((\mathbf{A}\mathbf{B})^{\top}=\mathbf{B}\mathbf{A}\). For the square example, \(\mathbf{B}\mathbf{A}=\begin{bmatrix}1&2\\3&7\end{bmatrix}\), whereas \((\mathbf{A}\mathbf{B})^{\top}=\begin{bmatrix}7&3\\2&1\end{bmatrix}\). The entries disagree. The correction is to transpose each factor as well as reverse their order: \((\mathbf{A}\mathbf{B})^{\top}=\mathbf{B}^{\top}\mathbf{A}^{\top}\).
How to Apply the Identity Reliably
For a product with two factors, a reliable check has three parts. First, confirm that the original product is defined. Second, transpose each factor and reverse the order, then check that the new product is defined. Third, keep track of the output dimensions before comparing entries. If the original factors have sizes \(m\times n\) and \(n\times p\), both resulting matrices must have size \(p\times m\). A dimension mismatch usually signals that the factors were not reversed correctly.
The identity is about the transpose of the entire product. It does not assert that the product equals its own transpose, or that \(\mathbf{A}\mathbf{B}=\mathbf{B}\mathbf{A}\). Those are different claims and do not follow from this rule. The examples show the useful distinction: transposing changes the entries’ positions, and the matrix product formula makes reversing the factors exactly the order that produces those positions.
Check Your Understanding
For each question, use the dimensions and the entry formula to justify your conclusion.
- If \(\mathbf{A}\) is \(4\times2\) and \(\mathbf{B}\) is \(2\times3\), what are the dimensions of \(\mathbf{A}\mathbf{B}\), \((\mathbf{A}\mathbf{B})^{\top}\), and \(\mathbf{B}^{\top}\mathbf{A}^{\top}\)?
- For \(\mathbf{A}=\begin{bmatrix}1&-1\\2&0\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}3&2\\1&-1\end{bmatrix}\), compute both sides of the transpose-of-a-product identity.
- Write the \((i,j)\)-entry of \((\mathbf{A}\mathbf{B})^{\top}\) as a sum involving \(a_{jk}\) and \(b_{ki}\).
- Why is \(\mathbf{B}^{\top}\mathbf{A}^{\top}\) defined whenever \(\mathbf{A}\mathbf{B}\) is defined?
- Give a reason that \((\mathbf{A}\mathbf{B})^{\top}\) is not generally equal to \(\mathbf{A}^{\top}\mathbf{B}^{\top}\).