## 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.

### Example: Solving a 2 X 2 System by Gaussian Elimination

Solve the given system by Gaussian elimination.

$\begin{array}{l}2x+3y=6\hfill \\ \text{ }x-y=\frac{1}{2}\hfill \end{array}$

### Try It

Solve the given system by Gaussian elimination.

$\begin{array}{l}4x+3y=11\hfill \\ \text{ }\text{}\text{}x - 3y=-1\hfill \end{array}$

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 $0=0$. We also review writing the general solution to a dependent system.

### Example: Solving a Dependent System

Solve the system of equations.

$\begin{array}{l}3x+4y=12\\ 6x+8y=24\end{array}$

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.

$\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}$

Recall that there are three possible outcomes for solutions to linear systems.  In the previous example, the solution $\left(4,-3,1\right)$ 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.

$\begin{array}{r}\hfill -x - 2y+z=-1\\ \hfill 2x+3y=2\\ \hfill y - 2z=0\end{array}$

### 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 $(x,y)$ 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 $(x, mx+b)$. Now that you are working in three dimensions, the solution will represent a plane, so you would write it in the general form $(x, m_{1}x+b_{1}, m_{2}x+b_{2})$.

### Try It

Solve the system using Gaussian Elimination.

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

### 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 $\left[A\right],\left[B\right],\left[C\right]\text{,} \dots$.
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.

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

## 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.

### 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?

### 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.

## Contribute!

Did you have an idea for improving this content? We’d love your input.