## dimension of subspace of trace of matrix

Let V=Mn(k) be a vector space of matrices with entries in k. For a matrix M denote the trace of M by tr(M).
What is the dimension of the subspace of {M$$\in$$V: tr(M)=0}
I know that I am supposed to use the rank-nullity theorem. However I'm not sure exactly how to use it. I know that the trace is a linear map itself. Since in this case it equals zero would the dim=dim(ker)?

 PhysOrg.com science news on PhysOrg.com >> Hong Kong launches first electric taxis>> Morocco to harness the wind in energy hunt>> Galaxy's Ring of Fire
 Blog Entries: 8 Recognitions: Gold Member Science Advisor Staff Emeritus so we got that $$tr:M_n(k)\rightarrow k$$ is linear. Rank-nullity gives us that $$dim(ker(tr))+dim(im(tr))=dim(M_n(k))$$ You need to find dim(ker(tr)). For this you have to figure out the other dimensions, what are they?
 Recognitions: Gold Member Science Advisor Staff Emeritus The set of all n by n matrices has dimension $n^2$. From "tr(A)= 0", you have $a_{11}+ a_{22}+ \cdot\cdot\cdot+ a_{nn}= 0$ so that $a_{nn}= -a_{11}- a_{22}- \cdot\cdot\cdot- a_{n-1 n-1}$. That is, you can replace one entry in the matrix by a linear combination of the others. That reduces the dimension of the subspace by 1: the dimension is $n^2- 1$.

 Tags dimension, linear algebra, nullity, rank, trace