## Example

A question that often comes up is determining if two sets of vectors have the same span.

Let $$P = \{v_1,v_2\}$$ and $$Q = \{u_1,u_2\}$$ where $$v_1 = \begin{bmatrix} 1 \\ 1 \\ 0\end{bmatrix}$$, $$v_2 = \begin{bmatrix} 2 \\1 \\-1\end{bmatrix}$$, $$u_1 = \begin{bmatrix} 1 \\ 0 \\ -1\end{bmatrix}$$, $$u_2 = \begin{bmatrix} -2 \\-1 \\1\end{bmatrix}$$. We give an outline that shows that $$\operatorname{span}(P)=\operatorname{span}(Q)$$.

Since we are attempting to establish the equality of two sets of vectors, what we need to do is to show that either set is a subset of the other.

Recall that if a vector space $$V$$ contains the vectors $$x_1,\ldots,x_k$$, then $$\operatorname{span}(\{x_1,\ldots, x_k\})$$ is a subspace of $$V$$.

Hence, to show that $$\operatorname{span}(P)\subseteq\operatorname{span}(Q)$$, it suffices to show that $$v_1,v_2 \in \operatorname{span}(Q)$$. And to show that $$\operatorname{span}(Q)\subseteq\operatorname{span}(P)$$, it suffices to show that $$u_1,u_2 \in \operatorname{span}(P)$$.

We now give the details for showing $$v_1 \in \operatorname{span}(Q)$$.

To show that $$v_1 \in \operatorname{span}(Q)$$, we need to write $$v_1$$ as a linear combination of $$u_1$$ and $$u_2$$. Hence, we need to find real numbers $$\alpha$$ and $$\beta$$ such that $v_1 = \alpha u_1 + \beta u_2.$ In other words, we need to solve the tuple equation $\alpha~\begin{bmatrix} 1 \\ 0 \\ -1\end{bmatrix}+ \beta~\begin{bmatrix} -2 \\-1 \\1\end{bmatrix}= \begin{bmatrix} 1 \\ 1 \\ 0\end{bmatrix}.$ Rewriting this in matrix form, we get $\begin{bmatrix} 1 & -2\\ 0 &-1 \\ -1& 1\end{bmatrix} \begin{bmatrix} \alpha \\ \beta \end{bmatrix}= \begin{bmatrix} 1 \\ 1 \\ 0\end{bmatrix}.$

Row reducing the augmented matrix gives $$\begin{bmatrix} 1 & 0 &-1\\ 0 &1 &-1 \\ 0& 0 &0\end{bmatrix}.$$ Hence, $$\alpha = \beta = -1$$ is a solution. Thus $$v_1\in \operatorname{span}(Q)$$.

One can now go on to show that $$v_2\in \operatorname{span}(Q)$$. That will give $$\operatorname{span}(P) \subseteq \operatorname{span}(Q)$$.

To show that $$\operatorname{span}(P) \subseteq \operatorname{span}(Q)$$, one shows that $$u_1\in \operatorname{span}(P)$$ and $$u_2\in \operatorname{span}(P)$$.

The above looks like a tedious process. But an observation can lead to a simpler procedure.

To decide if $$u_1, u_2$$ is in the span of $$P$$, we are really determining if the system $$Ax = b$$, where the columns of $$A$$ are $$v_1, v_2$$ and $$x = \begin{bmatrix} \alpha \\ \beta\end{bmatrix}$$, has a solution for each choice of $$b \in \{u_1, u_2\}$$. We can answer this by first row reducing the extended augmented matrix $\left[ \begin{array}{rr|rr} 1 & 2 & 1 & -2 \\ 1 & 1 & 0 & -1 \\ 0 & -1 & -1 & 1 \end{array} \right]$ to obtain $\left[ \begin{array}{rr|rr} 1 & 0 & -1 & 0 \\ 0 & 1 & 1 & -1 \\ 0 & 0 & 0 & 0 \end{array} \right].$ This tells us that $$-v_1 + v_2 = u_1$$ and $$-v_2 = u_2$$.

Similary, to decide if $$v_1, v_2$$ is in the span of $$Q$$, we row reduce the extended augmented matrix $\left[ \begin{array}{rr|rr} 1 & -2 & 1 & 2 \\ 0 & -1 & 1 & 1 \\ -1 & 1 & 0 & -1 \end{array} \right].$ The remaining details are left as an exercise.

## Exercise

Fill in the details of the example above.