# Proving a matrix is a vector subspace and determining dimensions

Let $$A=\begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}$$ be a matrix in $$M_2(\mathbb{R})$$. Then $$U$$ and $$V$$ are defined by:

$$U=\{M\in M_2(\mathbb{R})|MA=AM\}$$

$$V=\{M\in M_2(\mathbb{R})|MA^T=A^TM\}$$

I want to show that U and V are subspaces of $$M_2(\mathbb{R})$$ but I am unsure how to do it. I know that in order for a subset to be a subspace, it has to be closed under addition, scalar multiplication and must contain the zero vector. I know how to prove scalar multiplication and the zero vector, but I am unsure about addition.

$$\begin{bmatrix} \mu & \lambda \\ 0 & \mu \end{bmatrix}$$ some $$\mu,\lambda\in\mathbb{R}$$. How does this work under addition?

Also, I am not sure that I understand the concept of dimension correctly, because I thought it was just the product of the number of columns and rows in a matrix, but then I stumbled upon this formula:

$$dim(U+V)=dim(U)+dim(V)-dim(U\cap{V})$$ where $$U, V$$ are some sets of matrices. So when calculating dimension of a set of matrices, do we perform operations with the dimensions of the individual matrices? (This is probably a confusing question, I probably don't understand the whole concept of dimension properly).

• You seem to claim that all matrices of the form $\begin{bmatrix}\mu&0\\0&\lambda\end{bmatrix}$ are in $V$. Re-check that. – Andreas Blass Nov 27 '20 at 21:33

For adittion, if $$M_1, M_2\in U$$ you get $$(M_1+M_2)A=M_1A+M_2A=AM_1+AM_2$$, because $$M_1$$ and $$M_2$$ are in $$U$$. Then $$U$$ is a subspace of $$M_2(\mathbb{R})$$. The process is similar for $$V$$.

For the dimensions, you need to find a base for every subspace. If $$M\in U$$ and $$M$$ is like

$$M=\left[\begin{matrix}a&b\\c&d\end{matrix}\right]$$

Then you get the following relation

$$\left[\begin{matrix}a&a+b\\c&c+d\end{matrix}\right]=\left[\begin{matrix}a+c&b+d\\c&d\end{matrix}\right]$$

And with this $$c=0$$, $$a=d$$ and $$b\in\mathbb{R}$$. So your matrix $$M$$ is like

$$M=\left[\begin{matrix}a&b\\0&a\end{matrix}\right]=a\cdot\left[\begin{matrix}1&0\\0&1\end{matrix}\right]+b\cdot\left[\begin{matrix}0&1\\0&0\end{matrix}\right]$$

You can see that the base of $$U$$ has two elements, and with this $$dim(U)=2$$. Sorry for my english.