01.Asolving3eqns

# Solving Systems of Three Equations

## Equations in 3-Dimensions

A linear equation with 3 variables creates a plane (flat surface) in 3-Dimensional space. {Flat but tilted}

Imagine the standard XY axes flat on the page (or on the screen)

The positive Z axis then points perpendicularly up from the page (or out of the screen)

### Example Consider the equation $2x + 3y + z = 5$

For every point $(x, y)$ we can find a value of z that make this equation true (shown in red)

Imagine a pin in each position pointing straight out of the page with the given height.

The tops of each pin will join to form the plane referred to by this equation.

NB: In the graph, the faint red lines form a contour map of the surface of the plane.

## Solving Systems of Equations in 3 Dimensions

Consider two equations (two planes) in 3 dimensions. The planes could be

• Parallel (no solutions)
• Coincident (infinite solutions — every point on the plane)
• Intersecting (the intersection would be a straight line - infinite solutions)

Now imagine a third equation (three planes) in 3 dimensions. The planes could be

• Two or three of the planes could be parallel (no solutions)
• The three planes could intersect each other but not all at the same place (no solutions)
• All three could be coincident (infinite solutions — every point on the plane)
• All three could intersect along a single straight line (infinite solutions)
• All three could intersect at a single point (a unique solution)

## Solving 3 Simultaneous Equations Algebraically

We can solve 3 simultaneous equations with 3 variables algebraically using an extended version of the elimination method.

1. Use equations  and  to eliminate one of the variables and produce a new equation in 2 variables. Call this 
2. Use equations  and  (or  and ) to eliminate the same variable and produce a 2nd new equation in the same 2 variables as . Call this .
3. We now have two equations  and  with 2 variables.
4. Solve  and  simultaneously to get solutions for two of the variables.
5. Substitute the two found solutions into  to obtain the third solution.
6. Check by substituting the solutions into  and 

NB: At several different points in the process we could discover that there are no solutions (or infinitely many solutions)

#### Example 6a

Solve these simultaneous equations algebraically
… … $x + 2y - z = 6 \qquad \big[ \textbf{1} \big]$
… … $2x - y - z = 1 \qquad \big[ \textbf{2} \big]$
… … $\; x + 2z = -1 \qquad \big[ \textbf{3} \big]$

Solution:

Combine  and  to eliminate y
… … $x + 2y - z = 6 \qquad \big[ \textbf{1} \big]$
… … $2x - y - z = 1 \qquad \big[ \textbf{2} \big]$

Multiply  by 2
… … $x + 2y - z = 6 \qquad \big[ \textbf{1} \big]$
… … $4x - 2y - 2z = 2 \qquad \big[ \textbf{2} \big] \times 2$

… … $5x - 3z = 8 \qquad \big[ \textbf{4} \big]$

Equation  already has no value for y
… … $5x - 3z = 8 \qquad \big[ \textbf{4} \big]$
… … $x + 2z = -1 \qquad \big[ \textbf{3} \big]$

Multiply  by 2 and multiply  by 3 to get a common coefficient for z
… … $10x - 6z = 16 \qquad \big[ \textbf{4} \big] \times 2$
… … $3x + 6z = -3 \qquad \big[ \textbf{3} \big] \times 3$

… … $13x = 13$
… … $x = 1$

Sub x = 1 into  and solve for z
… … $1 + 2z = -1$
… … $\quad 2z = -2$
… … $\quad z = -1$

Sub x = 1, z = –1 into  and solve for y
… … $1 + 2y - \big( -1 \big) = 6$
… … $\quad 2y + 2 = 6$
… … $\qquad 2y = 4$
… … $\qquad \; y = 2$

Sub (1, 2, –1) into  to check
… … $2 \big( 1 \big) - \big( 2 \big) - \big( -1 \big) = 1$
… … $\qquad 2 - 2 + 1 = 1$
… … $\qquad \qquad 1 = 1$

Sub (1, 2, –1) into  to check
… … $1 + 2 \big( -1 \big) = -1$
… … $\quad 1 - 2 = -1$
… … $\qquad -1 = -1$

Hence the solution is (x = 1, y = 2, z = –1)

## Solving 3 Simultaneous Equations Using Matrices

To solve manually, we have to be able to find the inverse of the matrix.
It is possible to find the inverse of a 3 × 3 matrix manually, but it is not worth the bother.
We can do matrices on the CAS calculator very easily.

#### Example 6b

Solve these simultaneous equations using matrices.

… … $x + 2y - z = 6 \qquad \big[ \textbf{1} \big]$
… … $2x - y - z = 1 \qquad \big[ \textbf{2} \big]$
… … $\; x + 2z = -1 \qquad \big[ \textbf{3} \big]$

Solution:

Write in matrix form (fill in the missing space with 0)

… … $\left[ \begin{matrix} 1&2&-1 \\ 2&-1&-1 \\ 1&0&2 \\ \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ z \\ \end{matrix} \right] = \left[ \begin{matrix} 6 \\ 1 \\ -1 \\ \end{matrix} \right]$ Therefore

… … $\left[ \begin{matrix} x \\ y \\ z \\ \end{matrix} \right] = \left[ \begin{matrix} 1&2&-1 \\ 2&-1&-1 \\ 1&0&2 \\ \end{matrix} \right]^{-1} \left[ \begin{matrix} 6 \\ 1 \\ -1 \\ \end{matrix} \right]$

Using the calculator gives

… … $\left[ \begin{matrix} x \\ y \\ z \\ \end{matrix} \right] = \left[ \begin{matrix} 1 \\ 2 \\ -1 \\ \end{matrix} \right]$

{NB Slow double click on the matrix icon to get 3 × 3 matrix}

## Solve 3 Simultaneous Equations Using the Classpad

You can also use the simultaneous equations function on the Classpad to solve these equations.
{Slow double click on the icon to get slots for 3 equations}

#### Example 6c Solve these simultaneous equations.

… … $x + 2y - z = 6 \qquad \big[ \textbf{1} \big]$
… … $2x - y - z = 1 \qquad \big[ \textbf{2} \big]$
… … $\; x + 2z = -1 \qquad \big[ \textbf{3} \big]$

Solution:

As seen on the calculator.

Solution is : (x = 1, y = 2, z = –1)

## Systems of 3 Equations with Pronumerals as Coefficients

#### Example 7

Consider the following system of simultaneous equations

… … $kx - y + z = 8 \qquad \big[ \textbf{1} \big]$
… … $3x + ky + 2z = 2 \qquad \big[ \textbf{2} \big]$
… … $\; x + 3y + z = -6 \qquad \big[ \textbf{3} \big]$

For which values of k is there

1. a unique solution
2. an infinite number of solutions
3. no solutions

Solution:

We could solve this algebraically by solving the equations to get an expression for k.

Or we could use the idea that when the determinant equals zero, there are no unique solutions. Write in matrix form:
… … $\left[ \begin{matrix} k&-1&1 \\ 3&k&2 \\ 1&3&1 \\ \end{matrix} \right] \left[ \begin{matrix} x \\ y \\ z \\ \end{matrix} \right] = \left[ \begin{matrix} 8 \\ 2 \\ -6 \\ \end{matrix} \right]$

Use the calculator to find the determinant

Set the determinant to zero and solve for k
… … $k^2 - 7k + 10 = 0$
… … $\big( k-2 \big) \big( k-5 \big) = 0$
… … $k = 2 \quad or \quad k = 5$

Hence there are no unique solutions for k = 2, 5

(1) Hence there are unique solutions for $k \in R \backslash \big\{ 2, \; 5 \big\}$ Substitute k = 2 into the equations
… … $2x - y + z = 8 \qquad \big[ \textbf{1} \big]$
… … $3x + 2y + 2z = 2 \qquad \big[ \textbf{2} \big]$
… … $\; x + 3y + z = -6 \qquad \big[ \textbf{3} \big]$

Put these into the calculator and solve.
Gives us {x = f(z), y = g(z), z = z}

• where f and g are linear functions

This means that for k = 2, there is a solution for every $z \in R$.

(2) Hence there are an infinite number of solutions when k = 2 Substitute k = 5 into the equations

… … $5x - y + z = 8 \qquad \big[ \textbf{1} \big]$
… … $3x + 5y + 2z = 2 \qquad \big[ \textbf{2} \big]$
… … $\; x + 3y + z = -6 \qquad \big[ \textbf{3} \big]$

Put these into the calculator and solve
Gives us {No Solution}

(3) Hence there are no solutions when k = 5

.