# How to find a basis and the dimension of the following 2x2 matrix subspace?

How can I construct a basis and find the dimension of the following subspace?

$$U = \{ M \in \textsf{M}_{2\times 2} :\, (\forall J \in \textsf{M}_{2\times 2} )( MJ=JM^t ) \}$$

My original intuition was to let $$M = \left[ \matrix{a & b \\ c & d} \right]$$ and $$J = \left[ \matrix{e & f \\ g & h} \right]$$. Then I would find $$MJ$$, $$M^{T}$$, and $$JM^{T}$$ and then equate the two together: $$MJ = JM^{T}$$. From there I'm not quite sure how to proceed and find a basis and dimension.

• In fact (assuming the $T$ is a transpose), $U = \{0\}$ so the basis will be the empty set. Commented Sep 22, 2019 at 20:37
• Isn’t the identity matrix in $U$, @Omnomnomnom? Commented Sep 22, 2019 at 20:42
• @J.W.Tanner whoops, I missed the $J$ and the $M$ in the definition Commented Sep 22, 2019 at 20:54

I assume that $$\textsf{M}_{2\times 2}$$ denotes the ring of $$2\times 2$$ matrices over a field $$F$$ (for instance, we can pick $$F=\Bbb R$$). Let $$E_{12}=\begin{pmatrix} 0 & 1\\ 0 & 0\end{pmatrix}\in \textsf{M}_{2\times 2}$$ and $$M=\begin{pmatrix} m_{11} & m_{12}\\ m_{21} & m_{22}\end{pmatrix}\in \textsf{M}_{2\times 2}$$. Then $$ME_{12}=\begin{pmatrix} 0 & m_{11}\\ 0 & m_{21}\end{pmatrix}$$ and $$E_{21}M^t=\begin{pmatrix} m_{12} & m_{22}\\ 0 & 0\end{pmatrix}$$. Thus $$M E_{21}=E_{21}M^t$$ iff $$m_{12}=m_{21}=0$$ and $$m_{11}=m_{22}$$, thus iff $$M=m_{11}I$$. Conversely, if $$M=mI$$ for some $$m\in F$$ then $$MJ=mIJ=mJ=Jm=JM^t$$ for each $$J\in \textsf{M}_{2\times 2}$$. Thus $$U=\{mI: m\in F\}$$, which is one-dimensional linear space over $$F$$ with a basis $$\{I\}$$.