Finding the dimension of real symmetric matrices with trace zero

What is the dimension of the vector space of all symmetric matrices of order $n\times n$ $(n\geq 2)$ with real entries and trace equal to zero?


Think of how you normally calculate the dimension of the space of symmetric matrices. The only difference comes in choosing elements on the diagonal: if I choose the first $n -1$ diagonal entries, then is there a choice for the last diagonal entry which will make the trace zero? How many choices for this last entry are there?


You can choose arbitrary values for the upper triangular values, that gives $\frac{n(n-1)}{2}$ degrees of freedom, and you can choose arbitrary values for $n-1$ of the diagonal elements, so the dimension is $\frac{n(n-1)}{2}+(n-1)$.