Algebra 1

How to solve systems of equations

A system of equations is two equations that share the same variables. Its solution is the pair (x,y)(x, y) that makes both equations true, which is where their lines cross. You can solve by graphing, by substitution (solve one equation for a variable and plug it into the other), or by elimination (add or subtract the equations so one variable cancels). Parallel lines mean no solution.

Updated

The key idea

One equation with two variables has endless solutions: every point on its line. A second equation adds a second line. The point where both lines cross is the only pair that works for both, so that is the solution of the system.

{y=2x−13x+2y=12solution: (2,3)\begin{cases} y = 2x - 1 \\ 3x + 2y = 12 \end{cases} \qquad \text{solution: } (2, 3)
Pick the method that fits the setup
MethodUse it whenWhat you do
Substitutionone variable is already alone, like y=2x−1y = 2x - 1plug that expression into the other equation
Eliminationboth equations look like Ax+By=CAx + By = Cadd or subtract so x or y cancels, multiplying first if needed
Graphingyou want to see the answer or check itgraph both lines and read the crossing point
How many solutions?
The lines areSlopesSolutionsWhat the algebra shows
crossingdifferentexactly onea single value for x and for y
parallelsame, different interceptsnonea false statement like 0=60 = 6
the same linesame, same interceptinfinitely manya true statement like 0=00 = 0

Worked examples

Example 1: substitution

Problem Solve the system y=2x−1y = 2x - 1 and 3x+2y=123x + 2y = 12.

  1. The first equation says y is the same as 2x−12x - 1. Replace y in the second equation with 2x−12x - 1, in parentheses.
    3x+2(2x−1)=123x + 2(2x - 1) = 12
  2. Distribute and combine like terms.
    7x−2=127x - 2 = 12
  3. Add 2, then divide by 7.
    x=2x = 2
  4. Put x=2x = 2 into the equation that is already solved for y.
    y=2(2)−1=3y = 2(2) - 1 = 3
  5. Check in the other equation: 3(2)+2(3)=123(2) + 2(3) = 12. It works.

Answer (2,3)(2, 3)

Example 2: elimination by adding

Problem Solve the system 4x+3y=64x + 3y = 6 and 2x−3y=122x - 3y = 12.

  1. The y terms are 3y3y and −3y-3y. Adding the equations makes them cancel.
    (4x+3y)+(2x−3y)=6+12(4x + 3y) + (2x - 3y) = 6 + 12
  2. Simplify.
    6x=186x = 18
  3. Divide by 6.
    x=3x = 3
  4. Put x=3x = 3 into either original equation. The first one gives:
    4(3)+3y=64(3) + 3y = 6
  5. Subtract 12, then divide by 3.
    y=−2y = -2

Answer (3,−2)(3, -2)

Example 3: elimination after multiplying both equations

Problem Solve the system 3x+4y=103x + 4y = 10 and 5x−6y=45x - 6y = 4.

  1. Nothing cancels yet. The y coefficients are 4 and −6-6, and both go into 12. Multiply the first equation by 3 and the second by 2, every term.
    9x+12y=309x + 12y = 30
  2. The second equation times 2:
    10x−12y=810x - 12y = 8
  3. Add the two new equations. The y terms cancel.
    19x=3819x = 38
  4. Divide by 19.
    x=2x = 2
  5. Put x=2x = 2 into 3x+4y=103x + 4y = 10.
    6+4y=106 + 4y = 10
  6. Solve for y, then check in the second equation: 5(2)−6(1)=45(2) - 6(1) = 4.
    y=1y = 1

Answer (2,1)(2, 1)

Example 4 (test-hard): a mixture word problem

Problem A coffee shop mixes a $9 per pound coffee with a $14 per pound coffee to make 20 pounds of a blend worth $11 per pound. How many pounds of each does it use?

  1. Let cc be pounds of the $9 coffee and pp be pounds of the $14 coffee. The weights add to 20, and the values add to 20×11=22020 \times 11 = 220 dollars. Write both equations: c+p=20c + p = 20 and 9c+14p=2209c + 14p = 220.
  2. Multiply the first equation by 9 so the c terms match: 9c+9p=1809c + 9p = 180. Subtract it from the second equation.
    (9c+14p)−(9c+9p)=220−180(9c + 14p) - (9c + 9p) = 220 - 180
  3. Simplify.
    5p=405p = 40
  4. Divide by 5.
    p=8p = 8
  5. Then c=20−8=12c = 20 - 8 = 12. Check the value: 9(12)+14(8)=108+112=2209(12) + 14(8) = 108 + 112 = 220.

Answer 12 pounds of the $9 coffee and 8 pounds of the $14 coffee.

Common mistakes

  • Plugging back into the equation you just used. In substitution, putting x back into the rearranged equation you substituted from only gives 0=00 = 0. Fix: use the other equation, or the one already solved for y.
  • Scaling only part of an equation. When you multiply 3x+4y=103x + 4y = 10 by 3, the 10 becomes 30 too.
  • Sign slips when subtracting equations. Subtracting 9c+9p9c + 9p means subtracting both terms. Fix: put the whole equation in parentheses, or multiply it by −1-1 and add instead.
  • Stopping after one variable. The solution of a system is an ordered pair. Find both values and write (x,y)(x, y).
  • Mixing up 0 = 0 and 0 = 6. A true statement means the same line (infinitely many solutions). A false one means parallel lines (no solution).

Quick methods

Practice

5 practice questions

  1. Solve the system y=x+4y = x + 4 and 2x+y=102x + y = 10.

    1. (2,6)(2, 6)
    2. (6,2)(6, 2)
    3. (3,7)(3, 7)
    4. (2,4)(2, 4)
    Show answer

    Answer: (2,6)(2, 6)

    Substitute: 2x+(x+4)=102x + (x + 4) = 10, so 3x=63x = 6 and x=2x = 2. Then y=2+4=6y = 2 + 4 = 6. The pair (6,2)(6, 2) has the right numbers in the wrong order. (3,7)(3, 7) fits the first equation but not the second.

  2. Solve the system 5x+2y=15x + 2y = 1 and 3x−2y=153x - 2y = 15.

    1. (2,−92)\left(2, -\frac{9}{2}\right)
    2. (2,92)\left(2, \frac{9}{2}\right)
    3. (−2,112)\left(-2, \frac{11}{2}\right)
    4. (−92,2)\left(-\frac{9}{2}, 2\right)
    Show answer

    Answer: (2,−92)\left(2, -\frac{9}{2}\right)

    Add the equations: 8x=168x = 16, so x=2x = 2. Then 10+2y=110 + 2y = 1, so 2y=−92y = -9 and y=−92y = -\frac{9}{2}. The choice with +92+\frac{9}{2} loses the sign when subtracting 10.

  3. How many solutions does the system y=3x+2y = 3x + 2 and 6x−2y=86x - 2y = 8 have?

    1. None
    2. Exactly one
    3. Exactly two
    4. Infinitely many
    Show answer

    Answer: None

    Solve the second for y: y=3x−4y = 3x - 4. Both lines have slope 3 but different intercepts (2 and −4-4), so they are parallel and never cross. Two lines can never cross exactly twice.

  4. For what value of kk does the system 2x+5y=72x + 5y = 7 and 4x+ky=144x + ky = 14 have infinitely many solutions?

    1. 55
    2. 77
    3. 1010
    4. 1414
    Show answer

    Answer: 1010

    Infinitely many solutions means the second equation is the first one multiplied by a number. 4x4x and 14 are both 2 times 2x2x and 7, so kyky must be 2 times 5y5y: k=10k = 10. With k=5k = 5 the lines just cross once.

  5. A farm has chickens and goats. Together they have 30 heads and 84 legs. How many goats are there?

    1. 12
    2. 18
    3. 21
    4. 24
    Show answer

    Answer: 12

    Let cc be chickens and gg be goats: c+g=30c + g = 30 and 2c+4g=842c + 4g = 84. Double the first: 2c+2g=602c + 2g = 60. Subtract: 2g=242g = 24, so g=12g = 12. 18 is the number of chickens, and 24 forgets to divide by 2.

Frequently asked questions

Which method should I use to solve a system?

Use substitution when one equation already has x or y alone. Use elimination when both equations are in Ax+By=CAx + By = C form, especially if a variable already has matching or opposite coefficients. Graphing is best for checking, or when the question asks what the system looks like.

What does the solution of a system mean on a graph?

Each equation is a line. The solution is the point where the two lines cross, because that point is on both lines, so its x and y make both equations true. Parallel lines never cross, so they have no solution.

How can I tell if a system has no solution or infinitely many?

Solve it and look at the end. If the variables cancel and you get something false, like 0=60 = 6, there is no solution. If you get something true, like 0=00 = 0, the equations are the same line and there are infinitely many solutions.

Do I always have to find both x and y?

For a full solution, yes, because the answer is a point (x,y)(x, y). In a word problem, read the question: if it only asks for the number of goats, you can stop once you have that, but finding the other value is a good way to check.

Try asking Ducky

  • “Should I use substitution or elimination for this system?”
  • “I got (6, 2) but the answer is (2, 6). Did I just mix up the order?”
  • “Help me turn this word problem into two equations.”

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen.