# The Vector Space Consisting of All Traceless Diagonal Matrices

## Problem 79

Let $V$ be the set of all $n \times n$ diagonal matrices whose traces are zero.
That is,

\begin{equation*}
V:=\left\{ A=\begin{bmatrix}
a_{11} & 0 & \dots & 0 \\
0 &a_{22} & \dots & 0 \\
0 & 0 & \ddots & \vdots \\
0 & 0 & \dots & a_{nn}
\begin{array}{l}
a_{11}, \dots, a_{nn} \in \C,\\
\tr(A)=0 \\
\end{array}
\right\}
\end{equation*}

Let $E_{ij}$ denote the $n \times n$ matrix whose $(i,j)$-entry is $1$ and zero elsewhere.

(a) Show that $V$ is a subspace of the vector space $M_n$ over $\C$ of all $n\times n$ matrices. (You may assume without a proof that $M_n$ is a vector space.)

(b) Show that matrices
$E_{11}-E_{22}, \, E_{22}-E_{33}, \, \dots,\, E_{n-1\, n-1}-E_{nn}$ are a basis for the vector space $V$.

(c) Find the dimension of $V$.

## Hint (Subspace Criteria)

For (a), use the criteria for a subset to be a subspace.

1. The zero vector $\mathbf{0} \in M_n$ is in $V$.
2. For $\mathbf{u}, \mathbf{v}\in V$, the sum $\mathbf{u}+\mathbf{v}\in V$.
3. For $\mathbf{v}\in V, c\in \C$, the scalar product $c\mathbf{v}\in V$.

## Proof.

### (a) $V$ is a subspace of the vector space $M_n$ over $\C$

We check the following criteria for a subset to be a subspace.

1. The zero vector $\mathbf{0} \in M_n$ is in $V$.
2. For $\mathbf{u}, \mathbf{v}\in V$, the sum $\mathbf{u}+\mathbf{v}\in V$.
3. For $\mathbf{v}\in V, c\in \C$, the scalar product $c\mathbf{v}\in V$.

For (1), note that the zero vector $\mathbf{0}\in M_n$ is the $n \times n$ zero matrix. Thus it is clearly in $V$.

To check (2), take $\mathbf{u}, \mathbf{v}\in V$. Then $\mathbf{u}, \mathbf{v}$ are diagonal matrices and $\tr(\mathbf{u})=0$, $\tr(\mathbf{v})=0$.
Thus the sum $\mathbf{u}+\mathbf{v}$ is a diagonal matrix and the trace is
$\tr(\mathbf{u}+\mathbf{v})=\tr(\mathbf{u})+\tr(\mathbf{v})=0+0=0.$ Hence the sum $\mathbf{u}+\mathbf{v} \in V$.

Finally, to prove (3) we take $\mathbf{v}\in V, c\in \C$.
Then $\mathbf{v}$ is a diagonal matrix and $\tr(\mathbf{v})=0$.
Thus $c\mathbf{v}$ is also a diagonal matrix and the trace is
$\tr(c\mathbf{v})=c\tr(\mathbf{v})=c\cdot 0=0.$ Hence $c\mathbf{v} \in V$.
Therefore the subspace criteria (1)-(3) hold. Thus $V$ is a subspace of the vector space $M_n$.

### (b) A basis for the vector space $V$.

Note that for each $1 \leq i \leq n-1$, the matrix $E_{ii}-E_{i+1\, i+1}$ is a diagonal matrix and the trace is
$\tr(E_{ii}-E_{i+1\, i+1})=\tr(E_{ii})-\tr(E_{i+1\,i+1})=1-1=0.$ Hence the matrix $E_{ii}-E_{i+1\, i+1} \in V$.

We show that the matrices $E_{ii}-E_{i+1\, i+1}$ span $V$.
Let $A=(a_{ij})\in V$. We want to solve the following linear combination.
\begin{align*}
A=c_1(E_{11}-E_{22})+c_2(E_{22}-E_{33})+\cdots+c_{n-1}( E_{n-1\, n-1}-E_{nn}).
\end{align*}
Rearranging this, we obtain
\begin{align*}
A=c_1E_{11}+(c_2-c_1)E_{22}+\cdots+(c_{n-1}-c_{n-2}) E_{n-1\, n-1}-c_{n-1}E_{nn}.
\end{align*}

Namely, in the matrix form we have
$\begin{bmatrix} a_{11} & 0 & \dots & 0 \\ 0 &a_{22} & \dots & 0 \\ \vdots & \ddots & \ddots & \ddots \\ 0 & 0 & \dots & a_{nn} \end{bmatrix} = \begin{bmatrix} c_1 & 0 & \dots & \dots &0 \\ 0 & c_2-c_1 & \dots & \dots & 0 \\ \vdots & \ddots & \ddots & \ddots & \vdots \\ 0 & \dots & 0 & c_{n-1}-c_{n-2} & 0 \\ 0 & \dots & \dots & 0 & -c_{n-1} \end{bmatrix}.$ Comparing entries, we have the system of $n$ equations in $n-1$ unknowns $c_1,\dots, c_{n-1}$
\begin{align*}
a_{11}&=c_1\\
a_{22}&=c_2-c_1\\
a_{33}&=c_3-c_2\\
\vdots\\
a_{n-1 n-1}&=c_{n-1}-c_{n-2}\\
a_{nn}&=-c_{n-1}.
\end{align*}

We solve this system as follows.
The matrix form of this system is
$\begin{bmatrix} 1 & & & & \\ -1 & 1 & & & \\ & -1 & 1 & & \\ & & \ddots & \ddots & \\ & & & -1& 1\\ & & & & -1 \end{bmatrix}\begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_{n-1} \end{bmatrix}=\begin{bmatrix} a_{11} \\ a_{22} \\ \vdots \\ a_{nn} \end{bmatrix}.$ (The empty entries are all zero.)

The augmented matrix is
$\left[\begin{array}{rrrrr|r} 1 & & & & & a_{11}\\ -1 & 1 & & & &a_{22} \\ & -1 & 1 & & &a_{33}\\ & & \ddots & \ddots & & \vdots \\ & & & -1& 1 &a_{n-1 n-1}\\ & & & & -1 &a_{n n} \end{array} \right].$ Then we reduce this matrix as follows.
Add the first row to the second row, then add the second row to the third row.
Repeating this process we get
$\left[\begin{array}{rrrrr|r} 1 & & & & & a_{11}\\ & 1 & & & &a_{11}+a_{22} \\ & & 1 & & &a_{11}+a_{22}+a_{33}\\ & & \ddots & \ddots & & \vdots \\ & & & & 1 &a_{11}+a_{22}+\dots +a_{n-1 n-1}\\ & & & & 0 &a_{11}+a_{22}+\dots +a_{n n} \end{array} \right].$

Note that since $A \in V$, $\tr(A)=a_{11}+a_{22}+\cdots a_{nn}=0$, thus the right-bottom entry ($(n,n)$-entry) of the augmented matrix is $0$, hence the system is consistent and it has the unique solution
\begin{align*}
c_{1} &= a_{11} \\
c_{2} &=a_{11}+a_{22}\\
c_3 &=a_{11}+a_{22}+a_{33}\\
\vdots \\
c_{n-1}&=a_{11}+a_{22}+\cdots+a_{n-1 n-1}.\tag{*}
\end{align*}
Therefore the matrices $E_{11}-E_{22}, \, E_{22}-E_{33}, \, \dots,\, E_{n-1\, n-1}-E_{nn}$ span $V$.

To show that these matrices are linearly independent, we can reuse the above computation.
Suppose we have a linear combination
$\mathbf{0}=c_1(E_{11}-E_{22})+c_2(E_{22}-E_{33})+\cdots+c_{n-1}( E_{n-1\, n-1}-E_{nn}).$ Here $\mathbf{0}$ is the $n \times n$ zero matrix.
Since $a_{ii}=0$ in the above computation, we see from (*) that $c_1=c_2=\dots=c_{n-1}=0$, hence the matrices $E_{ii}-E_{i+1 i+1}$ are linearly independent.
Therefore those matrices are a basis of $V$.

### (c) The dimension of $V$.

From part (b), the $n-1$ matrices
$E_{11}-E_{22}, \, E_{22}-E_{33}, \, \dots,\, E_{n-1\, n-1}-E_{nn}$ are a basis of $V$. Thus the dimension of $V$ is $n-1$.

### More from my site

• The Subspace of Matrices that are Diagonalized by a Fixed Matrix Suppose that $S$ is a fixed invertible $3$ by $3$ matrix. This question is about all the matrices $A$ that are diagonalized by $S$, so that $S^{-1}AS$ is diagonal. Show that these matrices $A$ form a subspace of $3$ by $3$ matrix space. (MIT-Massachusetts Institute of Technology […]
• Subspace of Skew-Symmetric Matrices and Its Dimension Let $V$ be the vector space of all $2\times 2$ matrices. Let $W$ be a subset of $V$ consisting of all $2\times 2$ skew-symmetric matrices. (Recall that a matrix $A$ is skew-symmetric if $A^{\trans}=-A$.) (a) Prove that the subset $W$ is a subspace of $V$. (b) Find the […]
• Basis For Subspace Consisting of Matrices Commute With a Given Diagonal Matrix Let $V$ be the vector space of all $3\times 3$ real matrices. Let $A$ be the matrix given below and we define $W=\{M\in V \mid AM=MA\}.$ That is, $W$ consists of matrices that commute with $A$. Then $W$ is a subspace of $V$. Determine which matrices are in the subspace $W$ […]
• 12 Examples of Subsets that Are Not Subspaces of Vector Spaces Each of the following sets are not a subspace of the specified vector space. For each set, give a reason why it is not a subspace. (1) $S_1=\left \{\, \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} \in \R^3 \quad \middle | \quad x_1\geq 0 \,\right \}$ in […]
• Subspaces of Symmetric, Skew-Symmetric Matrices Let $V$ be the vector space over $\R$ consisting of all $n\times n$ real matrices for some fixed integer $n$. Prove or disprove that the following subsets of $V$ are subspaces of $V$. (a) The set $S$ consisting of all $n\times n$ symmetric matrices. (b) The set $T$ consisting of […]
• The Subset Consisting of the Zero Vector is a Subspace and its Dimension is Zero Let $V$ be a subset of the vector space $\R^n$ consisting only of the zero vector of $\R^n$. Namely $V=\{\mathbf{0}\}$. Then prove that $V$ is a subspace of $\R^n$.   Proof. To prove that $V=\{\mathbf{0}\}$ is a subspace of $\R^n$, we check the following subspace […]
• Matrix $XY-YX$ Never Be the Identity Matrix Let $I$ be the $n\times n$ identity matrix, where $n$ is a positive integer. Prove that there are no $n\times n$ matrices $X$ and $Y$ such that $XY-YX=I.$   Hint. Suppose that such matrices exist and consider the trace of the matrix $XY-YX$. Recall that the trace of […]
• Hyperplane Through Origin is Subspace of 4-Dimensional Vector Space Let $S$ be the subset of $\R^4$ consisting of vectors $\begin{bmatrix} x \\ y \\ z \\ w \end{bmatrix}$ satisfying $2x+3y+5z+7w=0.$ Then prove that the set $S$ is a subspace of $\R^4$. (Linear Algebra Exam Problem, The Ohio State […]

#### You may also like...

##### True or False Quiz About a System of Linear Equations

(Purdue University Linear Algebra Exam)

Close