Chapter 8 ยท Systems of linear equations

Solving Systems by Inspection and Substitution

Learn to spot how many solutions a system has by looking at its structure, then find exact solutions by substituting one equation into the other.

16 min read

You have already solved systems by graphing: draw both lines and find where they cross. But a point read from a graph is only an estimate until you check it in both equations. In this lesson you will use algebra, which gives exact answers.

Here, a system of equations is a pair of linear equations (equations whose graphs are lines) in the same two variables, xx and yy. Each variable stands for a real number. A solution of the system is an ordered pair (x,y)(x, y) that makes both equations true at the same time.

You will learn two tools. Inspection means looking closely at how the two equations are built before you calculate anything. Substitution means replacing a variable with a number or an expression that equals it.

Start with inspection. Sometimes the way a system is built tells you how many solutions it has before you do any solving steps. Look at this system:

2x+5y=72x+5y=10\begin{aligned} 2x + 5y &= 7 \\ 2x + 5y &= 10 \end{aligned}

Pick any pair of numbers for xx and yy. The expression 2x+5y2x + 5y then has exactly one value. That one value cannot be both 77 and 1010. So no pair (x,y)(x, y) makes both equations true, and the system has no solution. You found that out without a single solving step.

This matches what you know from graphing: a system with no solution is a pair of parallel lines, which never cross. The table shows this pattern and two more that you can spot the same way.

Three patterns you can spot by inspection
What you noticeExampleWhyNumber of solutions
The same expression is set equal to two different numbers
2x+5y=72x + 5y = 7 and 2x+5y=102x + 5y = 10
For any one pair (x,y)(x, y), the expression has only one value.
None
One equation is the other with both sides multiplied by the same nonzero number
x+2y=4x + 2y = 4 and 3x+6y=123x + 6y = 12
Both equations have exactly the same solutions: every point on one line.
Infinitely many
Both equations have the form y=mx+by = mx + b, and the slopes mm are different
y=3xโˆ’2y = 3x - 2 and y=โˆ’x+6y = -x + 6
Two lines with different slopes cross at exactly one point.
Exactly one

Worked example

Inspection: find a hidden match

Decide by inspection how many solutions this system has: 4x+2y=104x + 2y = 10 and 2x+y=32x + y = 3.

  1. Compare the left sides. The first left side is exactly twice the second left side.

    4x+2y=2(2x+y)4x + 2y = 2(2x + y)
  2. Multiply both sides of the second equation by 2. Multiplying both sides by the same nonzero number gives an equation with exactly the same solutions.

    2(2x+y)=2(3)so4x+2y=62(2x + y) = 2(3) \quad\text{so}\quad 4x + 2y = 6
  3. Now the same expression is set equal to two different numbers. For any one pair of values for x and y, the expression has only one value, so it cannot equal both 10 and 6.

    4x+2y=10and4x+2y=64x + 2y = 10 \quad\text{and}\quad 4x + 2y = 6

Answer

The system has no solution, because 4x+2y4x + 2y cannot equal both 1010 and 66 for the same pair (x,y)(x, y).

Inspection can also hand you a solution. Look at the system y=3y = 3 and x+y=8x + y = 8. The first equation says yy is 33, so put 33 in place of yy in the second equation: x+3=8x + 3 = 8. Subtract 33 from both sides, which keeps the same solutions, to get x=5x = 5. Check: 3=33 = 3 and 5+3=85 + 3 = 8 are both true, so the solution is (5,3)(5, 3).

Putting 33 in place of yy is a substitution. It is allowed because any solution must make the first equation true, and then yy and 33 are the same number.

The same idea works when a variable equals an expression. If one equation says y=2x+1y = 2x + 1, then for any solution, yy and 2x+12x + 1 are the same number. So you may replace yy with 2x+12x + 1 in the other equation.

Key concept

Use one equation inside the other

A solution of a system must make both equations true at once. So what one equation tells you about xx and yy must also hold in the other.

  • Inspection: compare the two equations and ask whether both can be true for the same pair (x,y)(x, y).
  • Substitution: when one equation says a variable equals an expression, replace that variable in the other equation with that expression. This leaves one equation with one variable. Solve it by doing the same valid operation to both sides, never dividing by zero.

Always check your pair in both original equations.

Worked example

Substitution when a variable is already alone

Solve the system y=2x+1y = 2x + 1 and 3x+y=113x + y = 11.

  1. The first equation says that, for any solution, y and 2x + 1 are the same number. So replace y in the second equation with that expression, written in parentheses.

    3x+(2x+1)=113x + (2x + 1) = 11
  2. The parentheses follow a plus sign, so you can remove them without changing any signs. Then combine the like terms 3x and 2x. The new left side equals the old one for every real number x, so the solutions stay the same.

    3x+2x+1=11so5x+1=113x + 2x + 1 = 11 \quad\text{so}\quad 5x + 1 = 11
  3. Subtract 1 from both sides. Subtracting the same number from both sides keeps the same solutions.

    5x+1โˆ’1=11โˆ’1so5x=105x + 1 - 1 = 11 - 1 \quad\text{so}\quad 5x = 10
  4. Divide both sides by 5. Dividing both sides by the same nonzero number keeps the same solutions, and 5 is not zero.

    5x5=105sox=2\frac{5x}{5} = \frac{10}{5} \quad\text{so}\quad x = 2
  5. A solution needs both numbers. The first equation must be true for the solution, so put 2 in place of x there to find y.

    y=2(2)+1=4+1=5y = 2(2) + 1 = 4 + 1 = 5
  6. Check the pair in both original equations, because a solution must make both true. Both statements are true.

    5=2(2)+1and3(2)+5=6+5=115 = 2(2) + 1 \quad\text{and}\quad 3(2) + 5 = 6 + 5 = 11

Answer

The solution is (2,5)(2, 5), because x=2x = 2 and y=5y = 5 make both equations true.

Worked example

Substitution when no variable is alone yet

Solve the system x+y=5x + y = 5 and 2xโˆ’y=22x - y = 2.

  1. First isolate a variable, which means get it alone on one side. Subtract x from both sides of the first equation. Subtracting the same quantity from both sides keeps the same solutions.

    x+yโˆ’x=5โˆ’xsoy=5โˆ’xx + y - x = 5 - x \quad\text{so}\quad y = 5 - x
  2. Replace y in the other equation with this expression. Keep the parentheses, because the whole expression is being subtracted.

    2xโˆ’(5โˆ’x)=22x - (5 - x) = 2
  3. Subtracting the group means subtracting 5 and subtracting negative x, and subtracting negative x is the same as adding x. Then combine like terms. Each new left side equals the old one for every real number x, so the solutions stay the same.

    2xโˆ’5+x=2so3xโˆ’5=22x - 5 + x = 2 \quad\text{so}\quad 3x - 5 = 2
  4. Add 5 to both sides, then divide both sides by 3. Adding the same number to both sides keeps the same solutions, and so does dividing by 3, because 3 is not zero.

    3xโˆ’5+5=2+5so3x=7sox=733x - 5 + 5 = 2 + 5 \quad\text{so}\quad 3x = 7 \quad\text{so}\quad x = \frac{7}{3}
  5. Put this value in place of x in the equation from the first step to find y. Write 5 as fifteen thirds so the two fractions have the same denominator.

    y=5โˆ’73=153โˆ’73=83y = 5 - \frac{7}{3} = \frac{15}{3} - \frac{7}{3} = \frac{8}{3}
  6. Check the pair in both original equations. Both statements are true.

    73+83=153=5and2โ‹…73โˆ’83=143โˆ’83=63=2\frac{7}{3} + \frac{8}{3} = \frac{15}{3} = 5 \quad\text{and}\quad 2\cdot\frac{7}{3} - \frac{8}{3} = \frac{14}{3} - \frac{8}{3} = \frac{6}{3} = 2

Answer

The solution is (73,83)\left(\tfrac{7}{3}, \tfrac{8}{3}\right). These values are exact; a graph would only show the lines crossing near (2.3,2.7)(2.3, 2.7).

Sometimes the variable disappears after you substitute into the other equation. What is left still tells you the answer.

Take x+2y=4x + 2y = 4 and 3x+6y=123x + 6y = 12. Subtract 2y2y from both sides of the first equation: x=4โˆ’2yx = 4 - 2y. Substitute into the second: 3(4โˆ’2y)+6y=123(4 - 2y) + 6y = 12. Distribute to get 12โˆ’6y+6y=1212 - 6y + 6y = 12, which simplifies to 12=1212 = 12.

The equation 3(4โˆ’2y)+6y=123(4 - 2y) + 6y = 12 is an identity: an equation that is true for every permitted value of its variable, which here is every real number yy. So every yy gives a solution, with x=4โˆ’2yx = 4 - 2y. The system has infinitely many solutions: all the points on the line x+2y=4x + 2y = 4. For example, y=1y = 1 gives x=2x = 2, and (2,1)(2, 1) makes both equations true: 2+2(1)=42 + 2(1) = 4 and 3(2)+6(1)=123(2) + 6(1) = 12.

Now take y=3x+1y = 3x + 1 and y=3x+4y = 3x + 4. Substitute the first into the second: 3x+1=3x+43x + 1 = 3x + 4. Subtract 3x3x from both sides: 1=41 = 4, which is false.

The equation 3x+1=3x+43x + 1 = 3x + 4 is a contradiction: an equation that is true for no value of its variable. So the system has no solution.

Inspection agrees with both results. The first system matches the second row of the table. In this second system, the lines have the same slope but different yy-intercepts, so they are parallel and never cross.

Takeaway: A solution must make both equations true, so you can use one equation inside the other. Inspect first: the way the system is built may show that it has no solution, exactly one, or infinitely many. Then substitute to find the exact pair: get one variable alone, replace it in the other equation, and solve by doing the same valid operation to both sides, never dividing by zero. Find the second variable, then check the pair in both original equations. If the variable disappears after you substitute into the other equation, an identity means infinitely many solutions and a contradiction means none.

Next, you will learn another algebraic method for solving systems, called elimination.