<s>[INST] 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.
 [/INST] 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.}$$
</s>