Processing math: 100%

The following example will demonstrate the Gaussian method by example.

Example: The Gaussian Method in Practice

(related to Section: Solving General Systems Of Linear Equations - Gaussian Method)

Example

We want to solve the system of linear equations with three unknowns

\begin{array}{rcr} x_1 -3x_2 +2x_3&=&1\\ 5x_1 + 4x_2 -3x_3&=&4\\ 2x_1 -8x_2 +4x_3&=& -2\\ \end{array}\quad\quad( * )

This system has the following extended coefficient matrix:

A|\beta:= \left(\begin{array}{rrr|r} 1&-3&2&1\\ 5&4&-3&4\\ 2&-8&4&-2\\ \end{array}\right)

In the following, we use SageMath. You will have to click the evaluate buttons to see the results.

The resulting upper-triangular matrix is

A|\beta:= \left(\begin{array}{rrr|r} 1&-3&2&1\\ 0&19&-13&-1\\ 0&0&-\frac{26}{19}&-\frac{78}{19}\\ \end{array}\right)

Now we can use the backward substitution to solve the system

Therefore, x_1=1, x_2=2, x_3=3 is the solution of the system ( * ).


Thank you to the contributors under CC BY-SA 4.0!

Github:
bookofproofs


References

Bibliography

  1. Knabner, P; Barth, W.: "Lineare Algebra - Grundlagen und Anwendungen", Springer Spektrum, 2013