Solving a System with Gaussian Elimination

Learning Outcomes

  • Use Gaussian elimination to solve a systems of equations represented as an augmented matrix.
  • Interpret the solution to a system of equations represented as an augmented matrix.

We have seen how to write a system of equations with an augmented matrix and then how to use row operations and back-substitution to obtain row-echelon form. Now we will use Gaussian Elimination as a tool for solving a system written as an augmented matrix. In our first example, we will show you the process for using Gaussian Elimination on a system of two equations in two variables.

tip for success

Gain practice by working out the given examples on paper, perhaps more than once or twice, before trying practice problems.

As with any challenging concept in mathematics, patient practice and effort aid understanding.

Example: Solving a 2 X 2 System by Gaussian Elimination

Solve the given system by Gaussian elimination.

[latex]\begin{array}{l}2x+3y=6\hfill \\ \text{ }x-y=\frac{1}{2}\hfill \end{array}[/latex]

Try It

Solve the given system by Gaussian elimination.

[latex]\begin{array}{l}4x+3y=11\hfill \\ \text{ }\text{}\text{}x - 3y=-1\hfill \end{array}[/latex]

In our next example, we will solve a system of two equations in two variables that is dependent. Recall that a dependent system has an infinite number of solutions and the result of row operations on its augmented matrix will be an equation such as [latex]0=0[/latex]. We also review writing the general solution to a dependent system.

Example: Solving a Dependent System

Solve the system of equations.

[latex]\begin{array}{l}3x+4y=12\\ 6x+8y=24\end{array}[/latex]

Now, we will take row-echelon form a step further to solve a 3 by 3 system of linear equations. The general idea is to eliminate all but one variable using row operations and then back-substitute to solve for the other variables.

Example: Solving a System of Linear Equations Using Matrices

Solve the system of linear equations using matrices.

[latex]\begin{array}{c}\begin{array}{l}\hfill \\ \hfill \\ x-y+z=8\hfill \end{array}\\ 2x+3y-z=-2\\ 3x - 2y - 9z=9\end{array}[/latex]

Recall that there are three possible outcomes for solutions to linear systems.  In the previous example, the solution [latex]\left(4,-3,1\right)[/latex] represents a point in three dimensional space. This point represents the intersection of three planes.  In the next example, we solve a system using row operations and find that it represents a dependent system.  A dependent system in 3 dimensions can be represented by two planes that are identical, much like in 2 dimensions where a dependent system represents two lines that are identical.

Example: Solving a 3 x 3 Dependent System

Solve the following system of linear equations using Gaussian Elimination.

[latex]\begin{array}{r}\hfill -x - 2y+z=-1\\ \hfill 2x+3y=2\\ \hfill y - 2z=0\end{array}[/latex]

The General Solution to a Dependent 3 X 3 System

Recall that when you solve a dependent system of linear equations in two variables using elimination or substitution, you can write the solution [latex](x,y)[/latex] in terms of x, because there are infinitely many (x,y) pairs that will satisfy a dependent system of equations, and they all fall on the line [latex](x, mx+b)[/latex]. Now that you are working in three dimensions, the solution will represent a plane, so you would write it in the general form [latex](x, m_{1}x+b_{1}, m_{2}x+b_{2})[/latex].

tip for success

Do you recall how you wrote the general solution to dependent linear systems in the previous module? Writing the general solution for these systems in terms of [latex]x[/latex] is no different.

Try It

Solve the system using Gaussian Elimination.

[latex]\begin{array}{c}x+4y-z=4\\ 2x+5y+8z=15\\ x+3y - 3z=1\end{array}[/latex]

Q & A

Can any system of linear equations be solved by Gaussian elimination?

Yes, a system of linear equations of any size can be solved by Gaussian elimination.

How To: Given a system of equations, solve with matrices using a calculator

  1. Save the augmented matrix as a matrix variable [latex]\left[A\right],\left[B\right],\left[C\right]\text{,} \dots[/latex].
  2. Use the ref( function in the calculator, calling up each matrix variable as needed.

Example: Solving Systems of Equations Using a Calculator

Solve the system of equations.

[latex]\begin{array}{r}\hfill 5x+3y+9z=-1\\ \hfill -2x+3y-z=-2\\ \hfill -x - 4y+5z=1\end{array}[/latex]

Applications of Systems of Equations

Now we will turn to the applications for which systems of equations are used. In the next example we determine how much money was invested at two different rates given the sum of the interest earned by both accounts.

Tip for success

Setting up a system of equations in the following examples uses the same ideas you have used before to write a system of linear equations to model a situation. The only difference is that now you’ll use matrices and Gaussian elimination to solve the system.

Example: Applying 2 × 2 Matrices to Finance

Carolyn invests a total of $12,000 in two municipal bonds, one paying 10.5% interest and the other paying 12% interest. The annual interest earned on the two investments last year was $1,335. How much was invested at each rate?

Try It

Example: Applying 3 × 3 Matrices to Finance

Ava invests a total of $10,000 in three accounts, one paying 5% interest, another paying 8% interest, and the third paying 9% interest. The annual interest earned on the three investments last year was $770. The amount invested at 9% was twice the amount invested at 5%. How much was invested at each rate?

Try It

A small shoe company took out a loan of $1,500,000 to expand their inventory. Part of the money was borrowed at 7%, part was borrowed at 8%, and part was borrowed at 10%. The amount borrowed at 10% was four times the amount borrowed at 7%, and the annual interest on all three loans was $130,500. Use matrices to find the amount borrowed at each rate.