If $A=\begin{bmatrix}1&1&2 \cr 1&0&1 \cr 2&1&3\end{bmatrix}$ and $b=\begin{bmatrix} -1 \cr 0 \cr 2\end{bmatrix},$ determine if $b$ is the column space of $A$ and if so express it as a linear combination.
I know if it were a column space, then the following would true.
$$c_1\begin{bmatrix} 1\cr 1 \cr 2\end{bmatrix}+c_2\begin{bmatrix} 1\cr 0 \cr 1\end{bmatrix}+c_3\begin{bmatrix} 2\cr 1 \cr 3\end{bmatrix}=\begin{bmatrix} -1\cr 0 \cr 2\end{bmatrix}$$
Now, I could just do a $3 \times 3$ system of equations to see if we can find the constants $c_i.$
However, if we have a $4 \times 4$ or a $5 \times 5$ and so on, it would be tedious to solve such a system. I remember someone telling me that we can find $c_i$ by the following.
$$A \cdot \begin{bmatrix}c_1 \cr c_2 \cr c_3\end{bmatrix} = \begin{bmatrix} -1\cr 0 \cr 2\end{bmatrix}$$
But that doesn't seem right. I guess what I'm asking is for a faster method of solving for the constants.
Subtract the first row from the third row, then we obtain the second row. That is, $R_2=R_3-R_1$. But you observe, if we denote $b=(b_1,b_2,b_3)^t$ then $b_2\neq b_3-b_1$. Hence $b$ is not in the column space of $A$.
For a matrix $A_{n\times n}$, a vector $b$ is in the column space of $A$ iff $Ax=b$ has a solution.
Now the solution exists iff $\operatorname{rank}(A|b)=\operatorname{rank}(A)$.
Reason:
If we denote $A=(C_1$ $C_2\dots C_n)$, where $C_i$s are column vectors. Then $b\in\operatorname{span}\{C_1,C_2,\dots,C_n\}$
$\Leftrightarrow\operatorname{dim}(\operatorname{span}\{C_1,C_2,\dots,C_n\})=\operatorname{dim}(\operatorname{span}\{C_1,C_2,\dots,C_n,b\})$.
So row reduce $A|b$ to find the rank. Now usually you can do either row or column operation to find the rank. But here we do only the row operations. Because by doing only row operations, simultaneously you can find the rank of $A$ also.