What is the dimension of the vector space of all diagonal $n \times n$ matrices?
Sophia Terry
What is the dimension of the vector space of all diagonal $n \times n$ matrices?
I tried to count how many distinct entries it has.
$\endgroup$ 51 Answer
$\begingroup$Consider the set $\beta = \{D_1, \dotsc, D_n\}$ where $D_i$ is a matrix of all zero entries except $1$ in the $i^\text{th}$ entry along the diagonal. Then this is a basis of the vector space $V$ of all diagonal $n \times n$ matrices. To prove this we need to show $\operatorname{span}(\beta) = V$ and $\beta$ is linearly independent. The first is clearly true since $\operatorname{diag}(a_1, \dotsc, a_n) = a_1D_1 + \dotsb + a_nD_n$. Showing the second criteria is also easy. Suppose $$ c_1D_1 + \dotsb + c_nD_n = O $$ for some scalars $c_1, \dotsc, c_n$. Then this gives $\operatorname{diag}(c_1, \dotsc, c_n) = O$ and by definition of equality of two matrices, we must have $c_1 = \dotsb = c_n = 0$. So $\beta$ is a basis. Since it has $n$ elements, $\dim(V) = n$.
I hope this helps you understand the procedure in finding the dimension.
$\endgroup$