# Check if a subset of matrices is a linear space

Let $$\mathbb{U}$$ and $$\mathbb{W}$$ be subsets of $$\mathbb{M}_2(\mathbb{R})$$ - the linear space of all 2x2 matrices with real number entries.

$$\mathbb{U} = \{\begin{pmatrix} 3y-9x&x\\ y&z\\ \end{pmatrix} \mid x,y,z \in \mathbb{R}\}\\ \mathbb{W} = \{\begin{pmatrix} 6x & -3x \\ 8x & x \end{pmatrix} \mid x \in \mathbb{R}\}$$

a) Prove that $$\mathbb{U}$$ and $$\mathbb{W}$$ are linear spaces with the usual matrix addition and scalar multiplication;

b) Find the basis of $$\mathbb{U}$$ and $$\mathbb{W}$$;

c) For which values of $$\lambda, \mu \in \mathbb{R}$$ is the matrix $$A = (\begin{smallmatrix}\mu & -12 \\ 40 & \lambda\end{smallmatrix})$$ an element of $$\mathbb{U}$$ and for which of $$\mathbb{W}$$?

For a) I proved that $$\mathbb{U}$$ and $$\mathbb{W}$$ are subspaces of $$\mathbb{M}_2(\mathbb{R})$$, therefore they are linear spaces.

For b) I am not so sure what I did is correct so I'd like someone to confirm that for me. I did the following for the basis of $$\mathbb{U}$$: $$(\begin{smallmatrix}3y-9x&x\\y&z\end{smallmatrix}) = (\begin{smallmatrix}3y-9x&0\\0&0\end{smallmatrix}) + (\begin{smallmatrix}0&x\\0&0\end{smallmatrix}) + (\begin{smallmatrix}0&0\\y&0\end{smallmatrix}) + (\begin{smallmatrix}0&0\\0&z\end{smallmatrix}) = (3y-9x)(\begin{smallmatrix}1&0\\0&0\end{smallmatrix}) + x(\begin{smallmatrix}0&1\\0&0\end{smallmatrix}) + y(\begin{smallmatrix}0&0\\1&0\end{smallmatrix}) + z(\begin{smallmatrix}0&0\\0&1\end{smallmatrix}) = y(\begin{smallmatrix}3&0\\0&0\end{smallmatrix}) + x(\begin{smallmatrix}-9&0\\0&0\end{smallmatrix}) + x(\begin{smallmatrix}0&1\\0&0\end{smallmatrix}) + y(\begin{smallmatrix}0&0\\1&0\end{smallmatrix}) + z(\begin{smallmatrix}0&0\\0&1\end{smallmatrix}) = x(\begin{smallmatrix}-9&1\\0&0\end{smallmatrix}) + y(\begin{smallmatrix}3&0\\1&0\end{smallmatrix}) + z(\begin{smallmatrix}0&0\\0&1\end{smallmatrix})$$.

From this it follows that the basis is the set $$\{(\begin{smallmatrix}-9&1\\0&0\end{smallmatrix}), (\begin{smallmatrix}3&0\\1&0\end{smallmatrix}), (\begin{smallmatrix}0&0\\0&1\end{smallmatrix})\}$$.

Following a similar argument for $$\mathbb{W}$$ the basis is $$\{(\begin{smallmatrix}6&-3\\8&1\end{smallmatrix})\}$$.

c) For $$A \in \mathbb{U}$$ it means that $$\mu = 3\cdot40 + 9\cdot12 = 228$$ and $$\lambda \in \mathbb{R}$$ is unrestricted. For $$A \in \mathbb{W}$$ it means that $$\mu = 6\lambda$$, $$40 = 8\lambda$$, $$-12 = -3\lambda$$ which is impossible.

• Your work is correct for (b) and (c). Just a note, for (b), you can reduce your number of steps by recognizing that $x,y,z$ are three free variables, so you can directly aim to express any matrix in $U$ as $x\begin{bmatrix}-9&1\\0&0\end{bmatrix}+y()+z())$. Commented Nov 20, 2023 at 20:00
• @AnuragA I did realize that but I wanted to make my steps explicit. Is my thinking for a) correct as well?
– Moxy
Commented Nov 20, 2023 at 20:02
• yeah that' correct. Actually you can do parts (a) and (b) together. Once you have expressed that $U$ is a span of those three matrices, then you can use the fact that spans are always subspaces. Commented Nov 20, 2023 at 20:03
• @AnuragA Oh that's really clever. Thank you!
– Moxy
Commented Nov 20, 2023 at 20:06

Blockquote From this it follows that the basis is the set $$\{(\begin{smallmatrix}-9&1\\0&0\end{smallmatrix}), (\begin{smallmatrix}3&0\\1&0\end{smallmatrix}), (\begin{smallmatrix}0&0\\0&1\end{smallmatrix})\}$$.
lets call those three matrices (which of course are vectors in $$\mathbb{M}_2(\mathbb{R}))$$ $$u$$, $$v$$, and $$w$$. We show that $$(u, v, w)$$ is free :
assume we have three reals $$\alpha$$, $$\beta$$ and $$\gamma$$ (say), such that $$\alpha u + \beta v + \gamma w = 0$$. That is to say :
$$\left(\begin{matrix} -9 \alpha + 3 \beta & \alpha \\ \beta & \gamma\end{matrix}\right) = \left(\begin{matrix} 0 & 0 \\ 0 & 0\end{matrix}\right)$$ This readily says : $$\alpha = \beta = \gamma = 0$$.
Hence, $$(u, v, w)$$ is free.