# Section 4.1 Subspaces and Spanning

Definition: A subspace of $\mathbb{R}^n$ is any set H in $\mathbb{R}^n$ that has three properties:

a) The zero vector is in H.

b) For each $\vec{u}$ and $\vec{v}$ in H, the sum $\vec{u} + \vec{v}$ is in H

c) For each $\vec{u}$ in H and each scalar $c$ in $\mathbb{R}$, the vector $c\vec{u}$ is in H.

Fact: The subspace definition is geometric, a plane through the origin is a subspace of $\mathbb{R}^3$.

Example 1: Let $H = \begin{Bmatrix}\begin{bmatrix}x\\y\end{bmatrix}: x \geq 0, y \geq 0\end{Bmatrix}$ the first quadrant in the $xy$-plane. Show (a): if $\vec{u}$ and $\vec{v}$ are in H then $\vec{u} + \vec{v}$ are in H, (b): Find a vector $\vec{u}$ and a scalar $c$ such that $c\vec{u}$ is not in H ( this shows V is not a subspace of $\mathbb{R}^2$).

Exercise 1: Let $H = \begin{Bmatrix}\begin{bmatrix}x\\y\end{bmatrix}: x \geq 0, y \geq 0\end{Bmatrix}$ the union of first quadrant and the third quadrant in the $xy$-plane. Show (a): if $\vec{u}$ in H and any scalar $c$, then $c\vec{u}$is in H, (b): Find vectors $\vec{u}$ and $\vec{v}$ in H such that $\vec{u} + \vec{v}$ is not in H.

Fact: 1. The set only has zero vector, $\vec{0}$ is a subspace of $\mathbb{R}^n$ and we call it zero subspace which is written as $\begin{Bmatrix}\vec{0}\end{Bmatrix}$.

2. $\mathbb{R}^2$ is NOT a subspace of $\mathbb{R}^3$ but $H = \begin{Bmatrix}\begin{bmatrix}a\\b\\0\end{bmatrix}: a, b & \text{in} & \mathbb{R}^n\end{Bmatrix}$ is a subspace of $\mathbb{R}^3$.

Theorem: If $\vec{x_{1}}, \cdots, \vec{x_{p}}$ are vectors in $\mathbb{R}^n$, then Span$\begin{Bmatrix}\vec{x_{1}}, \cdots, \vec{x_{p}}\end{Bmatrix}$ is a subspace of $\mathbb{R}^n$.

Example 2: Let H be the set of all vectors of the form $(2a + 3b, -a + 2b, 2a, -b)$ in $\mathbb{R}^4$ where $a, b$ are in $\mathbb{R}$. Show H is a subspace of $\mathbb{R}^4$.

Exercise 2: Let H be the set of all vectors of the form $(s + 4t, -s + t, 2s + t, s - 2t)$ in $\mathbb{R}^4$ where $s, t$ are in $\mathbb{R}$. Show H is a subspace of $\mathbb{R}^4$.

Example 3: Let W be the set of all vectors of the form shown where $a,b,c$ are scalars. Either find a set of vectors that spans W or show W is not a subspace. (a) $\begin{bmatrix}2a + b\\-3a + b\\2\end{bmatrix}$ (b) $\begin{bmatrix}-a + b - c\\2a + b\\4c\\3b + c\end{bmatrix}$.

Exercise 3: Let W be the set of all vectors of the form shown where $a,b,c$ are scalars. Either find a set of vectors that spans W or show W is not a subspace. (a) $\begin{bmatrix}1\\-a + b\\2a-b\end{bmatrix}$ (b) $\begin{bmatrix}-a + 2b - c\\a - b\\0\\3b + 3c\end{bmatrix}$.

Definition: The column space of an $m \times n$ matrix $A$ is the set Col $A$ of all linear combinations of the columns of $A$. The image space of an $m \times n$ matrix $A$, denote Im$A$, are defined by Im$A = \begin{Bmatrix}A\vec{x}|\vec{x} & \text{in} & \mathbb{R}^n\end{Bmatrix}$. Im$A =$ Col $A$ is a subspace of $\mathbb{R}^n$.

Fact: 1. If $A = \begin{bmatrix}\vec{a_{1}}\cdots\vec{a_{n}}\end{bmatrix}$ with the columns in $\mathbb{R}^m$ then Col$A$ is the same as Span$\begin{Bmatrix}\vec{a_{1}}, \cdots, \vec{a_{n}}\end{Bmatrix}$ a subspace of $\mathbb{R}^m$.

2. The vector $\vec{b}$ is a linear combination of the columns of $A$ if and only if $\vec{b}$ can be written as $A\vec{x}$ for some $\vec{x}$, that is, if and only if the equation $A\vec{x} = \vec{b}$ has a solution if and only if $A\vec{x} = \vec{b}$ is consistent and $\vec{b}$ is in Col$A$.

Example 4: Show $\begin{bmatrix}1\\2\\3\end{bmatrix}$ is in the Col$A$ where $A = \begin{bmatrix}1 & 2 & -1\\3 & 0 & 2\\0 & -1 & 2\end{bmatrix}$.

Exercise 4: Show $\begin{bmatrix}2\\1\\-1\end{bmatrix}$ is in the Col$A$ where $A = \begin{bmatrix}2 & 1 & 1\\1 & 0 & -2\\0 & -1 & 2\end{bmatrix}$.

Example 5: Find the values $h$ such that $\vec{y}$ is in the subspace span by $\vec{v_{1}},\vec{v_{2}},\vec{v_{3}}$ where $\vec{y} = \begin{bmatrix}1\\2\\h\end{bmatrix}, \vec{x_{1}} = \begin{bmatrix}-1\\0\\3\end{bmatrix}, \vec{x_{2}} = \begin{bmatrix}0\\2\\4\end{bmatrix}$ and $\vec{x_{3}} = \begin{bmatrix}-2\\4\\14\end{bmatrix}$.

Exercise 5: Find the values $h$ such that $\vec{y}$ is in the subspace span by $\vec{v_{1}},\vec{v_{2}},\vec{v_{3}}$ where $\vec{y} = \begin{bmatrix}1\\h\\3\end{bmatrix}, \vec{x_{1}} = \begin{bmatrix}0\\1\\3\end{bmatrix}, \vec{x_{2}} = \begin{bmatrix}3\\0\\4\end{bmatrix}$ and $\vec{x_{3}} = \begin{bmatrix}6\\-2\\2\end{bmatrix}$.

Group Work 1: True or False. Justify each answer:

a. A subspace of $\mathbb{R}^n$ is any set $H$ such that (i) the zero vector is in $H$, (ii) $\vec{u}, \vec{v}$ and $\vec{u} + \vec{v}$ are in $H$ (iii) $c$ is a scalar, $c\vec{u}$ is in $H$.

b. If $\vec{v_{1}}, \cdots, \vec{v_{p}}$ are in $\mathbb{R}^n$, then span$\begin{Bmatrix}\vec{v_{1}}, \cdots, \vec{v_{p}}\end{Bmatrix}$ is the same as the column space of the matrix $\begin{bmatrix}\vec{v_{1}}, \cdots, \vec{v_{p}}\end{bmatrix}$.

c. The set of all solutions of a system of $m$ homogeneous equations in $n$ unknowns is a subspace of $\mathbb{R}^m$.

d. The null space of an $m \times n$ matrix is a subspace of $\mathbb{R}^n$.

e. The column space of a matrix $A$ is the set of solutions of $A\vec{x} = \vec{b}$.

Group Work 2: Construct a nonzero $3 \times 3$ matrix $A$ and a nonzero vector $\vec{b}$ such that $\vec{b}$ is in Col$A$, but $\vec{b}$ is not the same as any one of the columns of $A$.

Group Work 3: Suppose $F$ is a $5 \times 5$ matrix whose column space is not equal to $\mathbb{R}^5$. What can you say about Nul$F$?

Group Work 4: In each case either show that the statement is true or give an
example showing that it is false.

a. If $U \neq \mathbb{R}^n$ is a subspace of $\mathbb{R}^n$ and $\vec{u} + \vec{v}$ is in $U$ then $\vec{u}$ and $\vec{v}$ are both in $U$.

b. If $U$ is a subspace of $\mathbb{R}^n$ and $r\vec{u}$ is in $U$ for all $r$ in $\mathbb{R}$ then $\vec{u}$ is in $U$.

c. If $U$ is a subspace of $\mathbb{R}^n$ and $\vec{u}$ is in $U$ then $-\vec{u}$ is also in $U$.

d. If $\vec{x}$ is in $U$ and $U =$ span$\begin{Bmatrix}\vec{y}, \vec{z}\end{Bmatrix}$, then $U =$ span$\begin{Bmatrix}\vec{x}, \vec{y}, \vec{z}\end{Bmatrix}$.

e. The empty set of vectors in $\mathbb{R}^n$ is a subspace of $\mathbb{R}^n$.

f. $\begin{bmatrix}0\\1\end{bmatrix}$ is in span$\begin{Bmatrix}\begin{bmatrix}1\\0\end{bmatrix}, \begin{bmatrix}2\\0\end{bmatrix}\end{Bmatrix}$.

Group Work 5: Construct a nonzero $3 \times 3$ matrix $A$ and a vector $\vec{b}$ such that $\vec{b}$ is not in Col$A$.

Group Work 6: If $A$ is a $5 \times 5$ matrix and Nul$A$ is the zero subspace, what can you say about solutions of equations of the form $A\vec{x} = \vec{b}$ for $\vec{b}$ in $\mathbb{R}^5$?

Group Work 7: What can you say about Nul$B$ when $B$ is a $5 \times 4$ matrix with linearly independent columns?