# Does the Trace Commute with Matrix Multiplication? Is $\tr (A B) = \tr (A) \tr (B)$?

## Problem 634

Let $A$ and $B$ be $n \times n$ matrices.

Is it always true that $\tr (A B) = \tr (A) \tr (B)$?

If it is true, prove it. If not, give a counterexample.

## Solution.

There are many counterexamples.

For one, take
$A = \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} \text{ and } B = \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}.$

Then $\tr(A)=1, \tr(B)=1$, and hence $\tr(A) \tr(B) = 1$, while $\tr(AB) = 0$ as $AB = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$.

### More from my site

• Is the Trace of the Transposed Matrix the Same as the Trace of the Matrix? Let $A$ be an $n \times n$ matrix. Is it true that $\tr ( A^\trans ) = \tr(A)$? If it is true, prove it. If not, give a counterexample.   Solution. The answer is true. Recall that the transpose of a matrix is the sum of its diagonal entries. Also, note that the […]
• If Two Matrices are Similar, then their Determinants are the Same Prove that if $A$ and $B$ are similar matrices, then their determinants are the same.   Proof. Suppose that $A$ and $B$ are similar. Then there exists a nonsingular matrix $S$ such that $S^{-1}AS=B$ by definition. Then we […]
• Matrix $XY-YX$ Never Be the Identity Matrix Let $I$ be the $n\times n$ identity matrix, where $n$ is a positive integer. Prove that there are no $n\times n$ matrices $X$ and $Y$ such that $XY-YX=I.$   Hint. Suppose that such matrices exist and consider the trace of the matrix $XY-YX$. Recall that the trace of […]
• Trace, Determinant, and Eigenvalue (Harvard University Exam Problem) (a) A $2 \times 2$ matrix $A$ satisfies $\tr(A^2)=5$ and $\tr(A)=3$. Find $\det(A)$. (b) A $2 \times 2$ matrix has two parallel columns and $\tr(A)=5$. Find $\tr(A^2)$. (c) A $2\times 2$ matrix $A$ has $\det(A)=5$ and positive integer eigenvalues. What is the trace of […]
• If 2 by 2 Matrices Satisfy $A=AB-BA$, then $A^2$ is Zero Matrix Let $A, B$ be complex $2\times 2$ matrices satisfying the relation $A=AB-BA.$ Prove that $A^2=O$, where $O$ is the $2\times 2$ zero matrix.   Hint. Find the trace of $A$. Use the Cayley-Hamilton theorem Proof. We first calculate the […]
• True or False: If $A, B$ are 2 by 2 Matrices such that $(AB)^2=O$, then $(BA)^2=O$ Let $A$ and $B$ be $2\times 2$ matrices such that $(AB)^2=O$, where $O$ is the $2\times 2$ zero matrix. Determine whether $(BA)^2$ must be $O$ as well. If so, prove it. If not, give a counter example.   Proof. It is true that the matrix $(BA)^2$ must be the zero […]
• Determine Whether Given Matrices are Similar (a) Is the matrix $A=\begin{bmatrix} 1 & 2\\ 0& 3 \end{bmatrix}$ similar to the matrix $B=\begin{bmatrix} 3 & 0\\ 1& 2 \end{bmatrix}$?   (b) Is the matrix $A=\begin{bmatrix} 0 & 1\\ 5& 3 \end{bmatrix}$ similar to the matrix […]
• The Vector Space Consisting of All Traceless Diagonal Matrices Let $V$ be the set of all $n \times n$ diagonal matrices whose traces are zero. That is, \begin{equation*} V:=\left\{ A=\begin{bmatrix} a_{11} & 0 & \dots & 0 \\ 0 &a_{22} & \dots & 0 \\ 0 & 0 & \ddots & \vdots \\ 0 & 0 & \dots & […]

#### You may also like...

This site uses Akismet to reduce spam. Learn how your comment data is processed.

##### Is the Trace of the Transposed Matrix the Same as the Trace of the Matrix?

Let $A$ be an $n \times n$ matrix. Is it true that $\tr ( A^\trans ) = \tr(A)$? If it...

Close