How could I determine the solution of this system of equations? The problem I'm facing is this one (with the answer of the question underlined):
Problem
I reduced the matrix from this:
\begin{bmatrix}1&2&-1&4\\3&-1&5&2\\4&1&(a^2-14)&a+2\end{bmatrix}
to this:
\begin{bmatrix}1&2&-1&4\\0&1&-8/7&10/7\\0&0&(a^2-18)&a-4\end{bmatrix}
But after that I don't understand why does the system of equations has a solution when $a \neq 4$ or $a \neq -4$.
What I learned, applied to this problem, is that:

*

*If $a^2 - 18 = 0 $, the system of equations could have infinite solutions or none solution.

Please, could somebody give me a hand on this?
Thanks.
 A: I checked your matrix reduction and it looks good. Your approach looks good too. From here, you would have no solutions if and only if $a^2=18$ since your second matrix would become $$\begin{bmatrix}1&2&-1&|&4 \\ 0&1&-8/7&|&10/7 \\ 0&0&0&|&\pm\sqrt{18}-4\end{bmatrix}$$ which has no solutions (it could not have infinitely many solutions in this case). If $a=\pm 4$ the system does have solutions.
Perhaps there is an error in the given solution, because your calculations and method look fine to me (also, I'm not familiar with the language in which the problem is written, so I am not sure exactly what the problem is asking for).
A: Let us do it without matrix calculations. We have the linear equations
$$x+2 y-z=4 \tag 1$$
$$3 x-y+5 z=2 \tag 2$$
$$4 x+y+\left(a^2-14\right) z=2+a \tag 3$$
Using $(1)$ and $(2)$ eliminate $x$ and $y$ as functions of $z$
$$x=\frac{8}{7}-\frac{9 z}{7} \qquad \text{and} \qquad y=\frac{8 z}{7}+\frac{10}{7}$$ Plug these results in $(3)$ to get
$$\left(a^2-18\right) z=a-4$$
S0, the only problem is $a^2=18$ which makes $z$ undefined. If $a^2\neq 18$, whatever could be $a$ there are solutions for $x,y,z$.
This is what you did show. Well done and $\to +1$ for your post.
