The portal has been deactivated. Please contact your portal admin.

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 π‘₯+𝑦=3,π‘₯βˆ’π‘¦=1.

Observe that this system of linear equations (or pair of simultaneous (linear) equations) has the solution π‘₯=2, 𝑦=1 because these values solve the equations simultaneously, which is to say that 2+1=3 and 2βˆ’1=1.

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, π‘₯βˆ’π‘¦=1. So, we can maintain equality by adding 1 to the right-hand side of the first equation: π‘₯+𝑦=3π‘₯+𝑦+(π‘₯βˆ’π‘¦)=3+1π‘₯+π‘₯=4.

Since 𝑦 has been eliminated, we can now solve the equation for π‘₯: 2π‘₯=4π‘₯=2.

To find the value of 𝑦, we can substitute π‘₯=2 back into either of our starting equations. Let us use the first: π‘₯+𝑦=32+𝑦=3𝑦=1.

An important last step is to check our solution by substituting π‘₯=2 and 𝑦=1 into the equation we did not use: π‘₯βˆ’π‘¦=12βˆ’1=11=1.βœ“

This establishes that π‘₯=2 and 𝑦=1 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, 5π‘₯+3𝑦=2,2π‘₯+3𝑦=11.

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: 5π‘₯+3π‘¦βˆ’(2π‘₯+3𝑦)=2βˆ’115π‘₯βˆ’2π‘₯+3π‘¦βˆ’3𝑦=2βˆ’113π‘₯=βˆ’9π‘₯=βˆ’3.

Again, we substitute π‘₯=βˆ’3 back into either starting equation: 2π‘₯+3𝑦=112Γ—(βˆ’3)+3𝑦=11βˆ’6+3𝑦=113𝑦=17𝑦=173.

Finally, we substitute π‘₯=βˆ’3 and 𝑦=173 into the other equation to check that the equations are consistent and that the pair π‘₯=βˆ’3, 𝑦=173 simultaneously solves both of them: 5π‘₯+3𝑦=25Γ—(βˆ’3)+3Γ—173=2βˆ’15+17=22=2.βœ“

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 3π‘₯+2𝑦=14,6π‘₯βˆ’2𝑦=22.

Answer

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: 3π‘₯+2𝑦+(6π‘₯βˆ’2𝑦)=14+223π‘₯+6π‘₯+2π‘¦βˆ’2𝑦=14+229π‘₯=36π‘₯=4.

We now substitute π‘₯=4 back into one of our starting equations: 3π‘₯+2𝑦=143Γ—4+2𝑦=1412+2𝑦=142𝑦=2𝑦=1.

We have found a solution to the system of equations: π‘₯=4, 𝑦=1. 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: 6π‘₯βˆ’2𝑦=226Γ—4βˆ’2Γ—1=2224βˆ’2=2222=22.βœ“

This confirms that π‘₯=4, 𝑦=1 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 βˆ’7π‘₯+6𝑦=βˆ’8,6π‘₯+12𝑦=24.

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: βˆ’14π‘₯+12𝑦=βˆ’16.

We can now subtract corresponding sides of this new equation from 6π‘₯+12𝑦=24: 6π‘₯+12π‘¦βˆ’(βˆ’14π‘₯+12𝑦)=24βˆ’(βˆ’16)6π‘₯βˆ’(βˆ’14π‘₯)+12π‘¦βˆ’12𝑦=24+1620π‘₯=40π‘₯=2.

As before, we substitute π‘₯=2 back into one of our starting equations to find 𝑦: 6π‘₯+12𝑦=246Γ—2+12𝑦=2412+12𝑦=2412𝑦=12𝑦=1.

Finally, we substitute our solution π‘₯=2, 𝑦=1 into the other starting equation to check that we have found a simultaneous solution: βˆ’7π‘₯+6𝑦=βˆ’8βˆ’7Γ—2+6Γ—1=βˆ’8βˆ’14+6=βˆ’8βˆ’8=βˆ’8.βœ“

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 4π‘₯βˆ’2𝑦=4,5π‘₯+3𝑦=16.

Answer

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 12π‘₯βˆ’6𝑦=12 and by multiplying the second equation by the coefficient of 𝑦 in the first equation, which is 2, to get 10π‘₯+6𝑦=32.

We are now ready to add the corresponding sides of these new equations: 12π‘₯+10π‘₯βˆ’6𝑦+6𝑦=12+3222π‘₯=44π‘₯=2.

We now substitute π‘₯=2 back into one of our starting equations; let us use the second: 5π‘₯+3𝑦=165Γ—2+3𝑦=1610+3𝑦=163𝑦=6𝑦=2.

Finally, we check our solution π‘₯=2, 𝑦=2 by substituting it into the other equation: 4π‘₯βˆ’2𝑦=44Γ—2βˆ’2Γ—2=48βˆ’4=44=4.βœ“

This indicates that our calculations were sound and that the pair of values π‘₯=2, 𝑦=2 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 𝑦+4π‘₯=βˆ’8 and 𝑦=5π‘₯+10.

Answer

Here, we have a pair of simultaneous equations in which one of the variables, namely, 𝑦, is the subject of one of the equations, 𝑦=5π‘₯+10. This means that we can directly substitute the expression 5π‘₯+10 for 𝑦 in the first equation: 𝑦+4π‘₯=βˆ’85π‘₯+10+4π‘₯=βˆ’8(𝑦)9π‘₯+10=βˆ’89π‘₯=βˆ’18π‘₯=βˆ’2.substitutingfor

We can now substitute π‘₯=βˆ’2 into either starting equation to solve for 𝑦: 𝑦=5π‘₯+10𝑦=5Γ—(βˆ’2)+10(π‘₯=βˆ’2)𝑦=βˆ’10+10𝑦=0.substituting

Finally, we substitute our solution π‘₯=βˆ’2, 𝑦=0 into the other equation to check for mistakes: 𝑦+4π‘₯=βˆ’80+4Γ—(βˆ’2)=βˆ’8βˆ’8=βˆ’8.βœ“

We conclude that the pair of values π‘₯=βˆ’2, 𝑦=0 solves the simultaneous equations 𝑦+4π‘₯=βˆ’8 and 𝑦=5π‘₯+10.

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 3π‘₯+12𝑦=21,2π‘₯βˆ’4𝑦=11.

Here, rearranging the first equation to make π‘₯ the subject can be achieved by first dividing by 3 and then subtracting 4𝑦 from both sides: 3π‘₯+12𝑦=21π‘₯+4𝑦=7π‘₯=7βˆ’4𝑦.

We can now substitute π‘₯=7βˆ’4𝑦 into 2π‘₯βˆ’4𝑦=11 and solve for 𝑦: 2(7βˆ’4𝑦)βˆ’4𝑦=1114βˆ’8π‘¦βˆ’4𝑦=11βˆ’12𝑦=βˆ’3𝑦=14.

To find the value of π‘₯, we substitute 𝑦=14 into either of the starting equations: 2π‘₯βˆ’4𝑦=112π‘₯βˆ’4Γ—14=112π‘₯=12π‘₯=6.

As always, the final thing to do is to check whether our solution π‘₯=6, 𝑦=14 is correct when substituted into the other equation: 3π‘₯+12𝑦=213Γ—6+12Γ—14=2118+3=2121=21.βœ“

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 2π‘₯+2𝑦+3=0,4(π‘₯βˆ’2𝑦)=2(4+𝑦).

Answer

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 2𝑦 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 2𝑦. First, we rearrange the first equation to make 2𝑦 the subject: 2π‘₯+2𝑦+3=02𝑦=βˆ’2π‘₯βˆ’3, and then we expand the right-hand bracket in the second equation: 4(π‘₯βˆ’2𝑦)=2(4+𝑦)4(π‘₯βˆ’2𝑦)=8+2𝑦.

We are now ready to substitute the expression βˆ’2π‘₯βˆ’3 for 2𝑦 on both sides of the equation 4(π‘₯βˆ’2𝑦)=8+2𝑦: 4(π‘₯βˆ’2𝑦)=8+2𝑦4(π‘₯βˆ’(βˆ’2π‘₯βˆ’3))=8+(βˆ’2π‘₯βˆ’3).(2𝑦)substitutingfor

Expanding and simplifying, we get 4(π‘₯βˆ’(βˆ’2π‘₯βˆ’3))=8+(βˆ’2π‘₯βˆ’3)4π‘₯βˆ’4(βˆ’2π‘₯βˆ’3)=8βˆ’3βˆ’2π‘₯4π‘₯+8π‘₯+12=5βˆ’2π‘₯.

Collecting terms in π‘₯ on the left, we get 4π‘₯+8π‘₯+12=5βˆ’2π‘₯4π‘₯+8π‘₯+2π‘₯=5βˆ’1214π‘₯=βˆ’7π‘₯=βˆ’12.

We now substitute π‘₯=βˆ’12 into the first equation to solve for 𝑦: 2π‘₯+2𝑦+3=02Γ—ο€Όβˆ’12+2𝑦+3=0βˆ’1+2𝑦+3=02𝑦+2=0𝑦=βˆ’1.

So, the method of substitution yields the solution π‘₯=βˆ’12, 𝑦=βˆ’1. We could at this point substitute π‘₯=βˆ’12, 𝑦=βˆ’1 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 2π‘₯+2𝑦+3=0,4(π‘₯βˆ’2𝑦)=2(4+𝑦) 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: 2π‘₯+2𝑦+3=02π‘₯+2𝑦=βˆ’3.

Now, for the second equation, first, we will expand all brackets and simplify: 4(π‘₯βˆ’2𝑦)=2(4+𝑦)4π‘₯βˆ’8𝑦=8+2𝑦.

Then, we will collect the variable terms on the left-hand side: 4π‘₯βˆ’8𝑦=8+2𝑦4π‘₯βˆ’8π‘¦βˆ’2𝑦=84π‘₯βˆ’10𝑦=8.

We now have the rearranged equations 2π‘₯+2𝑦=βˆ’34π‘₯βˆ’10𝑦=8.

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, 4π‘₯+4𝑦=βˆ’6, and subtract this from 4π‘₯βˆ’10𝑦=8 to eliminate π‘₯ and obtain 𝑦: 4π‘₯βˆ’4π‘₯βˆ’10π‘¦βˆ’4𝑦=8βˆ’(βˆ’6)βˆ’14𝑦=14𝑦=βˆ’1.

We can now substitute 𝑦=βˆ’1 into the first equation to solve for π‘₯: 2π‘₯+2𝑦+3=02π‘₯+2Γ—(βˆ’1)+3=02π‘₯+1=0π‘₯=βˆ’12.

The two methods agree, giving us a solution of π‘₯=βˆ’12, 𝑦=βˆ’1.

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 π‘Žπ‘₯+𝑏𝑦=12,π‘₯βˆ’2𝑏𝑦=βˆ’10, where π‘Ž and 𝑏 are constants.

Given that π‘₯=2, 𝑦=3 is a solution to this pair of simultaneous equations, find the values of π‘Ž and 𝑏.

Answer

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 π‘₯=2, 𝑦=3 solve the equations π‘Žπ‘₯+𝑏𝑦=12,π‘₯βˆ’2𝑏𝑦=βˆ’10, 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: π‘Žπ‘₯+𝑏𝑦=12π‘ŽΓ—2+𝑏×3=122π‘Ž+3𝑏=12, and do the same in the second equation: π‘₯βˆ’2𝑏𝑦=βˆ’102βˆ’2×𝑏×3=βˆ’102βˆ’6𝑏=βˆ’10βˆ’6𝑏=βˆ’12𝑏=2.

We can now substitute 𝑏=2 into the equation 2π‘Ž+3𝑏=12 that we got from the first equation: 2π‘Ž+3𝑏=122π‘Ž+3Γ—2=122π‘Ž=6π‘Ž=3.

We have found the coefficients: π‘Ž=3 and 𝑏=2.

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.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.