Decide whether the vector $(2,2,4,1)$ belongs to the span of vectors:
$$(1,1,1,-1)$$ $$(-2,1,3,1)$$ $$(3,2,1,1)$$
so far I have this by using guassian elimination:
Let $(2,2,4,1)$ be known as w
$(1,1,1,-1)$ known as $v_1$
$(-2,1,3,1)$ known as $v_2$
$(3,2,1,1)$ known as $v_3$
$$\begin{vmatrix}2&2&4&1\\1&1&1&-1\\-2&1&3&1\\3&2&1&1 \end{vmatrix}$$ $$...$$ $$\begin{vmatrix}1&0&0&-8\\0&1&0&18\\0&0&1&-11 \\0&0&0&25 \end{vmatrix}$$
No solution/Inconsistant matrix, therefore w∉span $v_1,v_2,v_3$
Would this be correct?
This is only correct when the row operations were performed for each row.
A safer way is to put $w$ as the bottom row.
If you put $w$ as the top row, if during the process, one of the row operation does not involve the previous row, it would fail. Because that would only mean the rows after that operation are dependent of each other.
An alternative way is to put $w$ as a column vector on the right.
Here is a very simple counter example. Let $w=(1,1,1,1), v_1=(0, 1,1,1), v_2=(0,2,2,2)$. See what happens with $w$ on top. In this case the first row is not involved in row operations. So it is not dependent on the other two vectors. However you still get zero row on the bottom. This is because $v_1,v_2$ are linearly dependent.