Solution (source code)

= Solution

A real <symmetric matrix> has $n$ freely chosen diagonal entries and $n(n-1)/2$ freely chosen entries above the diagonal. The entries below are then fixed by symmetry. Consequently
$$
\boxed{\dim\mathcal S=\frac{n(n+1)}2.}
$$