# Example of Solving a System of Linear Equations by Gaussian Elimination.

### This solution has been made using the calculator presented on the site.

Please note that the coefficients will disappear which located in the "red" positions.

3 | x_{1} | + | 2 | x_{2} | + | x_{3} | + | x_{4} | = | - 2 | ||||

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

- | 2 | x_{1} | - | 2 | x_{2} | - | 3 | x_{3} | + | x_{4} | = | 9 | ||

x_{1} | + | 5 | x_{2} | - | x_{3} | + | 2 | x_{4} | = | 4 |

The equation 2 and equation 1 are reversed.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

3 | x_{1} | + | 2 | x_{2} | + | x_{3} | + | x_{4} | = | - 2 | ||||

- | 2 | x_{1} | - | 2 | x_{2} | - | 3 | x_{3} | + | x_{4} | = | 9 | ||

x_{1} | + | 5 | x_{2} | - | x_{3} | + | 2 | x_{4} | = | 4 |

The equation 1 multiplied by -3 is added to the equation 2. more info

( 3 x

_{1}+ x_{1}* ( -3) ) + ( 2 x

_{2}+ ( - x_{2}) * ( -3) ) + ( x

_{3}+ 4 x_{3}* ( -3) ) + ( x

_{4}+ ( - x_{4}) * ( -3) ) = -2 + ( -1) * ( -3)

The "red" coefficient is zero.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

5 | x_{2} | - | 11 | x_{3} | + | 4 | x_{4} | = | 1 | |||||

- | 2 | x_{1} | - | 2 | x_{2} | - | 3 | x_{3} | + | x_{4} | = | 9 | ||

x_{1} | + | 5 | x_{2} | - | x_{3} | + | 2 | x_{4} | = | 4 |

The equation 1 multiplied by 2 is added to the equation 3. more info

( -2 x

_{1}+ x_{1}* 2 ) + ( -2 x

_{2}+ ( - x_{2}) * 2 ) + ( -3 x

_{3}+ 4 x_{3}* 2 ) + ( x

_{4}+ ( - x_{4}) * 2 ) = 9 + ( -1) * 2

The "red" coefficient is zero.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

5 | x_{2} | - | 11 | x_{3} | + | 4 | x_{4} | = | 1 | |||||

- | 4 | x_{2} | + | 5 | x_{3} | - | x_{4} | = | 7 | |||||

x_{1} | + | 5 | x_{2} | - | x_{3} | + | 2 | x_{4} | = | 4 |

The equation 1 multiplied by -1 is added to the equation 4. more info

( x

_{1}+ x_{1}* ( -1) ) + ( 5 x

_{2}+ ( - x_{2}) * ( -1) ) + ( - x

_{3}+ 4 x_{3}* ( -1) ) + ( 2 x

_{4}+ ( - x_{4}) * ( -1) ) = 4 + ( -1) * ( -1)

The "red" coefficient is zero.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

5 | x_{2} | - | 11 | x_{3} | + | 4 | x_{4} | = | 1 | |||||

- | 4 | x_{2} | + | 5 | x_{3} | - | x_{4} | = | 7 | |||||

6 | x_{2} | - | 5 | x_{3} | + | 3 | x_{4} | = | 5 |

The equation 3 is added to the equation 2. more info

( 5 x

_{2}+ ( -4 x_{2}) ) + ( -11 x

_{3}+ 5 x_{3}) + ( 4 x

_{4}+ ( - x_{4}) ) = 1 + 7

This transformation will allow us to count without fractions for some time.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

x_{2} | - | 6 | x_{3} | + | 3 | x_{4} | = | 8 | ||||||

- | 4 | x_{2} | + | 5 | x_{3} | - | x_{4} | = | 7 | |||||

6 | x_{2} | - | 5 | x_{3} | + | 3 | x_{4} | = | 5 |

The equation 2 multiplied by 4 is added to the equation 3. more info

( -4 x

_{2}+ x_{2}* 4 ) + ( 5 x

_{3}+ ( -6 x_{3}) * 4 ) + ( - x

_{4}+ 3 x_{4}* 4 ) = 7 + 8 * 4

The "red" coefficient is zero.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

x_{2} | - | 6 | x_{3} | + | 3 | x_{4} | = | 8 | ||||||

- | 19 | x_{3} | + | 11 | x_{4} | = | 39 | |||||||

6 | x_{2} | - | 5 | x_{3} | + | 3 | x_{4} | = | 5 |

The equation 2 multiplied by -6 is added to the equation 4. more info

( 6 x

_{2}+ x_{2}* ( -6) ) + ( -5 x

_{3}+ ( -6 x_{3}) * ( -6) ) + ( 3 x

_{4}+ 3 x_{4}* ( -6) ) = 5 + 8 * ( -6)

The "red" coefficient is zero.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

x_{2} | - | 6 | x_{3} | + | 3 | x_{4} | = | 8 | ||||||

- | 19 | x_{3} | + | 11 | x_{4} | = | 39 | |||||||

31 | x_{3} | - | 15 | x_{4} | = | - 43 |

The equation 3 multiplied by 31/19 is added to the equation 4. more info

( 31 x

_{3}+ ( -19 x_{3}) * 31/19 ) + ( -15 x

_{4}+ 11 x_{4}* 31/19 ) = -43 + 39 * 31/19

The "red" coefficient is zero.

x_{1} | - | x_{2} | + | 4 | x_{3} | - | x_{4} | = | - 1 | |||||

x_{2} | - | 6 | x_{3} | + | 3 | x_{4} | = | 8 | ||||||

- | 19 | x_{3} | + | 11 | x_{4} | = | 39 | |||||||

56/19 | x_{4} | = | 392/19 |

We will find the variable x

_{4}from equation 4 of the system. 56/19 x

_{4}= 392/19x

_{4}= 7 We will find the variable x

_{3}from equation 3 of the system. - 19 x

_{3}+ 11 x_{4}= 39- 19 x

_{3}= 39 - 11 x_{4}- 19 x

_{3}= 39 - 11 * ( 7 )x

_{3}= 2 We will find the variable x

_{2}from equation 2 of the system. x

_{2}- 6 x_{3}+ 3 x_{4}= 8 x

_{2}= 8 + 6 x_{3}- 3 x_{4} x

_{2}= 8 + 6 * ( 2 ) - 3 * ( 7 )x

_{2}= - 1 We will find the variable x

_{1}from equation 1 of the system. x

_{1}- x_{2}+ 4 x_{3}- x_{4}= - 1 x

_{1}= - 1 + x_{2}- 4 x_{3}+ x_{4} x

_{1}= - 1 + ( - 1 ) - 4 * ( 2 ) + ( 7 )x

_{1}= - 3Result:

x

_{1}= - 3x

_{2}= - 1x

_{3}= 2x

_{4}= 7