# Proving a matrix is a subvector space

I am being asked this question:

Consider the vector space M(n × n, R) of n × n-matrices over R. Show that the subset of all diagonal matrices is a subvector space of M(n × n, R).

To my knowledge, a set is a subvector space if it satisfies 3 requirements.

1.) Zero exists in the set.

2.) The set is closed under addition

3.) The set is closed under scalar multiplication

I believe that zero exists in the set because all the elements in the matrix that aren't along the diagonal are zero. To my understanding, to prove that a set is closed under addition I must show that f(x+y) = f(x) + f(y) and to show that it is closed under scalar multiplication I must show that f(rx) = r $*$f(x). I do not know how to prove the last two conditions in regards to a matrix.

• Just do it for $n=2$. Choose two diagonal matrices, A and B and choose scalars $\alpha$ and $\beta$ and show that $\alpha A + \beta B$ is a diagonal matrix. – akech Feb 25 '16 at 1:27
• If you add two diagonal matrices what do you get ? What about when you multiply a diagonal matrix by a scalar ? – Quality Feb 25 '16 at 1:28
• What you quote here are the axioms for a linear map. Not those for a subspace. – Friedrich Philipp Feb 25 '16 at 1:49
• Your argument for the zero isn't sound. It's not that all elements along the are zero doesn't show that your subspace has a zero vector. It's the fact that the zero matrix is a diagonal matrix. Also, but not related to the question: @FriedrichPhilipp Hi, Fritz! – Roland Feb 25 '16 at 7:28
• He is right. Hi Roland! 😊 – Friedrich Philipp Feb 25 '16 at 15:11

## 1 Answer

As FriedrichPhilipp said, the conditions you've written are for showing a function is a linear map, not for showing closure under vector addition and scalar multiplication.

You're right in your argument that $0 \in M_{n\times n}(\mathbb{R})$.

For closure under vector addition, you need to show if $x,y \in M_{n\times n}(\mathbb{R})$ (i.e. if $x$ & $y$ are $n\times n$ diagonal matrices) then $x+y$ is also a diagonal matrix.

For closure under scalar multiplication, you need to show if $k \in \mathbb{R}$ and $x \in M_{n\times n}(\mathbb{R})$ (i.e. if $k\in\mathbb{R}$ and $x$ is an $n\times n$ diagonal matrix) then $kx$ is also a diagonal matrix.

Now try writing out your arguments for these :-).