Skip to main content

Section 15.3 Solving Systems of Linear Equations

Two systems of linear equations are said to be equivalent if they have the same number of variables and have the same solution sets.

It turns out that the systems of linear equations in Example 15.2.5 are equivalent, i.e.

\begin{align*} 3x-2y+2z \amp =-3 \hspace{48mm} x=1\\ -x+6y+4z \amp =7 \hspace{10mm} \textrm{ is equivalent to } \hspace{10mm} y=2\\ x+y+5z \amp =-2 \hspace{49mm} z=-1 \end{align*}

The solution to these equivalent systems can be seen from the system on the right whereas they are not at all obvious from the system on the left.

Notice that, given a system of linear equations, we can produce an equivalent system by doing any one of the following:

  • Multiplying any one equation by a non-zero constant

  • Re-writing the equations in a different order

  • Adding any multiple of one equation to another

The following systems of linear equations are equivalent because we have just written the equations in a different order.

\begin{align*} 3x-2y+2z \amp =-3 \hspace{52mm} 3x-2y+2z =-3\\ -x+6y+4z \amp =7 \hspace{10mm} \textrm{ is equivalent to } \hspace{18mm} x+y+5z =-2\\ x+y+5z \amp =-2 \hspace{48mm} -x+6y+4z =7 \end{align*}

The following systems of linear equations are equivalent because we have just multiplied the second equation by \(3\text{.}\)

\begin{align*} 3x-2y+2z \amp =-3 \hspace{54mm} 3x-2y+2z =-3\\ x+y+5z \amp =-2 \hspace{10mm} \textrm{ is equivalent to } \hspace{9mm} 3x+3y+15z =-6\\ -x+6y+4z \amp =7 \hspace{54mm} -x+6y+4z =7 \end{align*}

The following systems of linear equations are equivalent because we have just subtracted the first equation from the second equation, (i.e. added \(-1\) times the first equation to the second equation.)

\begin{align*} 3x-2y+2z \amp =-3 \hspace{48mm} 3x-2y+2z =-3\\ 3x+3y+15z \amp =-6 \hspace{10mm} \textrm{ is equivalent to } \hspace{15mm} 5y+13z =-3\\ -x+6y+4z \amp =7 \hspace{49mm} -x+6y+4z =7 \end{align*}

Thus the strategy for solving a system of linear equations will be to apply the above operations in a systematic way to produce an equivalent system from which we can determine the solution (such as that given in Example 15.2.5\((b)\)). This strategy, in the form described below, is called Gauss-Jordon Elimination. In order to describe this strategy we need some terminology.

Definition 15.3.3.

Given a matrix an equivalent matrix can be produced by applying any one of the following three elementary row operations:

  • Swapping two rows

  • Multiplying a row by a non-zero constant

  • Adding a multiple of one row to another row

Note:

  1. We use the symbol \(\sim\) to denote that two matrices are equivalent.

  2. The process of applying elementary row operations to a matrix is called row reduction

The following matrices are equivalent because we have just swapped two rows.

\begin{equation*} \left(\begin{array}{c c c | c} 3 \amp -2 \amp 2 \amp -3 \\ -1 \amp 6 \amp 4 \amp 7 \\ 1 \amp 1 \amp 5 \amp -2 \end{array}\right) \sim \left(\begin{array}{c c c | c} 3 \amp -2 \amp 2 \amp -3 \\ 1 \amp 1 \amp 5 \amp -2 \\ -1 \amp 6 \amp 4 \amp 7 \end{array}\right) \begin{matrix} \\ \hspace{5mm} R_2'=R_3 \\ \hspace{5mm} R_3'=R_2 \end{matrix} \end{equation*}

The following matrices are equivalent because we have just multiplied Row \(2\) by \(3\text{.}\)

\begin{equation*} \left(\begin{array}{c c c | c} 3 \amp -2 \amp 2 \amp -3 \\ 1 \amp 1 \amp 5 \amp -2 \\ -1 \amp 6 \amp 4 \amp 7 \end{array}\right) \sim \left(\begin{array}{c c c | c} 3 \amp -2 \amp 2 \amp -3 \\ 3 \amp 3 \amp 15 \amp -6 \\ -1 \amp 6 \amp 4 \amp 7 \end{array}\right) \hspace{5mm} R_2'=3R_2 \end{equation*}

The following matrices are equivalent because we have just subtracted Row \(1\) from Row \(2\text{,}\) (i.e. added \(-1\) times Row \(1\) to Row \(2\))

\begin{equation*} \left(\begin{array}{c c c | c} 3 \amp -2 \amp 2 \amp -3 \\ 3 \amp 3 \amp 15 \amp -6 \\ -1 \amp 6 \amp 4 \amp 7 \end{array}\right) \sim \left(\begin{array}{c c c | c} 3 \amp -2 \amp 2 \amp -3 \\ 0 \amp 5 \amp 13 \amp -3 \\ -1 \amp 6 \amp 4 \amp 7 \end{array}\right) \hspace{5mm} R_2'=R_2-R_1 \end{equation*}

Definition 15.3.5.

A matrix is said to be in row-echelon form if the first non-zero entry (i.e. the leading entry) in each row occurs further to the right than in the row above it.

A matrix is said to be in reduced row-echelon form if it is in row-echelon form and each leading entry is 1 with no non-zero entries above it.

For the following matrices decide if it is row-echelon form, reduced row-echelon form or neither. For those matrices in reduced row-echelon form what can you say about the system of linear equations represented by those matrices?

  1. \begin{equation*} \begin{pmatrix} 1 \amp 0 \amp 3 \amp 2 \\ 0 \amp 1 \amp -1 \amp -3 \\ 0 \amp 0 \amp 0 \amp 0 \end{pmatrix} \end{equation*}
  2. \begin{equation*} \left(\begin{array}{c c c c | c} 3 \amp -1 \amp 2 \amp 1 \amp 2 \\ 0 \amp 7 \amp 7 \amp -7 \amp -16 \\ 1 \amp 1 \amp 7 \amp 4 \amp 8 \end{array}\right) \end{equation*}
  3. \begin{equation*} \begin{pmatrix} 1 \amp 4 \amp -1 \amp 2 \\ 0 \amp 2 \amp 3 \amp -2 \\ 0 \amp 0 \amp 4 \amp 5 \\ 0 \amp 0 \amp 0 \amp 6 \end{pmatrix} \end{equation*}
  4. \begin{equation*} \begin{pmatrix} 1 \amp 0 \amp 0 \amp 1 \\ 0 \amp 1 \amp 0 \amp 2 \\ 0 \amp 0 \amp 1 \amp -1 \end{pmatrix} \end{equation*}
Solution.
  1. This matrix is in reduced row-echelon form. The system of equations represented by this matrix is

    \begin{align*} x+3z \amp =2\\ y-z \amp =-3\\ 0 \amp =0 \end{align*}

    The third equation in this system is satisfied no matter what values we choose for \(x\text{,}\) \(y\) and \(z\text{.}\) Once we choose a value for \(z\) (say) then from the first two equations we can determine the values for \(x\) and \(y\) as

    \begin{align*} x \amp =2-3z\\ y \amp =-3+z \end{align*}

    Thus this system of equations has an infinite number of solutions given by

    \begin{equation*} (x,y,z)=(2-3t,-3+t,t) \end{equation*}

    or

    \begin{equation*} (x,y,z)=(2,-3,0)+t(-3,1,1) \end{equation*}
  2. This matrix isn't in row-echelon form (and hence not in reduced row-echelon form either) since the leading entry in row \(3\) occurs to the left of the leading entry is row \(2\text{.}\)

  3. This matrix is in row-echelon form but not reduced row-echelon form. Notice that in this case we can tell that the associated system of linear equations is inconsistent even though the matrix is not in reduced row-echelon form. The fourth equation in this system is

    \begin{equation*} 0=6 \end{equation*}

    and this cannot be satisfied no matter which values of \(x\text{,}\) \(y\) and \(z\) we choose.

  4. This matrix is in reduced row-echelon form and the solution of the associated systems of linear equations is

    \begin{equation*} (x,y,z)=(1,2,-1) \end{equation*}

Definition 15.3.7.

In Gauss-Jordon Elimination, the augmented matrix associated with the system of linear equations is systematically row reduced to reduced row-echelon form by:

  • Obtaining a 1 in entry \(a_{11}\)

  • Obtaining \(0\)'s in the remainder of column \(1\) by using the elementary row operation of adding multiples of row \(1\) to another row.

  • Obtaining a 1 in entry \(a_{22}\)

  • Obtaining \(0\)'s in the remainder of column \(2\) by using the elementary row operation of adding multiples of row \(2\) to another row.

  • And so on across the columns.

The solution is then read off from the equivalent system represented by the matrix in reduced row-echelon form

Use Gauss Jordon Elimination to solve the following system of linear equations:

\begin{align*} 2x+3y \amp =1\\ 3x-4y \amp =10 \end{align*}
Solution.

The augmented matrix for this system is

\begin{equation*} \left(\begin{array}{c c | c} 2 \amp 3 \amp 1 \\ 3 \amp -4 \amp 10 \end{array}\right) \end{equation*}

We now want to row reduce this matrix to reduced row-echelon form. Following the steps as outlined:

\begin{align*} \begin{pmatrix} 2 \amp 3 \amp 1 \\ 3 \amp -4 \amp 10 \end{pmatrix} \amp \sim \begin{pmatrix} 1 \amp \frac{3}{2} \amp \frac{1}{2} \\ 0 \amp -\frac{17}{2} \amp \frac{17}{2} \end{pmatrix} \begin{matrix} R_1'=R_1/2 \\ \hspace{8mm} R_2'=R_2-3R_1' \end{matrix}\\ \amp \sim \begin{pmatrix} 1 \amp 0 \amp 2 \\ 0 \amp 1 \amp -1 \end{pmatrix} \begin{matrix} \hspace{15mm} R_1'=R_1-3R_2'/2 \\ \hspace{10mm} R_2'=-2R_2/17 \end{matrix} \end{align*}

We can now read off the solution as

\begin{equation*} (x,y)=(2,-1) \end{equation*}

Of course we can check that this solution is correct by substituting these values into the original equations.

In doing the row reduction here were had to use fractions. It is possible to apply the elementary row operations in a manner that avoids the fractions until the last steps. However you have to be very careful in doing this that you don’t lose some of the \(0\)’s that you have already created and hence start going around in circles!

Use Gauss Jordon Elimination to solve the following system of linear equations.

\begin{align*} 2x+6y+2z \amp = 4\\ 3x+2y+z \amp = 0\\ 2x+3y \amp = 1 \end{align*}
Solution.

The augmented matrix for this system is

\begin{equation*} \begin{pmatrix} 2 \amp 6 \amp 2 \amp 4 \\ 3 \amp 2 \amp 1 \amp 0 \\ 2 \amp 3 \amp 0 \amp 1 \end{pmatrix} \end{equation*}

Now using the steps as outlined to reduce this to reduced row-echelon form:

\begin{align*} \begin{pmatrix} 2 \amp 6 \amp 2 \amp 4 \\ 3 \amp 2 \amp 1 \amp 0 \\ 2 \amp 3 \amp 0 \amp 1 \end{pmatrix} \amp \sim \begin{pmatrix} 1 \amp 3 \amp 1 \amp 2 \\ 0 \amp -7 \amp -2 \amp -6 \\ 0 \amp -3 \amp -2 \amp -3 \end{pmatrix} \begin{matrix} R_1'=R_1/2 \\ \hspace{10mm} R_2'=R_2-3R_1' \\ \hspace{10mm} R_3'=R_3-2R_1' \end{matrix} \\ \amp \sim \begin{pmatrix} 1 \amp 0 \amp \frac{1}{7} \amp -\frac{4}{7} \\ 0 \amp 1 \amp \frac{2}{7} \amp \frac{6}{7} \\ 0 \amp 0 \amp -\frac{8}{7} \amp -\frac{3}{7} \end{pmatrix} \hspace{6mm} \begin{matrix} \hspace{5mm} R_1'=R_1-3R_2' \\ R_2'=-R_2/7 \\ \hspace{5.5mm} R_3'=R_3+3R_2' \end{matrix}\\ \amp \sim \begin{pmatrix} 1 \amp 0 \amp 0 \amp -\frac{5}{8} \\ 0 \amp 1 \amp 0 \amp \frac{3}{4} \\ 0 \amp 0 \amp 1 \amp \frac{3}{8} \end{pmatrix} \begin{matrix} \hspace{14.5mm} R_1'=R_1-R_3'/7 \\ \hspace{16.5mm} R_2'=R_2-2R_3'/7 \\ \hspace{10mm} R_3'=-7R_3/8 \end{matrix} \end{align*}

Thus the solution is

\begin{equation*} (x,y,z)=\left(-\frac{5}{8},\frac{3}{4},\frac{3}{8}\right) \end{equation*}

Exercises Example Tasks

1.

For the following augmented matrices write down the general solution of the associated system of linear equations, (i.e. write down the set of all solutions).

  1. \begin{equation*} \begin{pmatrix} 0 \amp 2 \amp 2 \amp 2 \\ 0 \amp 0 \amp 3 \amp 3\end{pmatrix} \end{equation*}
  2. \begin{equation*} \begin{pmatrix} 1 \amp 0 \amp 0 \amp 2 \\ 0 \amp 1 \amp 0 \amp 3 \\ 0 \amp 0 \amp 0 \amp 0 \end{pmatrix} \end{equation*}
  3. \begin{equation*} \begin{pmatrix} 1 \amp -1 \amp 2 \amp 3 \\ 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \amp 0 \end{pmatrix} \end{equation*}
  4. \begin{equation*} \begin{pmatrix} 1 \amp -6 \amp 0 \amp 0 \amp 3 \amp -2 \\ 0 \amp 0 \amp 1 \amp 0 \amp 4 \amp 7 \\ 0 \amp 0 \amp 0 \amp 1 \amp 5 \amp 8 \\ 0 \amp 0 \amp 0 \amp 0 \amp 0 \amp 0 \end{pmatrix} \end{equation*}

2.

Solve the following system of linear equations by Gauss-Jordan elimination.

\begin{align*} 5x+2y-z \amp =11\\ x-y+z \amp =1\\ 4x+2y+3z \amp =5 \end{align*}

3.

The general equation of a circle is \(x^2+y^2+ax+by+c=0\text{.}\) Find the equation of the circle that passes through the points \((1,0)\text{,}\) \((2,1)\) and \((2,-1)\text{.}\)