Skip to content
UoL CS Notes

Vector Spaces

COMP116 Lectures

Vector spaces allow us to collect together vectors with similar characteristics.

Basics

We have $U$ - a set of $n$-vectors using $H$:

  • e.g. $U$ is the set of all 3-vectors from $\Bbb R$.

The set $U$ defines a vector space if it has two closure properties:

  1. Adding any two vectors in $U$ produces a vector in $U$.
  2. Multiplying any vector in $U$ by a constant in $H$ produces a vector in $U$.

Formal Definition

Given $U$ - a set of $n$-vectors using $H$. The set $U$ defines a vector space if: \(\begin{align} \forall v\in U, \forall w\in U &:v+w\in U &\text{(C1)}\\ \forall v\in U, \forall \alpha\in H &: \alpha v\in U &\text{(C2)} \end{align}\)

The underlying set $H$ is very important.

Examples

  1. $\text{EVEN}=\{\langle x,y \rangle:x+y=2p,p\in\Bbb Z\}$

    If $H=\Bbb Z_k$ then $\text{EVEN}$ is a vector space.

    If $H=\Bbb R$ then $\text{EVEN}$ is not a vector space.

    • Consider C2 using $\langle1,1\rangle,\alpha=\frac{1}{2}$.
  2. $\text{ODD}=\{\langle x,y\rangle:x+y=2p-1,p\in\Bbb Z\}$

    For this $\text{ODD}$ is not a vector space e.g. $H=\Bbb Z _{16}$:

    • $\langle1,4\rangle\in\text{ODD},\langle4,1\rangle\in\text{ODD}$
    • $\langle5,5\rangle\notin\text{ODD}$

Attributes

Suppose $U$ is a vector space of $n$-vectors from $\Bbb R$. Important notions are a basis set and its dimension.

The idea of basis allows us to reduce $U$, even if it is infinite, to at most $n$ distinct vectors. We do this by expressing members of $U$ as linear combinations of other vectors in $U$.

Linear Combinations

Take a set $B$ of $m$ vectors from $U$:

\[B=\{t_1,t_2,\ldots,t_m\}\]

Take a collection $\vec a$ of $m$ values at least one of which is not 0 and all non-zero values are from $H$.

\[\vec a=\langle\alpha_1,\alpha_2,\ldots,\alpha_m\rangle\]

$\vec w$ is a linear combination of $B$ using $\vec a$ is $\vec w$ is:

\[\sum^m_{k=1}\alpha_kt_k\]

Linear Dependence & Independence

Now suppose that $U$ is a vector space and $B$ is a subset of $k$ $n$-vectors from $U$ for which any $w$ in $U$ can be obtained as a linear combination of $B$?

That is:

\[\forall w\in U\exists\langle\alpha_1,\alpha_2,\ldots,\alpha_k\rangle:w=\sum^k_{i=1}\alpha_ib_i\]

Then only $B$ is needed to capture $U$.

Basis and Dimension

A subset $B$ of $U$ for which any vector in the vector space $U$ can be formed as a linear combination of $B$ is called a basis of $U$.

The number of vectors in the smallest basis of $U$ is called the dimension of $U$ denoted $\text{dim}(U)$.

A vector space $U$ of $n$-vectors have a dimension of at most $n$.

Example

\[\text{EVEN}=\{\langle x,y \rangle:x+y=2p,p\in\Bbb Z\}\]

We saw that this was a vector space for $H=\Bbb Z_4$.

It contains:

\[\left\{ \begin{align} \langle0,0\rangle, & \langle0,2\rangle, & \langle1,1\rangle, & \langle1,3\rangle,\\ \langle2,0\rangle, & \langle2,2\rangle, & \langle3,1\rangle, & \langle3,3\rangle \end{align} \right\}\]

$\text{dim(EVEN)}=2;B=\{\langle0,2\rangle,\langle3,1\rangle\}$

e.g. $\langle1,1\rangle=1 * \langle0,2\rangle+3 * \langle3,1\rangle$