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.

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.
