[Math] Gaussian Elimination General Solution

gaussian eliminationlinear algebrasystems of equations

Find the general solution of the following system of equations:

enter image description here

Using Gaussian Elimination I was able to get the following solutions for these equations:

x = 2

y = 1

z = 0

However, this is not the right answer – the following is the answer provided in the textbook:

x = 2 – t

y = 1 + t

z = t

How do you get to such a general solution? I solved the system of equations and got a unique solution – How could I know that a general solution exists, other than the question specifically asking for it?

Thanks in advance, any help will be greatly appreciated.

Best Answer

We are given the system above and form our augmented matrix: (note: the same argument works even if we don't rewrite this as a matrix. Just follow the described row operations as operations on the equations in the system instead. Using matrices just simplifies notation a bit.)

$$\left[\begin{array}{ccc|c}2&1&1&5\\1&-1&2&1\\1&2&-1&4\end{array}\right]$$

We apply row-reduction:

First, we want to make it so that all entries in the first column are zero except for the first row, first column entry. $R_1-2R_2\mapsto R_2,~~~~ R_1-2R_3\mapsto R_3$

$$\left[\begin{array}{ccc|c}2&1&1&5\\0&3&-3&3\\0&-3&3&-3\end{array}\right]$$

Now, we notice that the second and third rows are multiples of eachother, so we can clear one out. $R_3+R_2\mapsto R_3$

$$\left[\begin{array}{ccc|c}2&1&1&5\\0&3&-3&3\\0&0&0&0\end{array}\right]$$

Let us make the pivot point of the second row a one now. $\frac{1}{3}R_2\mapsto R_2$

$$\left[\begin{array}{ccc|c}2&1&1&5\\0&1&-1&1\\0&0&0&0\end{array}\right]$$

Lets clear the rest of the column for the second pivot. $R_1-R_2\mapsto R_1$

$$\left[\begin{array}{ccc|c}2&0&2&4\\0&1&-1&1\\0&0&0&0\end{array}\right]$$

And now finally let us make the first pivot a one. $\frac{1}{2}R_1\mapsto R_1$

$$\left[\begin{array}{ccc|c}1&0&1&2\\0&1&-1&1\\0&0&0&0\end{array}\right]$$

This final form of our matrix is what we call the Reduced Row Echelon Form.

We can now reinterpret this as the system of equations:

$\begin{cases}x+z=2\\y-z=1\\z~\text{is free}\end{cases}$

So, if supposing that $z$ is some parameter $t$, you have:

$\begin{cases} x=2-t\\y=1+t\\z=t\end{cases}$


As for the question of when you know if there is exactly one solution or not, we can describe a system of linear equations as a matrix equation: $A\overrightarrow{x} = \overrightarrow{b}$, where $A$ and $\overrightarrow{b}$ are known and we want to find $\overrightarrow{x}$. A unique solution will exist if and only if $A$ is invertible, and can be found as $\overrightarrow{x}=A^{-1}\overrightarrow{b}$.

If $A$ is not invertible, then either there are infinitely many solutions or there are no solutions. Which it is depends on the specific choice of $A$ and $\overrightarrow{b}$. Checking to see if a matrix $A$ is invertible can be done by finding its determinant. A square matrix $A$ is invertible if and only if $\det(A)\neq 0$. (A non-square matrix is never invertible)