Prove or disprove: $A=A^\top \land B = B^\top \Rightarrow AB = (AB)^\top$

where $A,B\in\mathbb{R}^{n\times n}$.

My current solution is that this will only work iff $A$ and $B$ commute. Since:

$(AB)^\top = B^\top A^\top = B A$ $\$ ($=AB$. iff $A$ and $B$ commute.)

I tried to ...

• come up with a counterexample of a product of two symmetric matrices, that does not commute. However, my examples always commuted.
• prove that the product of two symmetric matrices does commute, but i didn't succeed there either: $(AB)_{ij}=\sum_{k=1}^n a_{ik}b_{kj} = \sum_{k=1}^n a_{ki}b_{jk} = \sum_{k=1}^n b_{jk}a_{ki} = (BA)_{ji}$
• Two rules of thumb: (1) 2x2 matrices are too small; try something bigger; (2) diagonal matrices are too simple; try some entrywise nonzero matrices. – user1551 Jul 22 '15 at 10:36
• That is already the solution... You showed that AB=(AB)⊤ iff A, B commute!! PS: If you wanna disprove, take (2,1,1,0) and (1,0,0,3) and calculate AB and (AB)⊤ – Inuyaki Jul 22 '15 at 11:03
• @Inuyaki: $(2,1,1,0)$ and $(1,0,0,3)$ are not square matrices as required in the first line of the post. – Alex M. Jul 22 '15 at 11:13
• Thank you Inuyaki, if one interprets them as $\begin{pmatrix}2 & 1\\ 1 & 0\end{pmatrix}$ and $\begin{pmatrix}1 & 0\\ 0 & 3\end{pmatrix}$ then you showed a counterexample to show that the product of two symmetric matrices must not commute. Hence the statement to prove or disprove is false. – ndrizza Jul 22 '15 at 11:16
• Could you add a small answer Inuyaki? Then i can close the question and you'll get the credits :) – ndrizza Jul 22 '15 at 11:20

Your work so far is good. Essentially, you are asking whether two symmetric matrices commute. No, they don't, as shown by the matrices $\left( \begin{array} {ccc} 0 & 1 & 1 \\ 1 & 0 & 0 \\ 1 & 0 & 0 \end{array} \right)$ and $\left( \begin{array} {ccc} 0 & 1 & 0 \\ 1 & 0 & 1 \\ 0 & 1 & 0 \end{array} \right)$.

• Thank you for your counterexample! Also see the other answers for an even shorter counterexample in $\mathbb{R}^{2\times 2}$. – ndrizza Jul 22 '15 at 11:23
• @ndrizza: My example is essentially inspired by permutations: two permutations do not commute iff they are not disjoint (i.e. there is a position on which they both act). Similarly, I have chosen my matrices not to be disjoint i.e. to have some non-zero entries in the same positions (the entries on positions $(1,2)$ and $(2,1)$). This reasoning would have been impossible in dimension $2$, and I wanted to come up with some clear reasoning, not just guessing or repeated trials and errors. – Alex M. Jul 22 '15 at 11:31
• Thank you for this insight! I see, since the group of symmetries is not abelian for $n\geq 3$. – ndrizza Jul 24 '15 at 14:35

Symmetric matrices do for sure not commute in the general case. You have already shown that the statement is equivalent to this, therefore, you only have to find a counterexample for that, which should be possible. Try, for example, $$A:=\left(\begin{matrix}0 & 1 \\ 1 &0\end{matrix}\right), B:=\left(\begin{matrix}2 & 1 \\ 1 &1\end{matrix}\right)$$

• Thank you! That's correct! – ndrizza Jul 22 '15 at 11:25

PS: If you wanna disprove, use $$A = \begin{pmatrix} 2 & 1 \\ 1 & 0 \end{pmatrix} , B = \begin{pmatrix} 1 & 0 \\ 0 & 3 \end{pmatrix}$$ and we get $$AB = \begin{pmatrix} 2 & 3 \\ 1 & 0 \end{pmatrix}$$ which is obviously not symmetric