Simultaneous equations
In practice we often need to solve not one equation but two at the same time (or even more). First we will look at how to solve simultaneous equations using the substitution method. To solve them using matrices, go to the article on systems of linear equations.
The basics
Simultaneous equations are several equations that we solve together. They usually contain more than one variable, and we try to find numbers that make every equation true when we substitute them for all the variables.
Here is an example of simultaneous equations:
The result should be a pair of numbers (or a set of pairs) that we substitute for the variables a and b so that both equations stay true. By eye we can see that a must equal −b for a + b = 0 to hold. With that in mind, the second equation easily gives a = 10 and b = −10. After substituting we get:
So that was solving by eye. Now let’s turn to some proper methods for solving simultaneous equations.
Substitution method
In the substitution method we make one of the unknowns the subject of one equation and then put the result into the other equation. So first we need a pair of equations. How about these:
This is a simple pair of equations in two unknowns. Our task is to find x and y so that both equations are true. We start by making y the subject of the first equation, so let’s take just the first equation.
First we subtract 4x:
Divide by two:
Now we know what y is equal to, so we can substitute it for y in the second equation. In the second equation we write 3 − 2x in place of y. What does that achieve? The second equation no longer has two variables but only one, because we replaced y with an expression that contains only x. So we substitute:
Now we just expand the brackets and collect like terms:
Now we know that x is equal to two. What remains is to work out y. We do that by substituting the known value of x into an equation that contains both variables, x and y. We can pick the very first equation, for example. We substitute like this:
That solves the equations. They have exactly one solution, x = 2 and y = −1. If you want to check the result, simply substitute into both equations. Substituting into the first equation:
And substituting into the second equation:
Elimination method
I like this method better, but of course it depends on the particular problem. It is not always suitable. The idea behind elimination is that adding equations is a step that keeps the system equivalent. We add equations by adding the left-hand side of one equation to the left-hand side of the other, and then adding the right-hand sides. Take a general pair of equations like this:
Adding these equations gives a single equation:
We added the left-hand sides together and the right-hand sides together. But what is our aim? If we add two equations and two variables are left, we haven’t gained much. So we try to make one variable disappear when we add the equations – to make its terms cancel each other out. In other words, we try to make the sum of one of the pairs of functions, either f or g, equal to zero:
How do we do that? Simultaneous equations contain ordinary equations, to which we can apply the usual steps that keep an equation equivalent, just as we do with other types of equation. So we can multiply either equation by a number without changing whether it is true. Let’s solve the previous pair of equations using elimination. The problem is the same:
If we added the equations straight away, both variables would remain:
So we first have to make some changes. We will try to make the variable y “disappear”. For that we need the coefficient of y to be the same in both equations, except for the sign – that has to be opposite. So we look for the least common multiple (LCM), which is 6. A simple way is to multiply the coefficients: two times three is six, so six is definitely a multiple of both numbers (note: this method doesn’t guarantee the least common multiple, but it finds a number that is a multiple of both coefficients).
Now we want a six in front of y in each equation. So we multiply the first equation by three and the second by two:
We get:
Now we add the equations:
We now have a single equation in one unknown, which we already know how to solve easily:
We can see that we got the same result as with the previous method, substitution. Now we would again substitute x into one of the equations and get y = −1. The check would also work in exactly the same way.
Number of solutions
Simultaneous equations don’t have to have exactly one solution. They can also have infinitely many solutions, or none at all. Here is a brief look at when each happens. If we have two equations in two unknowns and we can get one of them from the other by applying steps that keep it equivalent, then the system has infinitely many solutions. An example is the pair
We can see that if we multiply the first equation by two, we get exactly the second equation. The second equation therefore gives us no “new information” about the system, so it is practically useless. This means that any solution of the equation
is also a solution of the whole system. For example, the pairs (1, 1) and (−3, 5) are solutions of the first equation and of the whole system at the same time.
The system has no solution at all if it contains contradictory equations that cannot both be true. For example:
The sum x + y cannot equal both two and four at the same time, so the system has no solution. Here are a few more examples:
First example
Solve the following pair of equations in two unknowns:
At a quick glance we can see that this is a good candidate for elimination. The coefficient of x in the second equation is twice the one in the first equation, and the coefficient of y is three times as big. So we just need to multiply the first equation by either minus two or minus three and add the equations. Let’s try to eliminate x, so we multiply the first equation by −2. We get:
We add these two equations and get
That is the first part of the solution. We substitute it into one of the equations; we can use the very first equation again:
So the solution of the simultaneous equations is x = 9 and y = −14.
Second example
Solve the following pair of equations in two unknowns:
This looks a bit wild, but we can do it. First of all we have to expand the brackets; we won’t get anywhere without that.
Now we rearrange the equations into a more useful form: we move the variables to the left-hand side and the constant terms to the right-hand side, then cancel what we can.
From those ugly-looking equations we now have a fairly usable pair, and we can apply one of the standard methods. For example, we can multiply the second equation by two and add it to the first equation. Multiplying the second equation by two gives:
Now we add the two equations using the standard elimination method:
Excellent, we already know one part of the solution. We substitute it into one of the equations and work out y. For example, we can substitute into the equation 2x− 3y = −13 and get:
Now we have the complete solution of the simultaneous equations – it is x = 4 and y = 7.