Solution (source code)

= Solution

<Gaussian elimination> gives the <row operations> $R_2\leftarrow R_2-3R_1$, $R_3\leftarrow R_3-R_1$, $R_4\leftarrow R_4-2R_1$, producing the lower three rows $(0,1,4,1)$, $(0,1,4,1)$, $(0,-3,2,-1)$. Subtract the new row two from row three and add three times row two to row four; the remaining nonzero row is $(0,0,14,2)$. Move it above the zero row and finish elimination to obtain
$$
\operatorname{rref}(A)=\begin{pmatrix}1&0&0&-2/21\\0&1&0&3/7\\0&0&1&1/7\\0&0&0&0\end{pmatrix}.
$$
The <pivot> columns are one, two and three. <Row operations> preserve the <linear dependence> relations among columns, so the corresponding columns of the original <matrix> form a <basis> for the <column space>, which is the image of the <linear map>:
$$
\boxed{\left\{\begin{pmatrix}3\\9\\3\\6\end{pmatrix},\begin{pmatrix}1\\4\\2\\-1\end{pmatrix},\begin{pmatrix}-1\\1\\3\\0\end{pmatrix}\right\}.}
$$
In particular, the <matrix rank> is three. Columns of the reduced <matrix> itself would generally give a different subspace, so the original columns must be used.