How to find matrix from general solution?

Find a $2 \times 3$ system (two equations with three unknowns) such that its general solution has form $\begin{pmatrix}1\\1\\0 \end{pmatrix}+s\begin {pmatrix}1\\2\\1\end{pmatrix},\ s \in \Bbb R.$

I tried thinking that $s\begin {pmatrix}1\\2\\1\end{pmatrix}$ is solution to kernel of asked matrix, and tried matrix $\begin {pmatrix}1&-1&1\\1&-1&1\end{pmatrix}$, but it also includes $\begin{pmatrix}1\\1\\0 \end{pmatrix}$ in its kernel!

One can translate the first two components of $u= (x,y,z)^T= (s+1, 2s+1, s)^T$ into the following system $Au=b$, the third component stays free and acts as $z=s$: $$x = s + 1 = z + 1 \iff x - z = 1 \\ y = 2s + 1 = 2 z + 1 \iff y - 2 z = 1 \\$$ Or written as augmented matrix $$(A\mid b) = \left( \begin{array}{rrr|r} 1 & 0 & -1 & 1 \\ 0 & 1 & -2 & 1 \\ \end{array} \right)$$
• What I could understand is since we need only one free variable, we have put pivot in first two columns and found third column by solving $\left( \begin{array}{rrr} 1 & 0 & m \\ 0 & 1 & n \\ \end{array} \right)(1\ 2\ 1)^T=(0\ 0)^T$ and then fourth column by multiplying this matrix by $(1\ 1\ 0)^T$ Am I right? – Silent Nov 23 '15 at 3:03
• I added some more detail how the equation of the solution, a line with position vector and $s$ times direction, was directly translated into an ihomogenous system with one free variable $z$. – mvw Nov 23 '15 at 3:20
Let $$A\mathbf{x}=\mathbf{b}\tag{1}$$ be the system in matrix form, where $A$ is the coefficient matrix for the asked system in matrix form. Where $\mathbf{x}=\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix}$
Notice that $\ker(A)=\{k\mathbf{v}|k\in\mathbb{R}\}$, where $\mathbf{v}=\begin{pmatrix}1\\2\\1\end{pmatrix}$ You can take any matrix $A$ as above, for instance $$A=\begin{pmatrix}2&-1&0\\0&1&-2\end{pmatrix}$$ since $\mathbf{x}=\begin{pmatrix}1\\1\\0\end{pmatrix}$ is a particular solution we have $\mathbf{b}=\begin{pmatrix}2&-1&0\\0&1&-2\end{pmatrix}\begin{pmatrix}1\\1\\0\end{pmatrix}=\begin{pmatrix}1\\1\\0\end{pmatrix}$. Hence the system $$\begin{pmatrix}2&-1&0\\0&1&-2\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}1\\1\\0\end{pmatrix}$$ satisfies the problem.