# 19. Subspaces

## 19. Subspaces

In this video we will explain in more detail what a subspace is. Recall from the last video that subspaces are generalisations of lines/planes and the set of solutions of a system of simultaneous equations in $n$ variables forms a subspace of $\mathbf{R}^{n}$ .

### Linear subspaces

Definition:

A subset $V\subset\mathbf{R}^{n}$ is a linear subspace if:

• for all $v,w\in V$ , $v+w\in V$ (closed under addition),

• for all $v\in V$ and $\lambda\in\mathbf{R}$ , $\lambda v\in V$ (closed under rescaling).

Note that nonempty linear subspaces always contain the origin: if $v\in V$ then $0v\in V$ by the second axiom, and $0v=0$ is the zero-vector (the origin). Note that there are systems of simultaneous equations for which $(0,\ldots,0)$ is not a solution; likewise, there are lines and planes that do not pass through the origin. So for our purposes, we need something more general than linear subspaces.

### Affine subspaces

Definition:

$V\subset\mathbf{R}^{n}$ is called an affine subspace if there exist a vector $w\in\mathbf{R}^{n}$ and a linear subspace $U\subset\mathbf{R}^{n}$ such that $V=w+U:=\{w+u\ :\ u\in U\}$ ; in other words, $V$ is obtained by translating $U$ by the vector $w$ .

Lemma:

Given a system of simultaneous equations in matrix form $Av=b$ , the set of solutions $v=\begin{pmatrix}v_{1}\\ \vdots\\ v_{n}\end{pmatrix}$ form an affine subspace of $\mathbf{R}^{n}$ , ($n$ is the number of variables). It is a linear subspace if and only if $b=0$ .

First, let's assume $b=0$ . We'll prove that the set of solutions satisfies the axioms for being a linear subspace. If $v,v^{\prime}$ are solutions then $Av=Av^{\prime}=0$ , so $A(v+v^{\prime})=0+0=0$ , and if $\lambda\in\mathbf{R}$ then $A\lambda v=\lambda Av=\lambda 0=0$ . Therefore both $v+v^{\prime}$ and $\lambda v$ are solutions and the set of solutions is a linear subspace. It's also nonempty because $v=0$ is always a solution to $Av=0$ .

Now suppose $b\neq 0$ . If there are no solutions then the set of solutions is empty, and the empty set is an empty subspace. So suppose there is at least one solution $w$ . Let $U$ be the set of solutions to $Au=0$ . Let $S$ be the set of solutions to $Av=b$ . We will show that $S=w+U$ :

• We first prove that $w+U\subset S$ . This is because if $u\in U$ then $A(w+u)=Aw+Au=b+0=b$ , so $w+u\in S$ .

• Then we prove that $S\subset w+U$ . This is because $Av=b$ implies $A(v-w)=Av-Aw=b-b=0$ , so $v-w\in U$ and $w\in w+U$ .

### More properties

You'll see a lot more about subspaces in future courses on linear algebra, but I'll just give you a couple more nice facts you can see from the definitions and which are related to what we've been doing.

Lemma:

If $V,W\subset\mathbf{R}^{n}$ are linear subspaces then the intersection $V\cap W$ is also a linear subspace.

We'll check that the two axioms hold.

Suppose $a,b\in V\cap W$ . Then $a\in V$ and $b\in V$ , so $a+b\in V$ because $V$ is a linear subspace. Similarly $a\in W,b\in W$ implies $a+b\in W$ . Therefore $a+b\in V\cap W$ .

Similarly, $a\in V\cap W$ implies $a\in V$ and $a\in W$ , so $\lambda a\in V$ and $\lambda a\in W$ , so $\lambda a\in V\cap W$ .

Another fact which is good to know but which I won't prove is:

Lemma:

A nonempty affine subspace is linear if and only if it contains the origin.

You now have the beginnings of the language you need for talking about lines, planes and their generalisations in higher dimensions.