# dimension of the space of all symmetric matrices with trace $0$ and $a_{11}=0$,

I want to know the dimension of the space of all symmetric matrices with trace $0$ and $a_{11}=0$,

I can show that the dimension of space of all symmetric matrices $S$ is $n(n+1)/2$, now I give a linear map $T\colon S\rightarrow\mathbb{R}^2$ by $T(A)=(a_{11},\operatorname{trace}(A))$ so the kernel is exactly the space I want, so now it is enough to show the map is surjective so that I can apply rank nullity theorem. am I in right path? in that case $\dim\ker(T)=n(n+1)/2 -2$.

-
Yes, I think you are in the right path. Except you may need to consider the trivial case when $A$ is $1\times 1$ matrix. In that case, your $T$ is given by $T(A)=(a_{11},a_{11})$, which is not surjective. – Paul Dec 21 '12 at 5:43
:-o :-o :-o :-o :(, I was given $n\ge 2$ – Un Chien Andalou Dec 21 '12 at 5:44
There is always the tried and tested method of counting choices. You have a choice of every element above the diagonal, which is $\frac{1}{2}(n-1)n$ choices, and a choice for every element except two on the diagonal, which is $n-2$ more choices. Giving a total of $\frac{1}{2}(n^2+n-4)=\frac{1}{2}n(n+1)-2$ choices. – Dan Rust Dec 21 '12 at 15:52
@DanielRust Please consider converting your comment into an answer, so that this question gets removed from the unanswered tab. If you do so, it is helpful to post it to this chat room to make people aware of it (and attract some upvotes). For further reading upon the issue of too many unanswered questions, see here, here or here. – Julian Kuelshammer Jun 15 '13 at 17:14

As Paul already noted, you are on the right path (although you have to assume that $n\geq 2$ as of course the zero matrix is the only matrix with $a_{11}=0$).
Now, how to show that this map is surjective if $n\geq 2$: Let $(r,s)\in \mathbb{R}^2$. Then define the symmetric matrix $A$ by $a_{11}=r$ and $a_{nn}=s-r$ and all other entries equal to zero. Then $T(A)=(r,s)$, so $T$ is surjective. Now you can apply rank-nullity and get the result you stated.
To comment on the solution that Daniel Rust gave in the comments: To define a symmetric matrix you have to give a value to each diagonal entry and to each entry above the diagonal (the values below the diagonal are then determined by $a_{ij}=a_{ji}$. There are $n$ entries on the diagonal. But $a_{11}=0$ by assumption, so there is no choice and also say, for $a_{nn}$ there is no choice as $0=\operatorname{trace}(A)=\sum a_{ii}$. Thus $a_{nn}=-\sum_{i\neq n}a_{ii}$. So you are left with $n-2$ choices.
For the part above the diagonal note that there are $n^2$ entries of a matrix in total. Of these all but $n$ don't lie on the diagonal, that's $n^2-n$. Exactly half of them lie above the diagonal, so that's $\frac{1}{2}(n^2-n)$. For all of them you have no constraints from your conditions. Adding all choices up, you have $(n-2)+\frac{1}{2}(n^2-n)=\frac{1}{2}n(n+1)-2$.