Systems of equations

In practice, we often come across the case where we are not calculating one equation, but two equations at once (or even more). First we will show how to solve such a system of equations using the addition method. To solve systems of equations using matrices, go to the article Systems of linear equations.

The Basics

A system of equations represents multiple equations that we solve together. We also usually have more than one variable in a system of equations, so we try to find a combination of numbers that, when we substitute in all the variables, makes all the equations make sense.

An example of a system of equations might be this system:

$$\begin{array}{ccccc} a&+&b&=&0\\ 2a&+&b&=&10 \end{array}$$

The result of this system should be a pair (or set of pairs) of numbers that we substitute after the variables a and after b, with both equations remaining valid. We can sort of see by eye that the variable a must equal −b, in order for the equation a + b = 0 to be satisfied. If we have this knowledge, then we can easily see from the second equation that a = 10 and b = −10. After substitution, we get:

$$\begin{array}{ccccc} 10&-&10&=&0\\ 2\cdot10&-&10&=&10 \end{array}$$

So, we have solved by eye, now let's get into some functional algorithms for solving systems of equations.

The addition method

In the substitution method, we express one of the unknowns in one equation and then plug this result into the other equation. So to start with, we will need some system. Like this one:

$$\begin{array}{ccccc} 4x&+&2y&=&6\\ 5x&-&3y&=&13 \end{array}$$

This is a simple system of two equations with two unknowns. Our job is to express the variables x and y so that both equations make sense. From the first equation, we isolate y. So we just take the first equation and isolate y.

$$4x+2y=6$$

The first thing we do is subtract 4x:

$$2y=6-4x$$

Divide by two:

$$y=3-2x$$

Now we know what y equals . We can substitute this result after the variable y in the second equation. So in the second equation, instead of y, we write 3 − 2x. What does this accomplish? What we achieve is that we don't have two variables in the second equation, but only one, because we substitute an expression that contains only the variable x in place of the variable y. So we're going to add:

$$\begin{array}{lllll} 5x&-&3y&=&13\quad/y=3-2x\\ 5x&-&3(3-2x)&=&13 \end{array}$$

Now we're just going to multiply the parentheses and add up what we can:

$$\begin{array}{rrrll} 5x&-&3(3-2x)&=&13\\ 5x&-&(9-6x)&=&13\\ 5x&-&9+6x&=&13\\ &&11x-9&=&13\\ &&11x&=&22\\ &&x&=&2 \end{array}$$

Now we know the value of x, which equals two. That leaves us to calculate the value of y. We do this by plugging the already known value of x into some equation that contains both the variables x and y. For example, we could choose the very first equation. We add as follows:

$$\begin{array}{rrcll} 4x&+&2y&=&6\quad/x=2\\ 4\cdot2&+&2y&=&6\\ &&2y&=&6-8\\ &&2y&=&-2\\ &&y&=&-1\\ \end{array}$$

This solves the system. The system of equations has a single solution, namely x = 2 and y = −1. If you want to check this result, simply add to both equations. So, substituting into the first equation:

$$\begin{array}{rrrcl} 4x&+&2y&=&6\quad/x=2, y=-1\\ 4\cdot2&+&2\cdot(-1)&=&6\\ 8&-&2&=&6\\ &&6&=&6 \end{array}$$

And substituting into the second equation:

$$\begin{array}{rrrcl} 5x&-&3y&=&13\quad/x=2, y=-1\\ 5\cdot2&-&3\cdot(-1)&=&13\\ 10&+&3&=&13\\ &&13&=&13 \end{array}$$

The addition method

I prefer this method, but of course it depends on the specific example. It doesn't always fit. The principle of the addition method is that addition of equations is an equivalent adjustment when solving the equations. The addition of equations is then done by adding the left side of one equation to the left side of the other equation, and then adding the right sides of the equations. In general, we have the following system of equations:

$$\begin{array}{rrrcl} f_1(x)&+&g_1(y)&=&a\\ f_2(x)&+&g_2(y)&=&b \end{array}$$

By summing these equations, we would get a single equation defined as follows:

$$f_1(x)+f_2(x)+g_1(y)+g_2(y)=a+b$$

We add the left sides separately and the right sides separately. But what will be our goal? If we add the two equations and are left with two variables, we're not doing much good. Therefore, we try to make one variable disappear after adding the two equations, that is, make them subtract from each other, cancel each other out. So we're trying to make the sum of one of the pairs of functions, either f or g, be zero:

$$f_1(x)+f_2(x)=0 \quad\vee\quad g_1(y)+g_2(y)=0$$

How do we achieve this? The system of equations contains ordinary equations to which we can apply equivalent modifications of the equations as we know them from ordinary equation types. Therefore, we can multiply any of the equations by a number and the validity of the equation will not change. So let's try to solve the previous system of equations using the addition method. The problem is the same:

$$\begin{array}{ccccc} 4x&+&2y&=&6\\ 5x&-&3y&=&13 \end{array}$$

If we added the equations immediately, we would be left with both variables:

$$4x+5x\ne0,\qquad2y-3y\ne0$$

Therefore, we must first apply some adjustments. We will try to make the variable y"disappear". To do this, we need the coefficient before y in both equations to be equal, except for the sign - it must be opposite. So we are looking for the least common multiple, which is 6. A simple procedure is to multiply the coefficients: two times three is six - so the number six is definitely divisible by both numbers (note: this procedure does not ensure the least common multiple, but it does find a number that is divisible by both coefficients).

So now we are trying to get a six in front of y in each equation. So we multiply the first equation by three, the second by two:

$$\begin{array}{ccccc} 4x&+&2y&=&6\quad/\cdot3\\ 5x&-&3y&=&13\quad/\cdot2 \end{array}$$

We get:

$$\begin{array}{ccccc} 12x&+&6y&=&18\\ 10x&-&6y&=&26 \end{array}$$

Now add the equations:

$$\begin{eqnarray} 12x+10x+6y-6y&=&18+26\\ 22x+0y&=&44 \end{eqnarray}$$

This gives us one equation with one unknown, which we can solve easily:

$$\begin{eqnarray} 22x+0y&=&44\\ 22x&=&44\\ x&=&2 \end{eqnarray}$$

We can see that we have the same result as with the previous method, the addition method. Now we would just plug y into an equation again and get the result y = −1. The test would also work exactly the same.

Number of solutions

A system of equations does not have to have only one solution. It can also have infinitely many solutions, or conversely, no solutions. Just briefly on when this occurs. If we have two equations of two unknowns, and we can express one of these equations using the other equation by applying some equivalent treatment to it, then the system has infinitely many solutions. As an example, consider the system

$$\begin{array}{rrrcl} x&+&y&=&2\\ 2x&+&2y&=&4 \end{array}$$

We see that if we multiply the first equation by two, we get exactly the second equation. The second equation thus gives us no "new information" about the system, so it is practically useless. The overall effect of this is that any solution to the equation

$$x+y=2$$

is also a solution of the whole system. For example, the pairs (1,1) or (−3, 5) are both solutions of the first equation and the whole system.

The system then has neither solution, we have some conflicting equations in the system that cannot be valid at the same time. For example:

$$\begin{array}{rrrcl} x&+&y&=&2\\ x&+&y&=&4 \end{array}$$

It cannot be true that the sum of x + y equals both two and four at the same time, therefore the system has no solution. A few more examples:

The first example

Calculate the following system of two equations with two unknowns:

$$\begin{array}{rrrcl} 7x&+&3y&=&21\\ 14x&+&9y&=&0 \end{array}$$

After a glance at the system, we see that it is adept at the addition method. The coefficient u x in the second equation is twice as large as in the first equation, and the coefficient u y in the second equation is three times as large. So just multiply the first equation by either minus two or minus three and add the equations. For example, we try subtracting the variable y, so we multiply the first equation by −2. We get:

$$\begin{array}{rrrcl} -14x&-&6y&=&-42\\ 14x&+&9y&=&0 \end{array}$$

Add the two equations together and we get

$$\begin{eqnarray} 14x-14x+9y-6y&=&-42\\ 3y&=&-42\\ y&=&-14 \end{eqnarray}$$

We have the first result of our system. We plug this result into some equation, we can plug it back into the very first equation:

$$\begin{eqnarray} 7x+3y&=&21\quad/y=-14\\ 7x+3\cdot(-14)&=&21\\ 7x-42&=&21\\ 7x&=&63\\ x&=&9 \end{eqnarray}$$

So we have the result of the system of equations, x = 9 and y = −14.

The second example

Calculate the following system of two equations with two unknowns:

$$\begin{array}{rcl} (x + 4)(y - 2)& =& (x - 2)(y + 13)\\ (x - 1)(y - 3) &= &(x + 2)(y - 5) \end{array}$$

This looks a little wild, but it will work. First of all, we need to multiply the parentheses, without that we won't get anywhere.

$$\begin{eqnarray} xy - 2x + 4y - 8 &=& xy + 13x - 2y - 26\\ xy - 3x - y + 3 &=& xy - 5x + 2y - 10 \end{eqnarray}$$

Now let's rearrange the equations into a more usable form, transferring the variables to the left side of the equation and the absolute terms to the right, then subtract what we can.

$$\begin{array}{rrrcl} -15x& +& 6y &=& -18\\ 2x &-& 3y& =& -13 \end{array}$$

Now we've got a pretty usable system of equations out of those ugly looking equations and we can apply some of the classical procedures. For example, we can multiply the second equation by two and add it to the first equation. After multiplying the second equation by two, we get:

$$\begin{array}{rrrcl} -15x& +& 6y &=& -18\\ 4x &-& 6y& =& -26 \end{array}$$

Now we add the two equations using the classical addition method:

$$\begin{eqnarray} 4x-15x+6y-6y&=&-18-26\\ -11x&=&-44\\ 11x&=&44\\ x&=&4 \end{eqnarray}$$

Great, we now know one result. We plug this result into one of the equations and calculate y. For example, we can plug 2x− 3y = −13 into the equation and get:

$$\begin{eqnarray} 2x - 3y &=& -13\quad/x=4\\ 8 - 3y &=& -13\\ -3y &=& -21\\ -y &=& -7\\ y&=&7 \end{eqnarray}$$

We now have the complete result of the system of equations - it has a solution if x = 4 and y = 7.