{%hackmd 5xqeIJ7VRCGBfLtfMi0_IQ %}
# Is this vector in the span? Case of yes
## Problem
Let
$$
\bu_1 = \begin{bmatrix} 1 \\ 1 \\ 1 \\ 1 \end{bmatrix},\
\bu_2 = \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \end{bmatrix},\ \text{ and }
\bb = \begin{bmatrix} 5 \\ 7 \\ 9 \\ 11 \end{bmatrix}.
$$
and $S = \{\bu_1, \bu_2\}$. Is $\bb$ in $\vspan(S)$?
## Thought
Recall that $\vspan(S)$ contains all vectors of the form $c_1\bu_1 + c_2\bu_2$ for some $c_1,c_2\in\mathbb{R}$. By definition, $\bb\in\vspan(S)$ if and only if there are $c_1, c_2\in\mathbb{R}$ such that $c_1\bu_1 + c_2\bu_2 = \bb$. Therefore, the problem is equivalent to whether
$$
\begin{aligned}
c_1 + c_2 &= 5, \\
c_1 + 2c_2 &= 7, \\
c_1 + 3c_2 &= 9, \\
c_1 + 4c_2 &= 11 \\
\end{aligned}
$$
has a solution or not.
## Sample answer
The equation $c_1\bu_1 + c_2\bu_2 = \bb$ is equivalent to
$$
\begin{aligned}
c_1 + c_2 &= 5, \\
c_1 + 2c_2 &= 7, \\
c_1 + 3c_2 &= 9, \\
c_1 + 4c_2 &= 11. \\
\end{aligned}
$$
By solving the system, we have $c_1 = 3$ and $c_2 = 2$. Therefore, $\bb = 3\bu_1 + 2\bu_2$ and $\bb$ is in $\vspan(S)$.
## Note
One may visualize $\bb$ and $\vspan(S)$ as the picture below.

*This note can be found at Course website > Learning resources.*