Problem: Let $M_3(\mathbb{R} )$ denotes the set of all $3\times 3$ real matrices. Let \[ W = \left\{ A \in M_3(\mathbb{R} ): A = A^T \text{ and } \operatorname{trace}\left( A \right) = 0 \right\}. \] Write down a basis for $W$.
Solution: Let $A \in W$. Then using the condition that $A = A^T$, \[ A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{12} & a_{22} & a_{23} \\ a_{13} & a_{23} & a_{33} \\ \end{pmatrix}, ~ ~ a_{ij} \in \mathbb{R} . \] Also, $\operatorname{trace}\left( A \right) = 0 $, which implies \[ a_{11} + a_{22} + a_{33} = 0 \implies a_{11} = - a_{22} - a_{33}. \] Therefore, we can rewrite the set $W$ as follows: \begin{align*} W & = \left\{ \begin{pmatrix} -a_{22}-a_{33} & a_{12} & a_{13} \\ a_{12} & a_{22} & a_{23} \\ a_{13} & a_{23} & a_{33} \end{pmatrix} : a_{12},a_{13},a_{22} ,a_{23} ,a_{33} \in \mathbb{R} \right\} \\[1ex] & = \left\{ a_{22} \begin{pmatrix} -1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix} + a_{33} \begin{pmatrix} -1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \\ \end{pmatrix} + a_{12} \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix} \right. \\[1ex] & + \left. a_{13} \begin{pmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix} + a_{23} \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \\ \end{pmatrix} : a_{12},a_{13},a_{22} ,a_{23} ,a_{33} \in \mathbb{R} . \right\} \end{align*} Therefore, a basis for $W$ will be \begin{align*} \left\{ \begin{pmatrix} -1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix}, \begin{pmatrix} -1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \\ \end{pmatrix}, \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix}, \begin{pmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix}, \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \\ \end{pmatrix} \right \} \end{align*}