Welp, it's been half a year, which means it's time for me to try to write another post.

So how do we solve sets of simultaneous linear equations? Well, how did we solve them last time? We simplify our current set of equations to use a smaller set of variables, then solve the new set of equations.

Now, I don't know about you guys, but I find that writing all those variables can get rather tedious. So let's use a different notation:

Earlier, we had the equations:

2a + b = 5

a + 2b = 4

I'm going to rewrite this as follows:

| 2 1 | 5 |

| 1 2 | 4 |

(This is what I'll use to replace LaTeX, since iirc we don't have it now).

With this notation, there is now a specific "order" to the variables. So when we eliminate variables, we will be eliminating them from left to right.

So how did we accomplish this before? We doubled the second equation, resulting in new equations that under our new notation would be

| 2 1 | 5 |

| 2 4 | 8 |

Or equivalently - we doubled everything in the second row.

We then subtracted the first equation from the second, getting

| 2 1 | 5 |

| 0 3 | 3 |

Or equivalently - we subtracted each component in the first row from the corresponding component in the second row.

This suggests that we have two basic operations that we commonly do:

1) Multiply everything in a row by some nonzero number.

2) Subtract some multiple of one row from another.

These are called "elementary row operations". We can use them to eliminate variables from left to right as follows: Use the first equation to zero out the later equations in the first column. Then ignore the first equation (row) and first variable (column), and repeat until you can do no more. Once we have the last value, we can then back-substitute to find the rest.

It turns out that we may need one more elementary row operation: Say that for some reason, Alice decided to skip apples for a week, and instead we had the following equations:

| 0 1 | 2 |

| 1 2 | 5 |

How would we eliminate the variable a? We clearly can't eliminate it using the first equation, because apples are irrelevant to Alice's price. So we have to switch our equations, and get

| 1 2 | 5 |

| 0 1 | 2 |

which we can then solve normally.

Next time: more on back-substituting and linear algebra.