TITLE: find all the values of a and b so that the system has a) no solution b) 1 solution c) exactly 3 solutions and 4) infinitely many solutions
QUESTION [5 upvotes]: $$\begin{cases}
&x  &- &y &+ &2z &= 4 \\
&3x &- &2y &+ &9z &= 14 \\
&2x &- &4y &+ &az &= b
\end{cases}
$$
I know that $a$ and $b$ has to either equal to something or not in order to satisfy the $4$ conditions stated above. 
my matrices looked like
$$
        \begin{bmatrix}
        1 & -1 & 2 \\
        0 & 1 & 3 \\
        0 & 0 & a+12 \\
        \end{bmatrix}
\begin{bmatrix}
        x & \\
        y &\\
        z &  \\
        \end{bmatrix}=
\begin{bmatrix}
        6 &  \\
        2 & \\
        b+8 & \\
        \end{bmatrix}
$$

REPLY [12 votes]: Apply Gaussian Elimination to the reduced matrix.
$$
\pmatrix{1 & -1 & 2 &  4\\3 & -2 & 9 & 14\\2 & -4 & a & b} \to
\pmatrix{1 & -1 & 2 &  4\\0 &  1 & 3 &  2\\0 & -2 & a-4 & b-8} \to
\pmatrix{1 & -1 & 2 &  4\\0 &  1 & 3 &  2\\0 &  0 & a+2 & b+4}
$$
So

if you want a unique solution, $\frac{b+4}{a+2}$ must be defined, i.e. $a \neq -2$.
if you want infinite number of solutions, $a=-2$ and $b = -4$ removes the last equation.
if you want no solutions, $a=-2$ and $b \neq -4$.