
# 9.2: Spanning Sets


Learning Objectives
• Determine if a vector is within a given span.

In this section we will examine the concept of spanning introduced earlier in terms of $$\mathbb{R}^n$$. Here, we will discuss these concepts in terms of abstract vector spaces.

Consider the following definition.

Definition $$\PageIndex{1}$$: Subset

Let $$X$$ and $$Y$$ be two sets. If all elements of $$X$$ are also elements of $$Y$$ then we say that $$X$$ is a subset of $$Y$$ and we write $X \subseteq Y$

In particular, we often speak of subsets of a vector space, such as $$X \subseteq V$$. By this we mean that every element in the set $$X$$ is contained in the vector space $$V$$.

Definition $$\PageIndex{1}$$: Linear CombinationLinear Combination

Let $$V$$ be a vector space and let $$\vec{v}_1, \vec{v}_2, \cdots, \vec{v}_n \subseteq V$$. A vector $$\vec{v} \in V$$ is called a linear combination of the $$\vec{v}_i$$ if there exist scalars $$c_i \in \mathbb{R}$$ such that $\vec{v} = c_1 \vec{v}_1 + c_2 \vec{v}_2 + \cdots + c_n \vec{v}_n$

This definition leads to our next concept of span.

Definition $$\PageIndex{1}$$: Span of Vectors

Let $$\{\vec{v}_{1},\cdots ,\vec{v}_{n}\} \subseteq V$$. Then $\mathrm{span}\left\{ \vec{v}_{1},\cdots ,\vec{v}_{n}\right\} = \left\{ \sum_{i=1}^{n}c_{i}\vec{v}_{i}: c_{i}\in \mathbb{R} \right\}$

When we say that a vector $$\vec{w}$$ is in $$\mathrm{span}\left\{ \vec{v}_{1},\cdots ,\vec{v}_{n}\right\}$$ we mean that $$\vec{w}$$ can be written as a linear combination of the $$\vec{v}_1$$. We say that a collection of vectors $$\{\vec{v}_{1},\cdots ,\vec{v}_{n}\}$$ is a spanning set for $$V$$ if $$V = \mathrm{span} \{\vec{v}_{1},\cdots ,\vec{v}_{n}\}$$.

Consider the following example.

Example $$\PageIndex{1}$$: Matrix Span

Let $$A = \left [ \begin{array}{rr} 1 & 0 \\ 0 & 2 \end{array}\right ]$$, $$B = \left [ \begin{array}{rr} 0 & 1 \\ 1 & 0 \end{array}\right ]$$. Determine if $$A$$ and $$B$$ are in $\mathrm{span}\left\{ M_1, M_2 \right\} = \mathrm{span} \left\{ \left [ \begin{array}{rr} 1 & 0 \\ 0 & 0 \end{array}\right ], \left [ \begin{array}{rr} 0 & 0 \\ 0 & 1 \end{array}\right ] \right\}$

Solution

First consider $$A$$. We want to see if scalars $$s,t$$ can be found such that $$A = s M_1 + t M_2$$. $\left [ \begin{array}{rr} 1 & 0 \\ 0 & 2 \end{array}\right ] = s \left [ \begin{array}{rr} 1 & 0 \\ 0 & 0 \end{array}\right ] + t \left [ \begin{array}{rr} 0 & 0 \\ 0 & 1 \end{array}\right ]$ The solution to this equation is given by \begin{aligned} 1 &=& s \\ 2 &=& t\end{aligned} and it follows that $$A$$ is in $$\mathrm{span} \left\{ M_1, M_2 \right\}$$.

Now consider $$B$$. Again we write $$B = sM_1 + t M_2$$ and see if a solution can be found for $$s, t$$. $\left [ \begin{array}{rr} 0 & 1 \\ 1 & 0 \end{array}\right ] = s \left [ \begin{array}{rr} 1 & 0 \\ 0 & 0 \end{array}\right ] + t \left [ \begin{array}{rr} 0 & 0 \\ 0 & 1 \end{array}\right ]$ Clearly no values of $$s$$ and $$t$$ can be found such that this equation holds. Therefore $$B$$ is not in $$\mathrm{span} \left\{ M_1, M_2 \right\}$$.

Consider another example.

Example $$\PageIndex{1}$$: Polynomial Span

Show that $$p(x) = 7x^2 + 4x - 3$$ is in $$\mathrm{span}\left\{ 4x^2 + x, x^2 -2x + 3 \right\}$$.

Solution

To show that $$p(x)$$ is in the given span, we need to show that it can be written as a linear combination of polynomials in the span. Suppose scalars $$a, b$$ existed such that $7x^2 +4x - 3= a(4x^2+x) + b (x^2-2x+3)$ If this linear combination were to hold, the following would be true: \begin{aligned} 4a + b &=& 7 \\ a - 2b &=& 4 \\ 3b &=& -3 \end{aligned}

You can verify that $$a = 2, b = -1$$ satisfies this system of equations. This means that we can write $$p(x)$$ as follows: $7x^2 +4x-3= 2(4x^2+x) - (x^2-2x+3)$

Hence $$p(x)$$ is in the given span.

Consider the following example.

Example $$\PageIndex{1}$$: Spanning Set

Let $$S = \left\{ x^2 + 1, x-2, 2x^2 - x \right\}$$. Show that $$S$$ is a spanning set for $$\mathbb{P}_2$$, the set of all polynomials of degree at most $$2$$.

Solution

Let $$p(x)= ax^2 + bx + c$$ be an arbitrary polynomial in $$\mathbb{P}_2$$. To show that $$S$$ is a spanning set, it suffices to show that $$p(x)$$ can be written as a linear combination of the elements of $$S$$. In other words, can we find $$r,s,t$$ such that: $p(x) = ax^2 +bx + c = r(x^2 + 1) + s(x -2) + t(2x^2 - x)$

If a solution $$r,s,t$$ can be found, then this shows that for any such polynomial $$p(x)$$, it can be written as a linear combination of the above polynomials and $$S$$ is a spanning set.

\begin{aligned} ax^2 +bx + c &=& r(x^2 + 1) + s(x -2) + t(2x^2 - x) \\ &=& rx^2 + r + sx - 2s + 2tx^2 - tx \\ &=& (r+2t)x^2 + (s-t)x + (r-2s) \end{aligned}

For this to be true, the following must hold: \begin{aligned} a &=& r+2t \\ b &=& s-t \\ c &=& r-2s\end{aligned}

To check that a solution exists, set up the augmented matrix and row reduce: $\left [ \begin{array}{rrr|r} 1 & 0 & 2 & a \\ 0 & 1 & -1 & b \\ 1 & -2 & 0 & c \end{array} \right ] \rightarrow \cdots \rightarrow \left [ \begin{array}{rrr|c} 1 & 0 & 0 & \frac{1}{2} a + 2b + \frac{1}{2}c\\ 0 & 1 & 0 & \frac{1}{4}a - \frac{1}{4}c \\ 0 & 0 & 1 & \frac{1}{4}a - b - \frac{1}{4}c \end{array} \right ]$

Clearly a solution exists for any choice of $$a,b,c$$. Hence $$S$$ is a spanning set for $$\mathbb{P}_2$$.