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.