Linear Algebra – General Solution of Linear System of Equations

linear algebramatricessystems of equationsvectors

Assuming that $\lambda$ is any number, does below set of equations have a solution? If it has, find the general solution for this system.
$$\lambda x_1+x_2+x_3=1$$
$$x_1+\lambda x_2+x_3=\lambda$$
$$x_1+x_2+\lambda x_3=\lambda^2$$
I understand how this problem should be solved, however when transform this set to a matrix and then row reduce it to an echolon form I get:
$$B=\left(\begin{array}{ccc|c}
1 & 1 & \lambda & \lambda\\
0 & \lambda-1 & 1-\lambda & \lambda-\lambda^2\\
0 & 0 & (\lambda-1)(\lambda+2) & \lambda^3+\lambda^2-\lambda-1\end{array}\right)$$
But from this point I start to struggle, don't really know where I'm making mistake.

Best Answer

$$\lambda x_1+x_2+x_3=1$$ $$x_1+\lambda x_2+x_3=\lambda$$ $$x_1+x_2+\lambda x_3=\lambda^2$$ Adding all three equations together gives $$(\lambda+2)(x_1+x_2+x_3)=1+\lambda+\lambda^2$$ If $\lambda=-2$ we have $0=1+(-2)+(-2)^2=3$, which is absurd. Thus we can divide by $\lambda+2$:

$$x_1+x_2+x_3=\frac{1+\lambda+\lambda^2}{\lambda+2}$$ Subtracting this from all three original equations gives $$(\lambda-1)x_1=1-\frac{1+\lambda+\lambda^2}{\lambda+2}$$ $$(\lambda-1)x_2=\lambda-\frac{1+\lambda+\lambda^2}{\lambda+2}$$ $$(\lambda-1)x_3=\lambda^2-\frac{1+\lambda+\lambda^2}{\lambda+2}$$ If $\lambda=1$, all three of the original equations reduce to $x_1+x_2+x_3=1$, whose solution is simply $$x_1=p,x_2=q,x_3=1-p-q\qquad p,q\in\mathbb R\tag1$$ Otherwise, dividing by $\lambda-1$ gives the unique solution of $$x_1=\frac{1-\frac{1+\lambda+\lambda^2}{\lambda+2}}{\lambda-1}=\frac1{\lambda+2}-1\\ x_2=\frac{\lambda-\frac{1+\lambda+\lambda^2}{\lambda+2}}{\lambda-1}=\frac1{\lambda+2}\\ x_3=\frac{\lambda^2-\frac{1+\lambda+\lambda^2}{\lambda+2}}{\lambda-1}=\frac{(\lambda+1)^2}{\lambda+2}\tag2$$ In conclusion, the solutions of the linear system are

  • as in $(1)$ if $\lambda=1$
  • none if $\lambda=-2$
  • as in $(2)$ otherwise.