Determining if a vector is in the row space I am just trying to determine if the vector $[0, 7, 4]$ belongs in the row space of the matrix $$A =  \begin{bmatrix}
        1 & 2 & 0 \\
        3 & -1 & 4 \\
        1 & -5 & 4 \\
        \end{bmatrix}
$$
What I have done so far is created an augmented matrix like so
$$ \left[
\begin{array}{ccc|c}
        1 & 3 & 1 & 0 \\
        2 & -1 & -5 & 7 \\
        0 & 4 & 4 & 4 \\
        \end{array}
\right]
$$
(naive gaussian) reducing to 
$$ \left[
\begin{array}{ccc|c}
        1 & 3 & 1 & 0 \\
        0 & -7 & -7 & 7 \\
        0 & 0 & 0 & 32/7 \\
        \end{array}
\right]
$$
returning inconsistent, i.e. not existing in the row space. However apparently it does in fact belong in the row space, so clearly I have gone about this the wrong way. Is someone able to correct this?
 A: A vector $\vec b$ is in the row space of $A$ if and only if $\vec b$ is in the column space of $A^\top$. Thus, to determine if the vector $\vec b=\left[\begin{array}{r}
0 \\
7 \\
4
\end{array}\right]$ is in the row space of $A = \left[\begin{array}{rrr}
1 & 2 & 0 \\
3 & -1 & 4 \\
1 & -5 & 4
\end{array}\right]$, form the augmented matrix
$$
\left[\begin{array}{rrr|r}
1 & 3 & 1 & 0 \\
2 & -1 & -5 & 7 \\
0 & 4 & 4 & 4
\end{array}\right]
$$
Row reducing gives
$$
\DeclareMathOperator{rref}{rref}\rref\left[\begin{array}{rrr|r}
1 & 3 & 1 & 0 \\
2 & -1 & -5 & 7 \\
0 & 4 & 4 & 4
\end{array}\right]=
\left[\begin{array}{rrr|r}
1 & 0 & -2 & 0 \\
0 & 1 & 1 & 0 \\
0 & 0 & 0 & 1
\end{array}\right]
$$
This gives an inconsistent system. Hence $\vec b$ is not in the row space of $A$.
A: Your working is fine.
Consider the matrix$$ \begin{bmatrix}
        1 & 2 & 0 \\
        3 & -1 & 4 \\
        1 & -5 & 4 \\
        \end{bmatrix}$$
Minus $2$ times of row $1$ plus row $2$ gives us row $3$, the row space is spanned by the first two rows.
Suppose $$a\begin{bmatrix} 1 & 2 & 0 \end{bmatrix} + b\begin{bmatrix} 3 & -1 & 4 \end{bmatrix}=\begin{bmatrix} 0 & 7 & 4 \end{bmatrix}$$
From the third coordinate, $b=1$. 
Hence $a+3=0$ and $2a-1=7$ of which we can see a contradiction. 
