For what values of $a$ does the system have infinite solutions? Find the solutions. The system is 
$$\left\{
\begin{array}{rcr}
x+ay+z & = & 1 \\
ax+y+z & = & 1+a \\
x-y+z  & = & 2+a
\end{array}
\right.$$
After row reducing I got
$$\left\{
\begin{array}{rcr}
x+ay+z & = & 1 \\
-(1+a)y+0 & = & 1+a \\
(1-a)z& = & 2-a + (1-a)(1+a)
\end{array}
\right.$$
In order to have an infinite set of solutions, I want to have $0=0$ in the last row, meaning that $a=1\Rightarrow 0=1,$ which is not what I want. Have I made any arithmetical mistake? Did this computation times now.
 A: It's simpler to perform the  full row reduction for the augmented matrix. We'll put the third equation at top:
\begin{gather}
\begin{bmatrix}
1&-1&1&|&2+a\\1&a&1&|&1\\
a&1&1&|&1+a\end{bmatrix}\rightsquigarrow
\begin{bmatrix}
1&-1&1&|&2+a\\0&1+a&0&|&-1-a\\
0&1+a&1-a&|&1-a-a^2\end{bmatrix} \\[1ex]
\rightsquigarrow \begin{bmatrix}
1&-1&1&|&2+a\\0&1+a&0&|&-1-a\\
0&1+a&1-a&|&2-a^2\end{bmatrix}\rightsquigarrow 
\begin{bmatrix}
1&-1&1&|&2+a\\0&1+a&0&|&-1-a\\
0&0&1-a&|&2-a^2\end{bmatrix}\\
\end{gather}


*

*If $a\ne1,-1$, we can proceed:
\begin{align}
\begin{bmatrix}
1&-1&1&|&2+a\\0&1+a&0&|&-1-a\\
0&0&1-a&|&2-a^2\end{bmatrix}&\rightsquigarrow \begin{bmatrix}
1&-1&1&|&2+a\\0&1&0&|&-1\\
0&0&1&|&\frac{2-a^2}{1-a}\end{bmatrix}\rightsquigarrow  \begin{bmatrix}
1&-1&0&|&\frac a{a-1}\\0&1&0&|& -1\\
0&0&1&|&\frac{2-a^2}{1-a}\end{bmatrix}\\[1ex]
&\rightsquigarrow  \begin{bmatrix}
1&0&0&|&\frac 1{a-1}\\0&1&0&|&-1\\
0&0&1&|&\frac{2-a^2}{1-a}\end{bmatrix}
\end{align}
The (unique) solution is the last column.

*If $a=-1$, the matrix of the system becomes
$$\rightsquigarrow 
\begin{bmatrix}
1&-1&1&|&1\\0&0&0&|&0\\
0&0&2&|&1\end{bmatrix}\rightsquigarrow
\begin{bmatrix}1&-1&1&|&1\\0&0&0&|&0\\
0&0&1&|&\frac12\end{bmatrix}\rightsquigarrow \begin{bmatrix}1&-1&0&|&\frac12\\0&0&0&|&0\\
0&0&1&|&\frac12\end{bmatrix} $$
and the solutions are given by $\;x=y+\frac12$, $z=\frac12$. Vectorially:
$$\begin{bmatrix}x\\y\\z\end{bmatrix}=\begin{bmatrix}\frac12\\0\\\frac12\end{bmatrix}+y\begin{bmatrix}1\\1\\0\end{bmatrix}$$

*If $a=1$, the system becomes
$$
\begin{bmatrix}
1&-1&1&|&3\\0&2&0&|&-2\\
0&0&0&|&1\end{bmatrix}\qquad\text{which is inconsistent.}$$
A: Something has gone wrong with the row reduction. First, we eliminate $x,$ which gives us $$\left\{\begin{array}{rcl}x+ay+z & = & 1 \\(1-a^2)y+(1-a)z & = & 1 \\-(1+a)y  & = & 1+a.\end{array}\right.$$ Next, we exchange the second and third equations, then use the (now) second equation to eliminate $y$ from the (now) third equation, which gives us $$\left\{\begin{array}{rcl}x+ay+z & = & 1 \\-(1+a)y & = & 1+a\\(1-a)z & = & 2-a^2.\end{array}\right.$$
In order to obtain infinite solutions, we need at least one equation to be $0=0,$ with the other equations still being consistent. Taking $a=-1$ readily gives us $$\left\{\begin{array}{rcl}x-y+z & = & 1 \\0 & = & 0\\2z & = & 1,\end{array}\right.$$ which satisfies the desired properties. If $a\neq-1,$ then we can further reduce the second equation, giving us $$\left\{\begin{array}{rcl}x+ay+z & = & 1 \\y & = & -1\\(1-a)z & = & 2-a^2.\end{array}\right.$$ Then, we can eliminate $y$ from the first equation, giving us $$\left\{\begin{array}{rcl}x+z & = & 1+a \\y & = & -1\\(1-a)z & = & 2-a^2.\end{array}\right.$$ Now, the only equation with a left-hand side that can be forced to be $0$ by choosing a value for $a$ is the third one--in particular, when $a=1$--but then the right-hand side isn't $0.$ Finally, when $a\neq\pm1,$ we can further reduce the third equation, then eliminate $z$ from the first equation, giving us $$\left\{\begin{array}{rcl}x & = & 1+a-\frac{2-a^2}{1-a} \\y & = & -1\\z & = & \frac{2-a^2}{1-a}.\end{array}\right.$$ Thus, any $a$ but $\pm1$ will determine a unique solution,  $a=1$ gives no solution, and $a=-1$ gives infinitely-many solutions.
A: The only way for this system not to have a unique solution is if the matrix
$$
\left[
\begin{array}{ccc}
1 & a &1 \\
a & 1 & 1 \\
1 & -1 &1 
\end{array}
\right]
$$
is singular.  Its determinant is $1 - a^2$.  So it's singular if $a =1 $ or $a = -1$.  If $a = 1$, the first two rows are inconsistent equations.  If $a = -1$, the first and the third equations are identical, and the solutions are of the form $(x,y,z) = (y+1/2,y,1/2)$, where $y$ is a slack variable. 
A: The system reduces to 
$\left[\begin{matrix}
1 & 0 & 1 & 1+a\\
0 & -1 & 0 & 1 \\
0 & 0 & 1-a & 1+(1+a)^2
\end{matrix}\right]$ which means $z=\frac{1+(1+a)^2}{1-a}$
It implies for $a$ any value other than $1$ the system can have infinite solutions.
