# Questions on symmetric matrices

Describe a basis for the vector space of symmetric n x n matrices. What is the dimension of this space?

-
Is this homework? If it is, it is customary to label it so, and to mention any attempts you have made. –  Martin Argerami Apr 30 '12 at 16:08
@Jim_CS : My guess is that whoever down-voted this question did so because it's written as if you copied a question written by someone other than yourself. –  Michael Hardy Apr 30 '12 at 16:16
It was in an exam i had today and i never came across it during the course or pre exam study so i had no answer for it. well i said the dimension was n as that seemed obvious. –  Jim_CS Apr 30 '12 at 16:20
Reading the comments, I feel you could first try to answer the following questions: (i) Describe a basis for the vector space of all the $n\times n$ matrices? (ii) What is its dimension? –  Did Apr 30 '12 at 18:13
I dont know what all the downvotes are for...what else am I supposed to put in the post when I wasnt even able to make an attempt at this question in the exam? (apart from putting dim = n, which seems wrong in any case) –  Jim_CS Apr 30 '12 at 22:19

HINT: If you know all of the elements on and above the diagonal of a symmetric matrix, you know the whole matrix. How many elements are there on or above the diagonal of an $n\times n$ matrix?

Added: I can see that you're having trouble getting a handle on the vector space in question; perhaps this will help. Let $S_n$ be the space of $n\times n$ symmetric matrices. In the simplest case that isn't completely trivial, $n=2$, the elements of $S_2$ are matrices of the form $$\pmatrix{a&b\\b&c}\;.$$ Vector addition in $S_2$ is just ordinary matrix addition: $$\pmatrix{a_1&b_1\\b_1&c_1}+\pmatrix{a_2&b_2\\b_2&c_2}=\pmatrix{a_1+a_2&b_1+b_2\\b_1+b_2&c_1+c_2}\;.$$ Note that the result of this addition is still symmetric, so it really is in $S_2$. If it weren't, $S_2$ wouldn't be closed under addition and therefore wouldn't be a vector space after all.

Scalar multiplication in $S_2$ is ordinary multiplication of a matrix by a scalar: $$\alpha\pmatrix{a&b\\b&c}=\pmatrix{\alpha a&\alpha b\\\alpha b&\alpha c}\;,$$ and again all's well, since the result is still in $S_2$.

Here's a simple exercise to help you get more accustomed to working with this vector space.

Let $V=\{\langle a,b,c,d\rangle\in\Bbb R^4:b=c\}$.

1. Prove that $V$ is a subspace of $\Bbb R^4$.
2. Prove that $V$ is isomorphic to $S_2$. That is, find a linear transformation $T:V\to S_2$ that is one-to-one and maps $V$ onto $S_2$.
-
Well there are n elements on the diagonal so the dimension is n, yes? –  Jim_CS Apr 30 '12 at 17:01
@Jim_CS: There are $n$ elements on the diagonal, but specifying them isn't enough to specify the whole matrix, so the dimension of the space is more than $n$. You also have to specify the elements above the diagonal. How many of those are there? As for your other question, it means exactly what it says: the space of $n\times n$ symmetric matrices, i.e., the space whose elements are these matrices. –  Brian M. Scott Apr 30 '12 at 17:03
@Jim_CS : it seems to me that you're making a confusion between the dimension of the space spanned by the column of a single matrix (i.e. its rank) and the dimension of the space of all (symmetric) matrices, which is a vector space itself (the "vectors" are the matrices) –  Andrea Mori Apr 30 '12 at 17:13
@Jim_CS: The $3\times 3$ identity matrix isn't a vector space, so it doesn't even have a dimension. Its rank is $3$. That aside, you're not thinking about what the question actually asks. You have a vector space $V$ whose elements $-$ the actual vectors in $V$ $-$ are $n\times n$ symmetric matrices. Each matrix is one vector in $V$. You could write it out as a single row of $n^2$ numbers instead of as a square array, except that it would be much harder to tell that it was symmetric. –  Brian M. Scott Apr 30 '12 at 17:15
@Jim_CS: I'll expand my answer a bit to try to give you a better idea of what the space itself is like. –  Brian M. Scott Apr 30 '12 at 22:24

If $A$ is a symmetric $n\times n$ matrix, then $A$ has the form $$\begin{bmatrix} * \ & a_1 & a_2 & \cdots & a_k \\ a_1 & * \ & a_3 \\ a_2 & a_3 & * \ \\ \vdots & & & \ddots & \\ \\ a_k & & & & * \ \end{bmatrix}$$ where the $*$ entries are whatever you like them to be. You can see that we have $a_{ij}=a_{ji}$.

From this form you can see that we need $n$ elements in the basis to span the diagonal entries. For the remaining $n(n-1)$ entries, we need exactly $\frac{1}{2}n(n-1)$ elements in the basis to in order to span those entries (due to the fact that $a_{ij}=a_{ji}$). This gives a basis with $\frac{1}{2}n(n+1)$ elements.

Define $T_{ij}$ to be the matrix with $(T_{ij})_{ij}=1$ and all other entries equal to $0$. Then define $$M_{ij} = T_{ij}+T_{ij}^\text t$$ where $i$ and $j$ range over $1,2,\dots, n$. Then for a given $n\times n$ symmetric matrix $A$, we can write it as $$A = \sum_{i=1}^n\sum_{j=1}^n \frac{1+\delta_{ij}}{2}(A)_{ij}M_{ij}$$ where $(A)_{ij}$ denotes the $(i,j)^\text{th}$ entry of the given matrix $A$. The $\frac{1+\delta_{ij}}{2}$ in the sum is to correct for the fact that $M_{ij}=M_{ji}$.

The collection of the distinct $M_{ij}$ will form a basis for the space of $n\times n$ symmetric matrices. Of course, this is not proof, but provides a way that you might express the basis.

-