For what values of $a$ is the vector $(a ^ 2, a, 1)$ in $\langle (1,2,3), (1,1,1), (0,1,2) \rangle$? For what values of $a$ is the vector $(a ^ 2, a, 1)$ in $\langle (1,2,3), (1,1,1), (0,1,2) \rangle$?
My question is, should I find scalars $ \alpha, \beta, \gamma $ such that $ \alpha (1,2,3) + \beta (1,1,1) + \gamma (0,1,2) = (a ^ 2, a, 1) $?
How can I prove that a vector is in the generator set?
Could you give me an idea?
 A: Note that $(1,2,3)=(1,1,1)+(0,1,2)$,
so the elements of the span can be expressed as simply $\beta(1,1,1)+\gamma(0,1,2)$.
Thus we have $(a^2,a,1)=\beta(1,1,1)+\gamma(0,1,2)$, or
$a^2=\beta, a=\beta+\gamma, $ and $1=\beta+2\gamma$.
Thus $\gamma=a-a^2=1-a$, or $a^2-2a+1=0$.  Now can you find $a$?
A: The span of $(1,2,3), (1,1,1), (0,1,2)$ is the span of $(1,2,3), (1,1,1)$ (because $(1,2,3)-(1,1,1)=(0,1,2)$). So you shoud resolve a sistem of three equations in three variable:
$\alpha(1,1,1)+\beta(1,2,3)=(a^2,a,1)$
A: $ \alpha (1,2,3) + \beta (1,1,1) + \gamma (0,1,2) = (a ^ 2, a, 1) $
this becomes the following system of equations:
$\alpha + \beta  +0 \gamma=a^2$
$2\alpha + \beta  + \gamma=a$
$3\alpha + \beta  +2 \gamma=1$
Solving by gauss elimination:
First write the system in augmented matrix form
$
\begin{bmatrix}
1 & 1 & 0 & a^2\\
2 & 1 & 1 & a  \\
3 & 1 & 2 & 1       
\end{bmatrix}$
$r_2 \to r_2-2r_1$ and  $r_3 \to r_3-3r_1$
$
\begin{bmatrix}
1 & 1 & 0 & a^2\\
0 & -1 & 1 & a-2a^2  \\
0 & -2 & 2 & 1-3a^2       
\end{bmatrix}$
$r_2 \to -r_2$
$
\begin{bmatrix}
1 & 1 & 0 & a^2\\
0 & 1 & -1 & 2a^2-a  \\
0 & -2 & 2 & 1-3a^2       
\end{bmatrix}$
$r_1 \to r_1-r_2$ and  $r_3 \to r_3+2r_2$
$
\begin{bmatrix}
1 & 0 & 1 & a-a^2\\
0 & 1 & -1 & 2a^2-a  \\
0 & 0 & 0 & a^2-2a+1       
\end{bmatrix}$
$a^2-2a+1$ should equal zero to have infinite solutions or there is no  solutions
so
$a^2-2a+1=0 \to (a-1)^2=0  \to a=1$
after substituting $a=1$ the matrix become:
$
\begin{bmatrix}
1 & 0 & 1 & 0\\
0 & 1 & -1 & 1  \\
0 & 0 & 0 & 0       
\end{bmatrix}$
$\alpha+\gamma=0$
$\beta-\gamma=1$
$\gamma=t  \to  \alpha=-t$ and $\beta=1+t $
$ t \in \mathbb{R}$
A: Hint If the given set $S$ of three vectors is linearly independent, then it spans $\Bbb R^3$, and in particular ${\bf a} := (a^2, a, 1)^\top$ is in the span for all $a$.
On the other hand, if $S$ is linearly dependent, then we can write $\operatorname{span} S = \operatorname{span}({\bf x}, {\bf y})$ for some vectors ${\bf x}$, ${\bf y}$. So, if ${\bf a} \in \operatorname{span} S$, the triple $({\bf x}, {\bf y}, {\bf a})$ is itself linearly dependent, i.e., $$\det \pmatrix{{\bf x} & {\bf y} & {\bf a}} = 0 .$$ But that determinant is just a (quadratic) polynomial in $a$. (In principle we must check to ensure that the roots $a$ indeed give solutions, but for the set of vectors in the problem statement, that follows automatically in this case from the fact that $\dim \operatorname{span} S = 2$.)
N.b. this method works for any generating set $S$ of a subspace and any $1$-parameter family ${\bf f}(a)$ of vectors.
