Find a basis for W. What is the dimension of W? The set of all n x n matrices having trace equal to zero is a subspace W
of $M_{n x n}(F)$ Find a basis for W. What is the dimension of W?
I would like some help doing this question  here is my work so far. I clearly understand how to show a basis and don't understand how to proof a question as such.If someone can show me a correct proof for this type of question that would really help me understand how to tackle such questions.
Proof:
Let A =
\begin{bmatrix}
    0    & \cdots  & a_{1,n} \\
\vdots        & \ddots & \vdots \\
    a_{n,1}  & \dots & 0
\end{bmatrix}
now since the trac(a) = $\sum_{i=i}^{n}a_{ii} =0.$
we can rewrite A as A = $\sum_{i<j}^{n}a_{ij}E_{ij}$ where E_{ij} is defined to have 1 is the ij entry. This shows that $(E_{ij})_{i<j}$ span(W). Now to show independence, suppose that $\sum_{i=i}^{n}a_{ii}$ then since the trac(a) = 0, all $a_{ij}$ must be zero.
 A: Let $E_{i,j}$ with $i\neq j$ be defined as the matrix with entry $1$ in the $i^{\text{th}}$ row, $j^{\text{th}}$ column entry, and zeroes everywhere else.
Let $D_{i,j}$ with $i< j$ be defined as the matrix with entry $1$ in the $i^{\text{th}}$ row, $i^{\text{th}}$ column entry, a $-1$ in the $j^{\text{th}}$ row $j^{\text{th}}$ column entry, and zeroes everywhere else.
A convenient basis for your space is then: $\{E_{i,j}~:~i\neq j\}\cup \{D_{1,j}~:~1<j\}$
There are $n^2-1$ of these in total.
For example, with $n=3$, you have the following matrices as your basis:  $$\begin{bmatrix}0&1&0\\0&0&0\\0&0&0\end{bmatrix}, \begin{bmatrix}0&0&1\\0&0&0\\0&0&0\end{bmatrix}, \begin{bmatrix}0&0&0\\1&0&0\\0&0&0\end{bmatrix}, \begin{bmatrix}0&0&0\\0&0&1\\0&0&0\end{bmatrix},\\ \begin{bmatrix}0&0&0\\0&0&0\\1&0&0\end{bmatrix}, \begin{bmatrix}0&0&0\\0&0&0\\0&1&0\end{bmatrix}, \begin{bmatrix}1&0&0\\0&-1&0\\0&0&0\end{bmatrix}, \begin{bmatrix}1&0&0\\0&0&0\\0&0&-1\end{bmatrix}$$
The fact that these span a subset of your space is trivial since each individually has trace equal to zero, any combination of them will maintain that property.
The fact that these are linearly independent follows from the following observation:
If $\sum\limits_{i\neq j} \alpha_{i,j}E_{i,j} + \sum\limits_{j=2}^n \delta_{j} D_{1,j} = 0$, since the LHS simplifies to the matrix with $\alpha_{i,j}$ in the $i^{th}$ row, $j^{th}$ column entry when $i\neq j$, $\sum\limits_{j=2}^n \delta_j$ in the first row first column entry, and $\delta_j$ in the $j^{th}$ row $j^{th}$ column entry, we see that each of $\alpha_{i,j}$ and $\delta_j$ must be equal to zero.  Therefore, these are linearly independent by definition.
The fact that there cannot be any additional matrices in the basis comes from the fact that if there were, then they must necessarily span the entirety of $M_{n\times n}$, a contradiction since we know there exist matrices whose trace is nonzero.
