Solve different solutions for linear system

I am currently in a linear algebra class and I have to answer the following questions, for what values of $a$ and $b$ does the system below have:
a) No solution
b) Only one solution
c) Infinitely many solutions

\begin{cases} x_{2} + 3x_{3} = 1 \\ x_{1} + 2x_{2} + 6x_{3} = 1 \\ x_{2} - 6x_{3} = -1 \\ 2x_{1} + 2x_{2} + ax_{3} = b \end{cases}

To attempt this I tried to reduce the augmented matrix to echelon form and ended up with this

\begin{bmatrix} 1 & 2 & 6 & 1 \\ 0 & 2 & 3 & 1 \\ 0 & 0 & -9 & -2 \\ 0 & 0 & a & b + 1 \end{bmatrix}

From my understanding, for this particular system to have infinitely many solutions, both the third and the forth row has to be only zeros. Because since $a$ is in the third column, this is the only way to achieve $x_{3}$ being a free variable. The problem is that I don't know how to reduce this system in such a way and wondered if someone could help! I think if I understand how to arrange the matrix I will be able to answer the other questions. Thank you!

• The question asks for the number of solutions, so why don't you calculate determinant of the matrix? – Mehrdad Zandigohar Feb 14 '18 at 15:18

The given system has augmented matrix $$\begin{bmatrix}0&1&3&|&1\\1&2&6&|&1\\0&1&-6&|&-1\\2&2&a&|&b\end{bmatrix}\xrightarrow{(1)}\begin{bmatrix}0&1&3&|&1\\1&2&6&|&1\\0&1&-6&|&-1\\0&-2&a-12&|&b-2\end{bmatrix}\xrightarrow{(2)}\begin{bmatrix}0&1&3&|&1\\1&0&0&|&-1\\0&0&-9&|&-2\\0&0&a-6&|&b\end{bmatrix}$$ where the steps are \begin{align}&(1)\qquad -2R_2+R_4\mapsto R_4\\&(2)\qquad \begin{cases}-2R_1+R_2\mapsto R_2\\-R_1+R_3\mapsto R_3\\2R_1+R_4\mapsto R_4\end{cases}\end{align} The system is inconsistent (no solutions) when there is a nonzero row in the coefficient matrix with a zero entry in the augmented vector on the right hand side. The system has one solution when the system is consistent and the matrix has rank $3$. Otherwise, there are infinitely many solutions.

One can perform a final step via $$(3)\qquad\begin{cases}-3R_3+R_1\mapsto R_1\\(6-a)R_3+R_4\mapsto R_4\end{cases}$$ $$\begin{bmatrix}0&1&3&|&1\\1&0&0&|&-1\\0&0&1&|&\frac{2}{9}\\0&0&a-6&|&b\end{bmatrix}\xrightarrow{(3)}\begin{bmatrix}0&1&0&|&\frac{1}{3}\\1&0&0&|&-1\\0&0&1&|&\frac{2}{9}\\0&0&0&|&b+\frac{2}{9}(6-a)\end{bmatrix}$$

• thanks, why do you have the leftmost 1 in the second row? we're taught to have it on the top. I guess it doesn't matter, just curious – Amoz Feb 14 '18 at 19:00
• I just do row swaps at the end. – Dave Feb 14 '18 at 19:22

you have to write augmented matrix. then you can to perform row operations to convert this into echelon form

https://www.wikihow.com/Reduce-a-Matrix-to-Row-Echelon-Form

• I know how to do it, but I don't know how to do it with this particular problem since I dont know what to do with column 3. – Amoz Feb 14 '18 at 15:11

Let's start from here:

\begin{bmatrix} 1 & 2 & 6 & 1 \\ 0 & 2 & 3 & 1 \\ 0 & 0 & -9 & -2 \\ 0 & 0 & a & b + 1 \end{bmatrix}

For equations 1 to 3 we calculate determinant:

$$\begin{vmatrix} 1 & 2 & 6 \\ 0 & 2 & 3 \\ 0 & 0 & -9 \\ \end{vmatrix}=18>0$$

This means the first $3$ equations have a unique solution.

Our system is overdetermined, so if the fourth equation is identical to the third one, the whole system has 1 unique solution and otherwise it has no solution.

If $a=-9$ AND $b+1=-2$ then we have 1 solution. Otherwise, we have no solution.

• We haven't touched on determinants (yet) in my course. But it's interesting what you are saying about the relation between the third and forth equation, thank you – Amoz Feb 14 '18 at 19:03

There's a general result for this:

Let $A\,\mathbf x =\mathbf b$ be a (possibly non-homogeneous) linear system of size $m\times n$ over the field $K$. We'll denote $\;[A\mid \mathbf b]$ the augmented matrix. This linear system has

• no solution if $\;\DeclareMathOperator{\rank}{rank} \rank A<\rank A\mid\mathbf b$;

• solutions if $\;\rank A=\rank A\mid\mathbf b$.

Furthermore, if there are solutions, it is a single solution if $A$ has maximal rank, i.e. if $\rank A=\min(m,n)$. It has an infinity of solutions if $\rank A<\min(m,n)$.

In all cases, the set of solutions is an affine subspace of $K^n$ with dimension $\operatorname{codim} A$.