Solution (source code)

= Solution

Let $[A\mid b]$ be the <augmented matrix> of the <linear system>. Consistency means that $b$ is in the <column space> of $A$, equivalently $\operatorname{rank}[A\mid b]=\operatorname{rank}A$. For a consistent system, choosing one solution $x_0$ gives every solution as $x_0+\ker A$. The <rank-nullity theorem> therefore gives the complete classification:

* \b[Unique:] $\operatorname{rank}A=3$, equivalently $\det A\ne0$.
* \b[Infinitely many:] $\operatorname{rank}[A\mid b]=\operatorname{rank}A<3$.
* \b[None:] $\operatorname{rank}[A\mid b]>\operatorname{rank}A$.

For the given equations, subtracting the first from the second and the second from the third gives
$$
(\lambda-1)z=1,\qquad y=2.
$$
If $\lambda=0$, then $z=-1$ and the first equation gives $x=0$. If $\lambda=1$, the first reduced equation is $0=1$, so the system is inconsistent. Thus
$$
\boxed{\lambda=0:\ (x,y,z)=(0,2,-1);\qquad
\lambda=1:\ \text{no solution}.}
$$
These conclusions can also be checked from $\det A=1-\lambda$, but the row differences exhibit the inconsistency directly.