Solve linear equation system with Gauss I have the following matrix and have to see if it has solutions depending on $a$. My solution:
$M=
  \left[ {\begin{array}{cc}
   a & a^2 &| &1 \\
   -1 & -1& | & -a \\
   1 & a & | & a
  \end{array} } \right]
$
My attemp was:
Changing first with third line
$=
  \left[ {\begin{array}{cc}
   1 & a & | & a \\
   -1 & -1& | & -a \\
   a & a^2 &| &1 \\
  \end{array} } \right]
$
Add the first row to the second one
$=
  \left[ {\begin{array}{cc}
   1 & a & | & a \\
   0 & a-1& | & 0 \\
   a & a^2 &| &1 \\
  \end{array} } \right]
$
Add the $-a$ of the first line to the third line
$=
  \left[ {\begin{array}{cc}
   1 & a & | & a \\
   0 & a-1& | & 0 \\
   0 & 0 &| &1-a^2 \\
  \end{array} } \right]
$
From $0=1-a^2$there we can obtain that the LES has a solution if $a=+/-1$
Is this a valid solution to the problem and is there a free variable?
 A: \begin{align}
M=
\left[\begin{array}{cc|c}
a  & a^2 & 1 \\
-1 & -1  & -a \\
1  & a   & a
\end{array}\right]
&\to
\left[\begin{array}{cc|c}
1  & a   & a \\
-1 & -1  & -a \\
a  & a^2 & 1
\end{array}\right]
&&R_1\leftrightarrow R_3
\\[4px]&\to
\left[\begin{array}{cc|c}
1  & a   & a \\
0  & a-1  & 0 \\
0  & 0 & 1-a^2
\end{array}\right]
&&\begin{aligned}R_2&\gets R_2+R_1\\R_3&\gets R_3-aR_1\end{aligned}
\end{align}
Your work was pretty good.
Now you have to distinguish the cases $a=1$, $a=-1$, $a\ne\pm1$
Case $a=1$
The matrix becomes
$$
\left[\begin{array}{cc|c}
1 & 1 & 1 \\
0 & 0 & 0 \\
0 & 0 & 0
\end{array}\right]
$$
and the system has infinitely many solutions
$$
\begin{bmatrix} 1-h \\ h \end{bmatrix}=
\begin{bmatrix} 1 \\ 0 \end{bmatrix} + h\begin{bmatrix} -1 \\ 1 \end{bmatrix}
$$
Case $a=-1$
The matrix becomes
$$
\left[\begin{array}{cc|c}
1 & -1   & -1 \\
0 & 2  & 0 \\
0 & 0 & 0
\end{array}\right]
\to
\left[\begin{array}{cc|c}
1 & 0 & -1 \\
0 & 1 & 0 \\
0 & 0 & 0
\end{array}\right]
$$
and the system has a single solution $\begin{bmatrix} -1 \\ 0 \end{bmatrix}$.
Case $a\ne\pm1$
No solution.
A: If $a=\pm 1$, then indeed we have a solution. 
Now $a=1$, the second row become the zero row, and hence there is a free variable. Can you write down the general solution?
If $a=-1$, the second row is not a zero row, there is no free variable. It has a unique solution. 
