Since a vector on the line has to be on each plane, it has to be a solution of a linear system. We have the following equations

which is a linear system with 2 equations in 3 unknowns. We can write it in an augmented matrix as
![{\displaystyle \left[{\begin{array}{ccc|c}0&1&-1&1\\2&1&1&2\end{array}}\right]}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/490bf768129d993f324a9548e2b97737c262d155)
We will swap the first two rows and then row reduce to get
![{\displaystyle \left[{\begin{array}{ccc|c}1&0&1&1/2\\0&1&-1&1\end{array}}\right].}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/a8009e1a1bf893307106b1630476056151aac199)
We notice there is a free variable and we let x = t. We then get

Therefore we get that the solution, s, is
![{\displaystyle \mathbf {s} =\mathbf {s} _{0}+t\mathbf {v} =\left[0,{\frac {3}{2}},{\frac {1}{2}}\right]+t[1,-1,-1].}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/82b05c3f5c530a418325997f8000eb03c58043dc)
The direction part of the line, v is [1,-1,-1]. However to make it length 1 we must divide by its magnitude,
to get,
![{\displaystyle \mathbf {\hat {v}} ={\frac {1}{\sqrt {3}}}[1,-1,-1]}](https://wiki.ubc.ca/api/rest_v1/media/math/render/svg/63bcbb203027a32126fdd1158a72ab7017755f20)
just like in solution 1.