Solving Linear Systems of Equations using Gaussian Elimination

in

Let me give you an example: say we have the following system of equations:

2x + y = 6
3x y = 9

Now, let’s write this out in matrix form (because that makes it look more official):

| 2 1 |
| 3 -1 |
| x | y |

The first row is just the coefficients of our variables (in this case, x and y) for the first equation. The second row is similar but for the second equation. And then we have a third column that represents the constants on the right-hand side of each equation.

So what do we want to do? We want to get rid of one variable (let’s say y) so that we can solve for x in terms of just x and some numbers. To do this, we need to find a way to eliminate y from the first equation without changing the value of x.

Here’s where Gaussian Elimination comes in: we add -1/2 times row 2 (which is our second equation) to row 1 (our first equation). This gives us:

| 2 1 |
| 3 -1 |
| x | y |

Now, if you look at the new first row, you’ll notice that we have a 0 in the y column. That means that when we solve for x using this method (which is called back-substitution), we won’t need to worry about y anymore! We can just focus on finding x.

To do this, let’s write out our new system of equations:

| 2 1 |
| 3 -1 |
| x | y |

We want to solve for x in terms of the constants (which are now just numbers) and any other variables that we haven’t eliminated yet. In this case, there aren’t any other variables left to eliminate, so we can just focus on finding x:

x = (6 3y) / 2

Now, let’s plug in our value for y from the second equation (which is what we got by solving for it using back-substitution):

x = (6 3(9/3)) / 2

Simplifying this gives us:

x = (-18) / 6

So our final answer is x = -3. And that’s how Gaussian Elimination works! It may seem like a lot of work, but it’s actually pretty simple once you get the hang of it.

SICORPS