Solution (source code)

= Solution

The required <matrix> form of the <linear system> is
$$
\boxed{A=\begin{pmatrix}1&1&2\\1&0&\lambda\\1&\lambda&2\end{pmatrix},\qquad\mathbf x=\begin{pmatrix}x\\y\\z\end{pmatrix},\qquad\mathbf b=\begin{pmatrix}1\\\mu\\2\end{pmatrix},\qquad A\mathbf x=\mathbf b.}
$$
Subtract the first row from the third and expand the <determinant> along the resulting row:
$$
\det A=-(\lambda-1)\det\begin{pmatrix}1&2\\1&\lambda\end{pmatrix}=(\lambda-1)(2-\lambda).
$$
Thus the <linear system> has a unique solution, for every real $\mu$, precisely when $\boxed{\lambda\ne1,2}$.

For $\lambda=0$, the second equation gives $x=\mu$. Subtracting the first equation from the third gives $-y=1$, and the first equation then determines $z$:
$$
\boxed{\lambda=0:\quad(x,y,z)=(\mu,-1,1-\mu/2),\qquad\mu\in\mathbb R.}
$$
For $\lambda=1$, the first and third left-hand sides are identical but their right-hand sides are $1$ and $2$. Hence
$$
\boxed{\lambda=1:\quad\text{no solution for any }\mu.}
$$
For $\lambda=2$, subtracting the first equation from the third gives $y=1$. The first equation now gives $x+2z=0$, while the second requires $x+2z=\mu$. Consequently
$$
\boxed{\lambda=2:\quad\begin{cases}(x,y,z)=(-2t,1,t),\quad t\in\mathbb R,&\mu=0,\\\text{no solution},&\mu\ne0.\end{cases}}
$$
The <free variable in a linear system> in the consistent singular case describes a <line> of solutions. These direct reductions distinguish an inconsistent <linear system> from one with infinitely many solutions, which a zero <determinant> alone cannot do.