# 4.10 Basis and dimension examples

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 $\textbf{e}_{1},\ldots,\textbf{e}_{n}$ where $\textbf{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\leqslant i\leqslant m$, $1\leqslant j\leqslant n$ are a basis of $M_{m\times n}(\mathbb{F})$, which therefore has dimension $mn$.

###### Example 4.10.1.

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 $\begin{pmatrix}a&b\\ c&-a\end{pmatrix}$. This matrix can be written

 $a\begin{pmatrix}1&0\\ 0&-1\end{pmatrix}+b\begin{pmatrix}0&1\\ 0&0\end{pmatrix}+c\begin{pmatrix}0&0\\ 1&0\end{pmatrix}$

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 $\dim S=3$.

###### Example 4.10.2.

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

###### Example 4.10.3.

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

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