# Solving a System of Linear Equations Using Gaussian Elimination

## Problem 24

Solve the following system of linear equations using Gaussian elimination.

\begin{align*}

x+2y+3z &=4 \\

5x+6y+7z &=8\\

9x+10y+11z &=12

\end{align*}

### Elementary row operations

The three *elementary row operations on a matrix* are defined as follows.

**Interchanging two rows**:

$R_i \leftrightarrow R_j$ interchanges rows $i$ and $j$.

(2)** Multiplying a row by a non-zero scalar** **(a number):**

$tR_i$ multiplies row $i$ by the non-zero scalar (number) $t$.

(3) **Adding a multiple of one row to another row**:

$R_j+tR_i$ adds $t$ times row $i$ to row $j$.

## Solution.

First, the augmented matrix of the system is

\[A=\left[ \begin{array}{rrr|r}

1 & 2 & 3 & 4 \\

5 & 6 & 7 & 8 \\

9 & 10 & 11 & 12

\end{array} \right].\]
We apply elementary row operations as follows to reduce the system to row echelon form.

\[A \xrightarrow{R_3 -9R_1}

\left[\begin{array}{rrr|r}

1 & 2 & 3 & 4 \\

5 & 6 & 7 & 8 \\

0 & -8 & -16 & -24

\end{array}\right]
\xrightarrow{-\frac{1}{8}R_3}

\left[\begin{array}{rrr|r}

1 & 2 & 3 & 4 \\

5 & 6 & 7 & 8 \\

0 & 1 & 2 & 3

\end{array}\right]
\]
\[\xrightarrow{R_2-5R_1}

\left[\begin{array}{rrr|r}

1 & 2 & 3 & 4 \\

0 & -4 & -8 & -12 \\

0 & 1 & 2 & 3

\end{array}\right]
\xrightarrow{-\frac{1}{4} R_2}

\left[\begin{array}{rrr|r}

1 & 2 & 3 & 4 \\

0 & 1 & 2 & 3 \\

0 & 1 & 2 & 3

\end{array}\right]
\]
\[\xrightarrow{R_3-R_2}

\left[\begin{array}{rrr|r}

1 & 2 & 3 & 4 \\

0 & 1 & 2 & 3 \\

0 & 0 & 0 & 0

\end{array}\right]
\]
The last matrix is in row echelon form.

The corresponding system of linear equations of it is

\begin{align*}

x+2y+3z &=4\\

y+2z&=3 \\

0z&=0

\end{align*}

The last equation $0z=0$ means that $z$ can be any number.

(More systematically, the variables corresponding to leading $1$’s in the echelon form matrix are dependent variables, and the rests are independent (free) variables.)

So let us say that $t$ is a value for $z$, namely $z=t$.

Then from the second equation, we have $y=-2t+3$.

From the first equation, we have

\[x=-2y-3z+4=-2(-2t+3)-3t+4=t-2.\]
Thus the solution set is

\[(x,y,z)=(t-2, -2t+3, t)\]
for any $t$.

## Comment.

You may want to check whether the answer is correct by substituting this solution to the original equations.

Also, if you further reduce the matrix into* reduced* row echelon form, the last system becomes simpler (and simplest in a sense).

This procedure, to reduce a matrix until reduced row echelon form, is called the *Gauss-Jordan elimination*.

## Related Question.

For a similar problem, you may want to check out Solve a system of linear equations by Gauss-Jordan elimination.

Add to solve later

Sponsored Links

## 1 Response

[…] similar problem is Solving a system of linear equations using Gaussian elimination. The instruction of the problem says to use Gaussian elimination, but try to solve it using […]