# How to write basis for symmetric nxn matrices

1. Nov 30, 2012

### Opus_723

1. The problem statement, all variables and given/known data

Write down a basis for the space of nxn symmetric matrices.

3. The attempt at a solution

I just need to know what the notation for this sort of thing is. I understand what the basis looks like, and I was even able to calculate that it would have dimension (n/2)(n+1), but I can't think of how you're supposed to compactly write down an answer for this that isn't simply a rambling paragraph. For a given n, I could simply write down a whole bunch of matrices with ones and zeros in appropriate places. But for a general n, I don't know what the format would be.

2. Nov 30, 2012

### jbunniii

You could start by defining the canonical basis for the space of nx1 vectors, say $e_i$ = the column vector with a 1 in the i'th position and 0 everywhere else. You can use this to succinctly write the matrix that has a 1 in the (i,j) position and 0 everywhere else, and from there it's easy enough to write a basis for the space of nxn symmetric matrices.

3. Nov 30, 2012

### HallsofIvy

Staff Emeritus
First the are the n matrices with 1 at a single entry along the main diagonal and all other entries 0. Now there are $n^2- n$ entries NOT on the main diagonal and so n(n-1)/2 entries above the diagonal. Put a 1 into any one of those and a 1 in the corresponding position below the main diagonal. That will give you the $n+ \frac{n(n-1)}{2}= \frac{2n+ n^2- n}{2}= \frac{n^2+ n}{2}= \frac{n(n+1)}{n}$ basis matrices.

If n= 2, 2(2+1)/2= 3 and the three basis matrices are
$$\begin{bmatrix}1 & 0 \\ 0 & 0 \end{bmatrix}\begin{bmatrix}0 & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix}0 & 1 \\ 1 & 0 \end{bmatrix}$$

Now, you try to write out the 3(3+1)/2= 6 basis matrices for the 3 by 3 symmetric matrices.