We’ve already seen a couple of examples, the most important being the standard basis of ${\mathbb{F}}^{n}$, the space of height n column vectors with entries in $\mathbb{F}$. This standard basis was ${\text{\mathbf{e}}}_{1},\mathrm{\dots},{\text{\mathbf{e}}}_{n}$ where ${\text{\mathbf{e}}}_{i}$ is the height n column vector with a 1 in position i and 0s elsewhere. The basis has size n, so $dim{\mathbb{F}}^{n}=n$.

We can do a similar thing for the vector space of all $m\times n$ matrices over a field $\mathbb{F}$. Let ${E}_{ij}$ be the $m\times n$ matrix with a 1 in position $i,j$ and 0s elsewhere. Then the ${E}_{ij}$, for $1\u2a7di\u2a7dm$, $1\u2a7dj\u2a7dn$ are a basis of ${M}_{m\times n}(\mathbb{F})$, which therefore has dimension $mn$.

The trace of a matrix is the sum of the elements of its leading diagonal. We will find a basis of the set $S$ of $2\times 2$ matrices with trace zero.

First note that this really is a vector space (a subspace of ${M}_{2\times 2}(\mathbb{F})$), so its dimension is at most 4.

A good start is to write down an expression for a general matrix with trace zero. It must have the form $\left(\begin{array}{cc}a& b\\ c& -a\end{array}\right)$. This matrix can be written

$$a\left(\begin{array}{cc}1& 0\\ 0& -1\end{array}\right)+b\left(\begin{array}{cc}0& 1\\ 0& 0\end{array}\right)+c\left(\begin{array}{cc}0& 0\\ 1& 0\end{array}\right)$$ |

Call the three matrices above $H,E,F$ so that our expression was $aH+bE+cF$. Since $H,E,F$ are in $S$, they are a spanning sequence for $S$. You can check that they’re linearly independent, so they are a basis and $dimS=3$.

$dim{\mathbb{R}}_{\u2a7dn}[x]=n+1$, because $1,x,\mathrm{\dots},{x}^{n}$ is a basis.

Let $S=\mathrm{span}(\mathrm{sin},\mathrm{cos})$, a subspace of the $\mathbb{R}$-vector space of all functions $\mathbb{R}\to \mathbb{R}$. We will find $dimS$.

The functions $\mathrm{cos}$ and $\mathrm{sin}$ are linearly independent by Example 4.6.4, and they span $S$ by definition. Therefore they form a basis of $S$ and $dimS=2$.