determine if vector w =[-1 1 1] is in the row span of matrix A $$ A = \left[\begin{array}{rrrr} 1 & 0 & -1 \\ 1 & 1 & 1  \end{array}\right]$$
I am trying to see if $W=[-1, 1, 1]$ is in the row span, so I'm supposed to setup an augmented matrix and see if it works. but I'm not sure how to determine the answer. so I set up a augmented matrix with w being a row vector in A (not sure how to show the line in row format
$$ \left[\begin{array}{rrrr} 1 & 0 & -1 \\ 1 & 1 & 1 
                \\-1 & 1 & 1 \end{array}\right]$$
so I end up with a reduce matrix of:
$$ \left[\begin{array}{rrrr} 1 & 0 & -1 \\ 0 & 1 & 2 
                \\0 & 0 & -2 \end{array}\right]$$
how do I see if these are linear combinations of each other? if this was a column setup I would know that if there was a component left in the right side that the matrix was inconsistent but I'm not sure how to read the data this way.
 A: If the given vector $w$ is in the span of the two vectors, then the rank of the augmented matrix is the same as the rank of the non augmented one. If the rank increases, then the vector can't be in the span: in fact, row reduction preserves the row space.
By row reduction you have found that the rank of the augmented matrix is $3$, so the last vector is not in the span of the first two.
However, it's better to use column vectors, because this gives more information; for the given vector the information is the same, but for one in the span, row reduction will also give the coefficients for expressing it as a linear combination.
For instance, if $w=[-1\ 1\ 3]$, row reduction on
$$
\begin{bmatrix}
1 & 1 & -1 \\
0 & 1 & 1 \\
-1 & 1 & 3
\end{bmatrix}
$$
would give
\begin{align}
\begin{bmatrix}
1 & 1 & -1 \\
0 & 1 & 1 \\
-1 & 1 & 3
\end{bmatrix}
&\to
\begin{bmatrix}
1 & 1 & -1 \\
0 & 1 & 1 \\
0 & 2 & 2
\end{bmatrix}
\\
&\to
\begin{bmatrix}
1 & 1 & -1 \\
0 & 1 & 1 \\
0 & 0 & 0
\end{bmatrix}
\\
&\to
\begin{bmatrix}
1 & 0 & -2 \\
0 & 1 & 1 \\
0 & 0 & 0
\end{bmatrix}
\end{align}
where the last step is backwards elimination for getting the reduced echelon form. This tells you that the last column $a_3$ is $-2a_1+a_2$ (calling $a_i$ the columns of the original matrices).
Of course such information can also be retrieved from elimination on the transposed matrix, but with column vectors it's more easily visible.
A: Since no row ends up being all zeros, the vectors are linearly independent, hence, $w$ is not spanned by the rows of the initial matrix. Alternatively, you could look at $$\begin{vmatrix} 1 & 0 & -1 \\ 0 & 1 & 2 
                \\0 & 0 & -2 \end{vmatrix} = -2 \neq 0,$$ and conclude the same thing.
