[Math] Pre-multiplying and post-multiplying matrices give the same diagonal elements

matrices

If
$$X = \left[ \begin{array}{ccc}
3 & 4 & 1\\
4 & 1 & 3\\
1 & 3 & 4\end{array} \right]$$

find the possible matrix $Y$ such that:
$$XY – YX = I$$

The method my professor gave us was that if we observe the diagonal elements of $XY$, they will always be equal to the diagonal elements of $YX$.

$\therefore Trace(XY – YX)$
$=Trace(XY) – Trace(YX)$
$=0$

If $XY – YX = I$,
$\implies Trace(XY – YX) = Trace(I)$

The trace of an Identity matrix of the same order would be $1+1+1=3$.

$\because 0 \neq 3 \implies Y$ doesn't exist.

But, I decided to cross-check. I multiplied 3 pairs of matrices and none of their diagonal elements were same as their commutative counter-parts.

I'm confused. Is what my professor said correct? And did I mess up my calculations? Or does what he said not hold? If not, what would be the method to solve this problem, because I'm stumped. (assuming a matrix Y and solving it to get 9 equations isn't the way, I'm guessing).

Best Answer

What your professor said, what he used, and what is true, is that the sum of the diagonal entries of $XY$ is the same as that of $YX$.

If you pay attention to the argument you wrote, you are never using the single entries of $XY$ and $YX$, but only the sum of their diagonals.

Related Question