 Lesson Explainer: Systems of Linear Equations | Nagwa Lesson Explainer: Systems of Linear Equations | Nagwa

# Lesson Explainer: Systems of Linear Equations Mathematics

In this explainer, we will learn how to solve systems of linear equations using elimination or substitution.

A system of equations is simply a collection of equations, usually in the same variables. When we speak of solving a system of equations, we mean solving them simultaneously, that is to say, finding the collection of solutions that make all of the equations in the system true at the same time. For this reason, systems of equations are often referred to as simultaneous equations.

Although a system of equations can contain any number of equations in any number of variables with terms of any degree, we will be restricting our attention in this explainer to the simplest case: systems of two equations in two variables in which both equations are linear. Recall that a linear equation is an equation containing no terms of degree higher than one. An example of the type of problem we will be considering is therefore

Observe that this system of linear equations (or pair of simultaneous (linear) equations) has the solution , because these values solve the equations simultaneously, which is to say that and .

The first method of solving systems of linear equations is the method of elimination. In our example above, observe that the coefficient of in the second equation is of equal magnitude but opposite sign to the coefficient of in the first equation. This means that if we add the left-hand side of the second equation to the left-hand side of the first equation, we get and the terms in will cancel each other out; will be eliminated. The resulting expression will contain only one variable, . If we are to add a quantity to one side of the first equation, we must add an equal quantity to the other side in order to maintain equality. Fortunately, the second equation tells us something that is equal to ; namely, . So, we can maintain equality by adding 1 to the right-hand side of the first equation:

Since has been eliminated, we can now solve the equation for :

To find the value of , we can substitute back into either of our starting equations. Let us use the first:

An important last step is to check our solution by substituting and into the equation we did not use:

This establishes that and do indeed solve both of our equations simultaneously.

Suppose we have a pair of simultaneous equations with the same coefficient and the same sign on one of the variables; for example,

We can do essentially the same thing as above, but this time we subtract the corresponding sides of one equation from the other instead of adding them:

Again, we substitute back into either starting equation:

Finally, we substitute and into the other equation to check that the equations are consistent and that the pair , simultaneously solves both of them:

For our first example, let us practice using elimination to solve a system by adding or subtracting the equations from each other as required.

### Example 1: Solving a System of Linear Equations Using Elimination

Using elimination, solve the simultaneous equations

We notice that the coefficient of in both equations is equal but of opposite sign. This means that we can eliminate by adding the corresponding sides of the two equations:

We now substitute back into one of our starting equations:

We have found a solution to the system of equations: , . The last thing to do is to substitute this solution back into the equation we did not use to check that the solutions we have found do indeed solve both equations simultaneously:

This confirms that , is the (unique) solution to the pair of simultaneous equations that we were given.

We can also use the method of elimination to solve systems of linear equations when none of the coefficients are equal. Consider, for example, the system

Notice that here the coefficient of in the second equation is double the coefficient of in the first equation. So, let us multiply all of the first equation by 2:

We can now subtract corresponding sides of this new equation from :

As before, we substitute back into one of our starting equations to find :

Finally, we substitute our solution , into the other starting equation to check that we have found a simultaneous solution:

However, in some cases, neither of the variables in either equation is a direct multiple of the other, so more calculations will need to be done to be able to use elimination. In the next example, we will look at one such case.

### Example 2: Solving a System of Linear Equations Using Elimination

Use the elimination method to solve the simultaneous equations

In this example, the coefficients of the corresponding variables in the two equations are neither equal nor integral multiples of one another. This means that we are going to have to do a little work before we can eliminate anything.

The first thing to do is to decide which variable we want to eliminate. Since the coefficients of have opposite signs in the two equations, we will be able to eliminate by adding the two equations. Adding is generally easier than subtracting, so let us eliminate . Because the coefficients of in the two equations are not equal, we need to make them equal. We can do this by multiplying the first equation by the coefficient of in the second equation, which is 3, to get and by multiplying the second equation by the coefficient of in the first equation, which is 2, to get

We are now ready to add the corresponding sides of these new equations:

We now substitute back into one of our starting equations; let us use the second:

Finally, we check our solution , by substituting it into the other equation:

This indicates that our calculations were sound and that the pair of values , simultaneously solves the two equations.

We now summarize this discussion into a how-to for solving pairs of simultaneous linear equations by elimination.

### How To: Solving Simultaneous Equations by Elimination

Suppose we are asked to solve a pair of simultaneous linear equations

1. First, check if one variable can easily be eliminated by adding or subtracting the equations. If not, choose one variable to be eliminated and multiply one or both equations so that the coefficients of this variable are the same (or one is the negative of the other).
2. Add or subtract the equations together to eliminate one variable, and rearrange to get the other variable.
3. Substitute this value into one of the two equations to get the eliminated variable.
4. Finally, check your answer by substituting both variables into the other equation and verifying that both sides are the same.

We now turn to the second method of solving systems of linear equations: the method of substitution. The method of substitution is very handy when one of the variables is the subject of one of the equations in the system (as in the next example) or when one of the equations can be easily rearranged to make a variable the subject.

### Example 3: Solving a System of Linear Equations Using Substitution

Solve the simultaneous equations and .

Here, we have a pair of simultaneous equations in which one of the variables, namely, , is the subject of one of the equations, . This means that we can directly substitute the expression for in the first equation:

We can now substitute into either starting equation to solve for :

Finally, we substitute our solution , into the other equation to check for mistakes:

We conclude that the pair of values , solves the simultaneous equations and .

The method of substitution can also be used when neither variable is the subject of either equation, as given. In this case, we will need to do a little rearrangement first. For example, consider the equations

Here, rearranging the first equation to make the subject can be achieved by first dividing by 3 and then subtracting from both sides:

We can now substitute into and solve for :

To find the value of , we substitute into either of the starting equations:

As always, the final thing to do is to check whether our solution , is correct when substituted into the other equation:

Let us now summarize the method of substitution in a how-to.

### How To: Solving Simultaneous Equations by Substitution

Suppose we are asked to solve a pair of simultaneous linear equations

1. Rearrange one of the two equations to make one of the two variables the subject.
2. Substitute the resulting expression for that variable everywhere in the other equation, and then rearrange to solve for the remaining variable.
3. Substitute this value back into either of the starting equations and solve for the variable you made the subject.
4. Finally, check your answer by substituting both variables into the other equation and verifying that both sides are the same.

It is worth stressing that neither elimination nor substitution, is “better” than the other. One should use whichever seems easiest for the problem at hand. This kind of decision making often comes into play when some rearrangement of the equations is necessary before they can be solved, as we will see in the next example.

### Example 4: Solving a System of Linear Equations Where Rearrangement Is Necessary

Solve the system of equations

This question presents us with a pair of simultaneous equations requiring some rearrangement before they can be solved. It is not immediately obvious whether it will be easier to solve these equations using elimination or substitution, so let us try both methods. You can decide which you think is more suitable in this situation.

Method 1: Substitution

Notice that the term appears in the first equation and on both sides of the second equation (after expanding the bracket on the right-hand side). So let us try substituting for . First, we rearrange the first equation to make the subject: and then we expand the right-hand bracket in the second equation:

We are now ready to substitute the expression for on both sides of the equation :

Expanding and simplifying, we get

Collecting terms in on the left, we get

We now substitute into the first equation to solve for :

So, the method of substitution yields the solution , . We could at this point substitute , back into the second equation to make sure we have not made any mistakes. Let us instead try solving the problem using the method of elimination and see if we get the same answer.

Method 2: Elimination

We need to rearrange the equations so that they are in a form amenable to the elimination method, that is, with variable terms on the left and constant terms on the right, like . The first equation is easier, so let us do it first:

Now, for the second equation, first, we will expand all brackets and simplify:

Then, we will collect the variable terms on the left-hand side:

We now have the rearranged equations

Let us multiply the first of these rearranged equations by 2 to make the coefficient of equal to that of in the second rearranged equation, and subtract this from to eliminate and obtain :

We can now substitute into the first equation to solve for :

The two methods agree, giving us a solution of , .

We have seen how to solve systems of linear equations using the methods of elimination and substitution. We will end with an example of the reverse process: calculating the coefficients in a system of equations when the solution is given.

### Example 5: Finding the Unknowns in a System of Linear Equations given the Solutions

Consider the simultaneous equations where and are constants.

Given that , is a solution to this pair of simultaneous equations, find the values of and .

This form of question may appear unfamiliar, but general principles of mathematical problem solving apply: what do you know and what can you do with what you know? Well, we are told that the values , solve the equations which simply means that these equations are both true for these values. We can therefore substitute in 2 and 3 for and in the first equation: and do the same in the second equation:

We can now substitute into the equation that we got from the first equation:

We have found the coefficients: and .

Let us finish by recapping a few important concepts from this explainer.

### Key Points

• We can solve simultaneous equations by the method of elimination.
1. First, we rearrange both equations into the form .
2. We then check to see if one variable can be easily eliminated by adding or subtracting the equations. If not, we choose a variable to be eliminated and multiply one or both equations so that the coefficients of this variable are the same (or one is the negative of the other).
3. Once the coefficients of one of the variables are suitably equalized, we add or subtract the equations together to eliminate that variable, and then we rearrange to solve for the other.
4. Having found the value of one variable, we substitute it back into either of the starting equations to get the eliminated variable.
5. Finally, we check our answer by substituting our two solutions into the other equation and verifying that both sides are the same.
• We can alternatively solve simultaneous equations by the method of substitution.
1. First, we rearrange one of the equations to make one of the variables the subject and then substitute the resulting expression for that variable into the other equation.
2. Rearranging the resulting equation allows us to solve for the remaining variable. We can then substitute this value back into either of the starting equations to solve for the variable that was made the subject.
3. As in the elimination method, the last thing to do is substitute the pair of solutions into the other starting equation to check that we have indeed found a pair of solutions that solves both equations simultaneously.