Solve the system for the given parameter a \begin{align}
ax+y+z&=1,\\
2x+2ay+2z&=3\\
x+y+az&=1
\end{align}
I tried forming the system matrix and discuss it using its rank, but I'm not sure how to row reduce:
$$\begin{pmatrix}a&1&1&1\\ 2&2a&2&3\\ 1&1&a&1\end{pmatrix}$$
 A: Consider the matrix $$A=\begin{pmatrix}
a&1&1\\2&2a&2\\1&1&a
\end{pmatrix}.$$ We have that $\det(A)=2(a-1)^2(a+2)$. Hence if $a\neq 1$ and $a\neq -2$, then $A$ is invertible and the solution of the system of equations is $A^{-1}b$, where $b=\begin{pmatrix}1\\3\\1
\end{pmatrix}$.
If $a=1$, then the system of equations is false, hence there are no solutions. If $a=-2$, then again the system of equations has no solutions.
A: If yo have a linear system $A x = b$, where $A$ is a matrix and $x$ and $b$ are vectors, the solution is given by $x = A^{-1} b$, provided $A$ is invertible. So the right hand side of the equation should not be included in the system matrix $A$ (like you did). 
A: I have solved your systems of equations and I hope that this is acceptable because I didn't use matrix. Obviously, I haven't learned that yet. Here it is: 
$$
\begin{aligned}
ax + y + z = 1 && (\mathrm{Eq}_1)\\
2x + 2ay + 2z = 3 && (\mathrm{Eq}_2)\\
x+y+az=1 && (\mathrm{Eq}_3)
\end{aligned}
$$
Now
$$
(\mathrm{Eq}_1) - (\mathrm{Eq}_1) = (a-1)(x-z) = 0\Longrightarrow\begin{cases}
a=1 & \text{no solution}\\
x=z
\end{cases}
$$
with $x=z$ we have
\begin{aligned}
(a+1)x + y = 1 && (\mathrm{Eq}_1)\\
2x + ay = 1.5 && (\mathrm{Eq}_2)
\end{aligned}
I replaced the value of $y$ in $(\mathrm{Eq}_1)$ with the value of $y$ in $(\mathrm{Eq}_2)$. After that, I solved it as usual.  
