A basic (highschool) approach to solving a system of linear equations is substitution of variables. The idea is best illustrated by a simple example. Consider the following system:
Rearranging the first equation, we may express the first variable as a function of the second one:
and plug this expression into the second equation:
Then we may plug this value back into the expression of x1, which yields x1 = 2.
Despite its conceptual simplicity, this approach is somewhat cumbersome, as well as difficult to implement efficiently in computer software. A related idea, which is more systematic, is elimination of variables. In the case above, this is accomplished as follows:
- Multiply the first equation by −3, to obtain −3x1 + 6x2 = −24
- Add the new equation to the second one, which yields 7x2 = −21 and implies x2 = −3
- Substitute back into the first equation, which yields x1 = 2
We see that elimination of variables, from a conceptual perspective, is not that different from substitution. One can see the difference when dealing with large systems of equations, where carrying out calculations without due care can result in significant numerical errors. Gaussian elimination is a way to make elimination of variables systematic.
Leave a Reply