Two-Variable Linear Equations
A two-variable linear equation, like 2x + y = 5, has two variables and makes a straight line when you graph it. Its solutions are ordered pairs (x, y) that make the equation true, such as (1, 3). To graph it, find a few solutions, plot them, and draw a line through them.
Before this lesson: You should know how to plot points on the coordinate plane, solve two-step equations, and solve literal equations for one variable.
Extra practice: The Algebra 1 Unit 4 Practice Pack (Part 1) has printable problems, answer keys and a cheat sheet for this unit.
What Is a Two-Variable Linear Equation?
An equation like x + 3 = 7 has one variable and one answer. An equation like x + y = 7 has two variables. Now many pairs of numbers work: 3 and 4, 5 and 2, 10 and -3, and so on.
Each pair that works is a solution. We write it as an ordered pair (x, y), with x first. A two-variable linear equation has infinitely many solutions.
When you plot all the solutions, they line up in a straight line. That is why the equation is called linear. Every point on the line is a solution, and every solution is a point on the line.
The Rule: How to Find and Check Solutions
A two-variable linear equation can be written as Ax + By = C, where A, B and C are numbers and A and B are not both 0. The variables have no exponents, are not multiplied together, and are not in a denominator.
To check an ordered pair
- Put the first number in for x and the second number in for y.
- Simplify both sides.
- If the two sides are equal, the pair is a solution. If not, it is not.
To find a solution and graph the line
- Pick a value for x. Small numbers like 0, 1 and 2 are easiest.
- Put it in the equation and solve for y.
- Repeat to get at least three points. Make a table.
- Plot the points. Draw a straight line through them, with arrows on both ends.
Use three points, not two. If the three points don’t line up, one of them has a mistake.
Two-Variable Linear Equations Examples
Example 1: Check an ordered pair
Is (3, -1) a solution of 2x + y = 5? Is (3, 3)?
2(3) + (-1)
Step 1. For (3, -1), substitute x = 3 and y = -1 into the left side.
6 - 1 = 5
Step 2. Multiply, then add. Adding a negative is the same as subtracting. (See adding and subtracting integers.)
Step 3. Compare with the right side. The left side is 5, and so is the right side, so the pair works.
2(3) + 3
Step 4. For (3, 3), substitute x = 3 and y = 3.
6 + 3 = 9
Step 5. Multiply, then add.
Step 6. Compare with the right side. 9 is not 5, so the pair does not work.
Answer: (3, -1) is a solution. (3, 3) is not. In the graph above, (3, -1) is on the line and (3, 3) is off it.
Example 2: Find a missing value
Find the solution of 3x - 2y = 6 that has x = 4.
3(4) - 2y = 6
Step 1. Substitute x = 4.
12 - 2y = 6
Step 2. Multiply.
-2y = -6
Step 3. Subtract 12 from both sides.
y = 3
Step 4. Divide both sides by -2. A negative divided by a negative is positive. (See multiplying and dividing integers.)
Answer: (4, 3).
Check: 3(4) - 2(3) = 12 - 6 = 6. It works.
Example 3: Make a table and graph
Make a table of values for 2x + y = 5 and graph it.
y = -2x + 5
Step 1. Solve for y, as in literal equations. Subtract 2x from both sides.
Step 2. Pick x-values: 0, 1, 2 and 3. Substitute each one and find y.
| x | y = -2x + 5 | (x, y) |
|---|---|---|
| 0 | -2(0) + 5 = 5 | (0, 5) |
| 1 | -2(1) + 5 = 3 | (1, 3) |
| 2 | -2(2) + 5 = 1 | (2, 1) |
| 3 | -2(3) + 5 = -1 | (3, -1) |
Step 3. Plot the four points on a coordinate grid.
Step 4. Draw a straight line through them, with arrows on both ends.
Answer: The line through the four points is the blue line in the graph above.
Example 4: Solve for y first
Make a table for 4x + 2y = 8 using x = -1, 0, 1 and 2.
2y = -4x + 8
Step 1. Subtract 4x from both sides.
y = -2x + 4
Step 2. Divide every term by 2.
y = -2(-1) + 4 = 2 + 4 = 6
Step 3. Substitute x = -1. Use parentheses for the negative.
y = -2(0) + 4 = 0 + 4 = 4
Step 4. Substitute x = 0.
y = -2(1) + 4 = -2 + 4 = 2
Step 5. Substitute x = 1.
y = -2(2) + 4 = -4 + 4 = 0
Step 6. Substitute x = 2.
Step 7. Put the results in a table.
| x | -1 | 0 | 1 | 2 |
|---|---|---|---|---|
| y | 6 | 4 | 2 | 0 |
Answer: The solutions are (-1, 6), (0, 4), (1, 2) and (2, 0).
Example 5: Word problem
A school play sells adult tickets for $4 and student tickets for $2. A family spends exactly $20. Write an equation, and list every possible number of adult tickets a and student tickets s.
4a + 2s = 20
Step 1. Write the equation. Each adult ticket adds $4, and each student ticket adds $2.
4(1) + 2s = 20
Step 2. Tickets come in whole numbers, so try a = 0, 1, 2, and so on. For a = 1, substitute 1.
4 + 2s = 20
Step 3. Multiply.
2s = 16
Step 4. Subtract 4 from both sides.
s = 8
Step 5. Divide both sides by 2.
Step 6. Repeat for the other values of a. Stop at a = 5, because 5 adult tickets cost all $20.
| a (adult) | 0 | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|---|
| s (student) | 10 | 8 | 6 | 4 | 2 | 0 |
Answer: The family could buy 0 and 10, 1 and 8, 2 and 6, 3 and 4, 4 and 2, or 5 and 0 (adult and student tickets).
Check: Here only whole-number points make sense, so the graph is a set of dots, not a full line. This is the domain idea from Unit 3.
Common Mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Swapping x and y | Checking (3, -1) with x = -1 and y = 3 | The first number is always x. |
| Dropping a negative sign | -2(-1) + 5 = 3 | Use parentheses: -2(-1) + 5 = 2 + 5 = 7. |
| Thinking there is only one answer | Stopping after finding (1, 3) | A linear equation in two variables has infinitely many solutions. |
| Graphing from only two points | Two points with one mistake still make a line, just the wrong one | Plot a third point to check. |
| Stopping the line at the points | Drawing a segment from (0, 5) to (3, −1) | The solutions go on forever. Draw arrows on both ends. |
Linear or Not Linear?
An equation is linear when each variable has an exponent of 1 and no variables are multiplied or divided by each other.
| Equation | Linear? | Why |
|---|---|---|
| 3x + 2y = 7 | Yes | Both variables have exponent 1 |
| y = \frac{1}{2}x - 3 | Yes | Fractions as coefficients are fine |
| x = 4 | Yes | A vertical line (it is not a function) |
| y = x^2 | No | x is squared |
| xy = 6 | No | The variables are multiplied |
| y = \frac{4}{x} | No | x is in a denominator |
Next you will learn faster ways to graph lines, using x-intercepts and y-intercepts and slope-intercept form.
Practice Problems
- Is (2, 1) a solution of x + 3y = 5?
- Is (-1, 4) a solution of 3x + y = 2?
- Find y so that (3, y) is a solution of 2x + y = 9.
- Find x so that (x, -2) is a solution of x - 4y = 10.
- Find the solution of 5x + 2y = 12 that has x = 4.
- Make a table for y = 3x - 1 using x = -1, 0, 1 and 2.
- Solve 6x + 3y = 9 for y. Then find the solution with x = 2.
- Which are linear? y = 5x - 2, y = x^2 + 1, 2x - 7y = 0, xy = 12
- Find k if (k, 4) is a solution of 2x - y = 6.
- Pens cost $3 and notebooks cost $5. You spend exactly $30. Write an equation and list every whole-number solution.
Show answers
1.
2 + 3(1)
Substitute x = 2 and y = 1.
2 + 3 = 5
Multiply, then add.
The left side equals 5, the right side
Yes, it is a solution.
2.
3(-1) + 4
Substitute x = −1 and y = 4.
-3 + 4 = 1
Multiply, then add.
The left side is 1, but the right side is 2
No, it is not a solution.
3.
2(3) + y = 9
Substitute x = 3.
6 + y = 9
Multiply.
y = 3
Subtract 6 from both sides.
The pair is (3, 3).
4.
x - 4(-2) = 10
Substitute y = −2.
x + 8 = 10
Multiply. Subtracting −8 is adding 8.
x = 2
Subtract 8 from both sides.
The pair is (2, -2).
5.
5(4) + 2y = 12
Substitute x = 4.
20 + 2y = 12
Multiply.
2y = -8
Subtract 20 from both sides.
y = -4
Divide both sides by 2.
The solution is (4, -4).
6.
y = 3(-1) - 1 = -3 - 1 = -4
Substitute x = −1.
y = 3(0) - 1 = 0 - 1 = -1
Substitute x = 0.
y = 3(1) - 1 = 3 - 1 = 2
Substitute x = 1.
y = 3(2) - 1 = 6 - 1 = 5
Substitute x = 2.
The pairs are (-1, -4), (0, -1), (1, 2) and (2, 5).
7.
3y = -6x + 9
Subtract 6x from both sides.
y = -2x + 3
Divide every term by 3.
y = -2(2) + 3 = -4 + 3 = -1
Substitute x = 2.
The solution is (2, -1).
8.
y = 5x - 2
the variables have exponent 1 and are not multiplied together, so it is linear
y = x^2 + 1
it has a square, so it is not linear
2x - 7y = 0
it fits the form Ax + By = C, so it is linear
xy = 12
it multiplies the variables, so it is not linear
9.
2k - 4 = 6
Substitute x = k and y = 4.
2k = 10
Add 4 to both sides.
k = 5
Divide both sides by 2.
10.
3p + 5n = 30
Write the equation, with p pens and n notebooks.
3p = 30, \text{ so } p = 10Try n = 0.
Try n = 1: 3p = 25, which is not a whole number. Try n = 2: 3p = 20, which is not a whole number
3p + 15 = 30, \text{ so } 3p = 15 \text{ and } p = 5Try n = 3.
3p = 0, \text{ so } p = 0Try n = 4: 3p = 10, not whole. Try n = 5: 3p = 5, not whole. Try n = 6.
The solutions (p, n) are (10, 0), (5, 3) and (0, 6).
Want more practice? The Algebra 1 Unit 4 Practice Pack (Part 1) has 39 pages of problems on this and the other lessons in the unit, with step-by-step answers and a cheat sheet.
Two-Variable Linear Equations FAQ
What is a linear equation in two variables?
It is an equation like Ax + By = C with two variables, each with exponent 1. Its graph is a straight line.
How many solutions does a two-variable linear equation have?
Infinitely many. Every point on its line is a solution.
How do you check if an ordered pair is a solution?
Put the x-value and y-value into the equation. If both sides come out equal, the pair is a solution.
How do you graph a linear equation in two variables?
Find at least three solutions with a table, plot them, and draw a straight line through them. Solving for y first makes the table easier.
Summary
- A two-variable linear equation, like 2x + y = 5, has a straight-line graph.
- A solution is an ordered pair (x, y) that makes the equation true.
- There are infinitely many solutions, one for every point on the line.
- To find solutions, pick x-values and solve for y. A table keeps them organized.
- Plot at least three points and draw the line with arrows.
Previous lesson: Key Features of Functions
Next lesson: X-Intercepts and Y-Intercepts
Back to the Algebra 1 Index