To solve a system of linear equations, we first simplify the system and then do backward substitution.

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

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

2x_{1} |
+ 2x_{2} |
+ x_{3} |
= | 6 |

the variable `x`_{1} appears in all
3 equations. We try to eliminate `x`_{1} so that it appears in only 1 equation.
Specifically, by multiplying -3 to the 2nd equation and then add to the 1st equation,
`x`_{1} is eliminated from the 1st equation.

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

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

2x_{1} |
+ 2x_{2} |
+ x_{3} |
= | 6 |

Next the operation (-2)[equation 2] + [equation 3]
(multiply -2 to the 2nd equation and then add to the 3rd equation)
further eliminates `x`_{1} from the 3rd equation.

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

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

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

The system is as simple as we can get as far as `x`_{1} is concerned.

Next we try to simplify the system regarding `x`_{2}. The operation (-1)[equation 1]
+ [equation 3] eliminates `x`_{2} from the 3rd equation.

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

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

3x_{3} |
= | 6 |

Although the system is simple enough to be solved. We may still make some cosmetic improvements. By exchanging the 1st and the 2nd equations (denoted [equation 1] ↔ [equation 2]), we rearrange the equations from the most complicated down to the simplest.

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

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

3x_{3} |
= | 6 |

Finally, the coefficients can be further simplified by multiplying 1/4 and 1/3 to the 2nd and the 3rd equations (denoted (1/4)[equation 2] and (1/3)[equation 3]).

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

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

x_{3} |
= | 2 |

This completes the simplification process.

Now we start solving the system by backward substitution. From the 3rd equation (the simplest equation), we have

`x`_{3} = 2.

Substituting this into the 2nd equation (the next simplest), we get

`x`_{2} = -1 + `x`_{3} = -1 + 2 = 1.

Further substituting into the 1st equation (the most complicated), we get

`x`_{1} = 2 + `x`_{2}
- `x`_{3} = 2 + 1 - 2 = 1.

We conclude that the system has a unique solution `x`_{1}
= 1, `x`_{2} = 1, `x`_{3} = 2.

In the example above, we have used the following operations to simplify a system.

`r`[equation`i`] + [equation`j`]- add a multiple of one equation to another.
- [equation
`i`] ↔ [equation`j`] - exchange two equations.
`d`[equation`i`],`d`≠ 0- multiply a nonzero number to an equation.

In general, any system of linear equations can be simplified, by the three operations, to a simple system in which equations are arranged from the most complicated to the simplest. This process is called the gaussian elimination.

After completing the gaussian elimination, we may solve the simplest equation. Then we successively substitute the results into more and more complicated equations to get the whole solution. This process is called the backward substitution.

Example This example shows different choices may be taken in the gaussian elimination. However, the solution will not be affected by the choices.

For the same system just solved,

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

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

2x_{1} |
+ 2x_{2} |
+ x_{3} |
= | 6 |

we try a slightly different gaussian elimination process. By (-3/2)[equation 3] + [equation 1] and (-1/2)[equation 3] + [equation 2], we have

- 2x_{2} |
- 5/2x_{3} |
= | -7 | |

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

2x_{1} |
+ 2x_{2} |
+ x_{3} |
= | 6 |

Then (-1)[equation 2] + [equation 1] gives us

- 3x_{3} |
= | -6 | ||

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

2x_{1} |
+ 2x_{2} |
+ x_{3} |
= | 6 |

We further exchange [equation 1] ↔ [equation 3] to rearrange from the most complicated down to the simplest.

2x_{1} |
+ 2x_{2} |
+ x_{3} |
= | 6 |

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

- 3x_{3} |
= | -6 |

Now from the 3rd equation, we have

`x`_{3} = (-6)/(-3) = 2.

Substituting into the 2nd equation, we have

`x`_{2} = -(-1 - 1/2`x`_{3})/2 = -(-1 - (1/2)×2)/2 = 1.

Substituting further into the 1st equation, we get

`x`_{1} = (6 - 2`x`_{2} - `x`_{3})/2 = (6 - 2 - 2)/2 = 1.

[Extra The three operations do not change solutions]