= Solution
Minimize $\frac12\|\mathbf r\|^2$ subject to $\mathbf n_1\cdot\mathbf r=1$, $\mathbf n_2\cdot\mathbf r=2$, where $\mathbf n_1=(2,1,-1)$ and $\mathbf n_2=(1,-1,1)$. The <Lagrange multiplier> equation gives $\mathbf r=\lambda\mathbf n_1+\mu\mathbf n_2$. Since $\mathbf n_1\cdot\mathbf n_2=0$, $\|\mathbf n_1\|^2=6$, and $\|\mathbf n_2\|^2=3$, the constraints imply $\lambda=1/6$, $\mu=2/3$. Hence
$$
\boxed{\mathbf r_*=(1,-1/2,1/2).}
$$
No explicit parametrization of the line was needed. For any other feasible point, $\mathbf h=\mathbf r-\mathbf r_*$ is <orthogonal> to both normals and therefore to $\mathbf r_*$. The <Pythagorean theorem> gives $\|\mathbf r\|^2=\|\mathbf r_*\|^2+\|\mathbf h\|^2$, proving the unique global minimum. This is the geometric principle behind the <minimum-norm least-squares solution>.
Back to article page