<s>[INST] Solving systems of equation with unknown How do i solve this system? 
$$
\left\{ 
\begin{array}{c}
ax+y+z=1 \\ 
x+ay+z=a \\ 
x+y+az=a^2
\end{array}
\right. 
$$
Ive reduced to this form. How should i continue to get infinitely many solutions, no solution and unique?
$$ \left[
    \begin{array}{ccc|c}
      1&a&1&a\\
      0&(a^2)-1&a-1&(a^2)-1\\
      0&(a-1)(a-2)&0&a-1
    \end{array}
\right] $$
 [/INST] We have to obtain the reduced row echelon form of the augmented matri, starting from
$$\begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&a&1&a\\0&a^2-1&a-1&a^2-1\\0&(a-1)(a-2)&0&a-1
\end{array}\!\!\end{bmatrix}$$


*

*If $a=1$, this matrix becomes
$\;\smash[b]{\begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&1&1&1\\0&0&0&0\\0&0&0&0
\end{array}\!\!\end{bmatrix}}$, which corresponds to the plane with equation:
$$\color{red}{x+y+z=1}.$$

*If $a\ne 1$, we can factor out $x-1$, and thus obtaining the matrix
$$\begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&a&1&a\\0&a+1&1&a+1\\0&a-2&0&1
\end{array}\!\!\end{bmatrix},\enspace\text{and swapping columns $2$ and $3$}:\quad \begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&1&a&a\\0&1&a+1&a+1\\0&0&a-2&1
\end{array}\!\!\end{bmatrix}$$
(Swapping these columns amounts to exchange unknowns $y$ and $z$).

*If $a=2$, the linear system is inconsistent.

*If $a\ne2$, we can proceed with row reduction:
\begin{align}
\begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&1&a&a\\0&1&a+1&a+1\\0&0&a-2&1
\end{array}\!\!\end{bmatrix}&\rightsquigarrow\begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&1&a&a\\0&1&a+1&a+1\\0&0&1&\frac1{a-2}
\end{array}\!\!\end{bmatrix}\rightsquigarrow\begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&1&0&\frac{a(a-3)}{a-2}\\0&1&0&\frac{(a+1)(a-3)}{a-2}\\0&0&1&\frac1{a-2}
\end{array}\!\!\end{bmatrix}\\
&\rightsquigarrow 
\begin{bmatrix}\!\!\begin{array}{@{}ccc|c}
1&0&0&-\frac{(a-3)}{a-2}\\0&1&0&\\0&0&1&\frac1{a-2}
\end{array}\!\!\end{bmatrix} 
\end{align}
So the solutions are
$$\color{red}{x=-\frac{(a-3)}{a-2}},\quad \color{red}{y=\frac1{a-2}},\quad \color{red}{z=\frac{(a+1)(a-3)}{a-2}}.$$

</s>