# Thread: What will be the dimension of the subspace of all symmetric matrices in 2x2matrices?

1. ## What will be the dimension of the subspace of all symmetric matrices in 2x2matrices?

We know by definition that If a vector space $\displaystyle W$ has a basis consisting of $\displaystyle n$ vectors, then the number $\displaystyle n$ is called dimension of $\displaystyle V,$ denoted by $\displaystyle dim(V) = n.$

Let $\displaystyle W$ be the subspace of all symmetric matrices in $\displaystyle M_{2,2}$. What is the dimension of $\displaystyle W$?
I wanted to find the basis. So I did it like this:

A symmetric matrix is:
$\displaystyle A = \begin{bmatrix} a & b \\ b & c \end{bmatrix}$

so $\displaystyle A = a\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + b \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} + b \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} + c\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}$

So the set
$\displaystyle S = \left\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \right\}$

spans $\displaystyle W.$ Moreover, $\displaystyle S$ can be shown to be linearly independent, and conclude that dimension of $\displaystyle W$ is $\displaystyle 4$

The book did it like this.
A symmetric matrix is:
$\displaystyle A = \begin{bmatrix} a & b \\ b & c \end{bmatrix}$

so $\displaystyle A = a\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix} + b \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} + c\begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}$

So the set
$\displaystyle S = \left\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \right\}$

spans $\displaystyle W.$ Moreover, $\displaystyle S$ can be shown to be linearly independent, and conclude that dimension of $\displaystyle W$ is $\displaystyle 3$

Are these both correct? or am I wrong? Why?

2. I would say the book's answer is correct. You have three degrees of freedom (three arbitrary parameters), and so you really have a 3-dimensional space. You could add your two matrices that are multiplied by b in order to obtain the book's matrix.

3. So the number of matrix operation depends on number of variables for finding the basis. Why's that? Can you kindly elaborate on this?

4. Thanks. I understand now.

5. You're welcome!

6. Originally Posted by x3bnm
So the set
$\displaystyle S = \left\{ \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix} \right\}$

spans $\displaystyle W.$
The real problem with this is that the second and third elements in that set S do not belong to W (they are not symmetric matrices). When looking for a basis for a subspace, you must always check that the members of the basis are elements of the subspace.

7. Originally Posted by Opalg
The real problem with this is that the second and third elements in that set S do not belong to W (they are not symmetric matrices). When looking for a basis for a subspace, you must always check that the members of the basis are elements of the subspace.
I knew I was missing something. Thanks for that!

8. with a symmetric matrix, you have two kinds of entries: diagonal entries, and off-diagonal entries.

by the definition of a symmetric matrix, the i,j-th entry is equal to the j,i-th entry. for diagonal entries, these are the same,

so the elementary matrices Eii can serve as the start of a basis for the symmetric matrices.

if we have a 1 in the i,j-th position, symmetry forces us to also have a one in the j,i-th position, so although Eij (i ≠ j) is not

a symmetric matrix, Eij + Eji is. in general, for nxn matrices, a basis for the symmetric matrices of size n,

is {Eii: 1 ≤ i ≤ n} U {Eij+Eji : 1 ≤ i,j ≤ n, i ≠ j}.

there are n matrices in the first set, and n(n-1)/2 matrices in the second set, giving a total dimension of:

n + n(n-1)/2 = (2n + n^2 - n)/2 = n(n+1)/2, for any n.

when n = 2, this is 2(3)/2 = 3, as you have seen above.

alternatively, once can write any matrix A as (1/2)(A+Aᵀ) + (1/2)(A-Aᵀ) (a symmetric part, and an anti-symmetric part).

if A is symmetric to begin with, A = (1/2)(A+Aᵀ).

writing A = a11E11 + a12E12 +.......+ annEnn = (1/2)[(a11E11 + a12E12 +.......+ annEnn) + (a11E11 + a12E12 +.......+ annEnn)ᵀ]

and collecting like terms, we get:

A = (a11E11 + a22E22 +...+ annEnn) + a12(E12 + E21) + a13(E13 + E31) +......+ a(n-1,n)(E(1-n,n) + E(n,n-1))

so it is clear the above set {Eii: 1 ≤ i ≤ n} U {Eij+Eji : 1 ≤ i,j ≤ n, i ≠ j} spans the set of symmetric matrices.

a litle reflection should convince you it is linearly independent as well, and thus a basis.

9. Originally Posted by Opalg
The real problem with this is that the second and third elements in that set S do not belong to W (they are not symmetric matrices). When looking for a basis for a subspace, you must always check that the members of the basis are elements of the subspace.
I thought I understood this but I'm having confusion. So I'm reopening this thread. Sorry about that.

Then Let's say we want to find the dimension of each subspace of $\displaystyle R^3$
$\displaystyle W = \{(d, c - d, c):$ $\displaystyle c$ and $\displaystyle d$ are real numbers}

By writing the representative vector $\displaystyle (d, c - d, c)$ as
$\displaystyle (d, c - d, c) = (0, c, c) + (d, 0, 0) + (0,-d, 0) = c(0, 1, 1) + d(1, 0, 0) + d(0, -1, 0)$

In this case why $\displaystyle (0, 1, 1), (1, 0, 0)$ and $\displaystyle (0, -1, 0)$ are not basis when all of them are in $\displaystyle W$?

Why the answer to the above question the basis is $\displaystyle (0, 1, 1)$ and $\displaystyle (1, -1, 0)$?

Why do I always have to have same number of vectors in basis equal to the number of variables? Is this a norm?

10. Originally Posted by x3bnm
Then Let's say we want to find the dimension of each subspace of $\displaystyle R^3$
$\displaystyle W = {(d, c - d, c):$ $\displaystyle c$ and $\displaystyle d$ are real numbers}

By writing the representative vector $\displaystyle (d, c - d, c)$ as
$\displaystyle (d, c - d, c) = (0, c, c) + (d, 0, 0) + (0,-d, 0) = c(0, 1, 1) + d(1, 0, 0) + d(0, -1, 0)$

In this case why $\displaystyle (0, 1, 1), (1, 0, 0)$ and $\displaystyle (0, -1, 0)$ are not basis when all of them are in $\displaystyle W$?
The vectors $\displaystyle (0, 1, 1), (1, 0, 0)$ and $\displaystyle (0, -1, 0)$ are not all of them are in $\displaystyle W$. There is no way that you can choose c and d so that $\displaystyle (d, c - d, c) = (1,0,0).$

11. So is it safe to say that to find the basis factor out the variable in consecutive order and add them and what is factored out is basis?

12. Thanks to you all for your input. It helps a lot.

13. really you need to write W as {c(0,1,1) + d(1,-1,0): c,d in R}, and it is clear that a proper basis is {(0,1,1), (1,-1,0)}.

if two variables are independent of each other, it makes sense that a vector space based just on linear combinations

of those two variables, would have dimension....2.

,

,

,

,

,

,

,

,

,

,

,

,

,

,

# Dimension of symmetric matrices

Click on a term to search for related topics.