# Prove that if $V$ = $R^{n,n}$, then the set of all diagonal matrices is a subspace of $V$.

I am reading the book, Applied Linear Algebra and Matrix Analysis. When I was doing the exercise of Section3.2 Exercise 19, I was puzzled at some of it. Here is the problem description:

Prove that if $$V$$ = $$R^{n,n}$$, then the set of all diagonal matrices is a subspace of $$V$$.

And I know it is not hard to know the set of all diagonal matrices is closed under matrix addition and scalar multiplication.
BUT, it confused me how to know it contains the zero element of V
SO I check the reference answer which is as followed:

Let A and B be $$n×n$$ diagonal matrices. Then $$cA$$ is a diagonal matrix and $$A$$ $$+ B$$ is diagonal matrix so the set of diagonal matrices is closed under matrix addition and scalar multiplication.

It doesn't explain anything about zero elements.
And the diagonal matrix is a matrix in which the entries outside the main diagonal are all zero, which means it is can't be equal to zero matrices.
And I wonder the definition of subspace is the only way to prove it in an abstract subspace situation.
If not mind, could anyone help me and give me some inspirations?

• If you believe that it is closed by scalar multiplication and non-empty, why do you not believe that it contains $0$?
– user562983
Commented Apr 8, 2019 at 12:08

In general, a set $$V\subset X$$ is a subspace if it is

2. closed under scalar multiplication.
3. non-empty.

There is no need to demand that $$0\in V$$, because that is a consequence of the three properties above, since, if $$x\in V$$, then $$0=x+(-1)\cdot x\in V$$.

Very often, as is your case, the third property, i.e. that $$V$$ is non-empty, is obvious, and left out of the proof. Technically, it's better to at least mention that of course, $$V$$ is not empty.

Just a final remark:

And the diagonal matrix is a matrix in which the entries outside the main diagonal are all zero, which means it is can't be equal to zero matrices.

I don't understand this sentence at all.

• Cause I got a terrible thought that if a set $V\subset X$, it must have $0\in V$, so I just listed this sentence. I guess I just understand the definition of subspace mechanically in the matrix part. It would be appreciated if you give some tutorials about it? Commented Apr 8, 2019 at 12:27
• @FreAkPoint What I meant was I don't understant the sentence gramatically. I don't know what you are saying in the sentence. How can one matrix be "equal to zero matrices"? What does that mean?
– 5xum
Commented Apr 8, 2019 at 12:29
• Sorry for using a vague and wrong expression here. "equal to zero matrices" means two equal-sized matrices are element-wise equal. The way why I speak it in this way because I usually speak it for convenience in the programming part and I didn't forget to change the bad habit here. Commented Apr 8, 2019 at 12:39
• @FreAkPoint Ok, but the sentence is still confusing. The sentence speaks of "the diagonal matrix". Which one? The zero matrix is a diagonal matrix, but it's not the only one.
– 5xum
Commented Apr 8, 2019 at 12:42
• I guess I confused myself about the definition of diagonal matrix in my brain before so I just write such sentence which has a huge semantic error. Sincerely thanks to your explainations to my question and problems about my question. Commented Apr 8, 2019 at 12:57