Sub topic 6
Two-Variable Linear Equations and Their Lines
This chapter assumes you can solve one-variable linear equations, plot points on the coordinate plane, and work with fractions and negative numbers. It sets up the idea that a two-variable equation is a line. The next chapters on systems depend on that idea.
Solutions Are Ordered Pairs
A linear equation in two variables has the form ax + by = c, where a, b and c are numbers and a and b are not both zero. Examples are 2x + 3y = 12 and y = 4x - 1.
A solution is an ordered pair (x, y) that makes the equation true. Test a pair by substituting both values. For 2x + 3y = 12:
- (3, 2) works, because 2(3) + 3(2) = 12.
- (0, 4) works, because 0 + 12 = 12.
- (1, 2) fails, because 2 + 6 = 8.
Unlike a one-variable equation, a single two-variable equation has infinitely many solutions. Choose any x, and the equation fixes one matching y. This is why the GRE almost never asks you to "solve" one equation with two unknowns. It asks about a relationship, such as the value of y when x = 5, or whether a point lies on a line.
The Graph Is a Straight Line
Plot every solution of a linear equation and the points fall on one straight line. Two facts follow:
- Every point on the line is a solution.
- Every point off the line is not a solution.
A line is determined by any two of its points. To graph an equation, find two solutions, plot them, and draw the line through them. The easiest two points are usually the intercepts.
Intercepts
The x-intercept is the point where the line crosses the x-axis. There y = 0, so set y = 0 and solve for x. The y-intercept is the point where the line crosses the y-axis. There x = 0, so set x = 0 and solve for y.
Take 3x - 2y = 8:
- Set x = 0: -2y = 8, so y = -4. The y-intercept is (0, -4).
- Set y = 0: 3x = 8, so x = 8/3. The x-intercept is (8/3, 0).
Report the intercept as a coordinate pair, or as a single number if the question asks for "the y-intercept." The y-intercept as a number is -4.
Slope
The slope measures steepness. It is the change in y divided by the change in x between any two points on the line:
slope = (y2 - y1) / (x2 - x1)
Often this is described as "rise over run." Read the sign this way:
- Positive slope: the line rises from left to right.
- Negative slope: the line falls from left to right.
- Zero slope: the line is horizontal.
- Undefined slope: the line is vertical, because the run is 0 and you cannot divide by zero.
Slope is the same between any two points on a line. That property is what makes a line straight.
Three Forms of a Line
The same line can be written in different forms. Each form makes a different piece of information easy to read.
| Form | Shape | What it shows directly |
|---|---|---|
| Slope-intercept | y = mx + b | Slope m and y-intercept b |
| Point-slope | y - y1 = m(x - x1) | Slope m and one known point (x1, y1) |
| Standard | ax + by = c | Intercepts, after setting a variable to 0 |
To move from standard form to slope-intercept form, solve for y. Using 3x - 2y = 8:
3x - 2y = 8
-2y = -3x + 8
y = (3/2)x - 4The slope is 3/2 and the y-intercept is -4, which matches the intercept found above. In general, ax + by = c has slope -a/b and y-intercept c/b (when b is not 0).
A frequent error is dividing only part of the equation by -2. Every term, including the constant, must be divided: -3x/-2 gives 3x/2, and 8/-2 gives -4.
Building an Equation from Information
Two cases come up often.
Slope and y-intercept are given. Write y = mx + b directly. A line with slope -2 and y-intercept 7 is y = -2x + 7.
Two points are given. Find the slope, then use point-slope form with either point. For (1, 5) and (4, -1):
slope = (-1 - 5) / (4 - 1) = -6/3 = -2
y - 5 = -2(x - 1)
y - 5 = -2x + 2
y = -2x + 7Check with the second point: -2(4) + 7 = -1, which matches. In standard form this line is 2x + y = 7.
The next diagram shows how to choose a route depending on what you are given.
Special Lines
Two kinds of lines look different from the usual pattern.
- A horizontal line has the form y = k. Every point has the same y-value, so the slope is 0. For example, y = 3 passes through (-5, 3) and (10, 3).
- A vertical line has the form x = k. Every point has the same x-value, so the slope is undefined. The line x = 3 passes through (3, -2) and (3, 8).
Do not mix these up. The equation y = 3 is horizontal, even though "3" might tempt you to think of the x-axis.
Parallel and Perpendicular Lines
Slopes also describe how two lines relate:
- Parallel lines have equal slopes and never meet (unless they are the same line).
- Perpendicular lines meet at a right angle. Their slopes are negative reciprocals, so the product of the slopes is -1.
The line y = 2x + 1 has slope 2. A line perpendicular to it has slope -1/2. A line parallel to it has slope 2, such as y = 2x - 9.
This is the geometric basis for the "no solution" case of a system, covered later. Two parallel distinct lines never share a point, so no pair (x, y) satisfies both equations.
Checking and Using Points
Many GRE questions reduce to one of two checks.
Is a point on the line? Substitute both coordinates. For the line y = -2x + 7, the point (5, -3) gives -2(5) + 7 = -3, so it is on the line. The point (5, 3) gives -3, not 3, so it is not.
Find a missing coordinate. Suppose (k, 2k) lies on 3x + y = 15. Substitute x = k and y = 2k:
3k + 2k = 15
5k = 15
k = 3The point is (3, 6). Check: 3(3) + 6 = 15.
Optional Computational Check
This short program takes an equation ax + by = c and reports its slope and intercepts with exact fractions. It is a way to verify your hand work, not something you need on the test.
from fractions import Fraction
def describe_line(a, b, c):
"""Describe the line a*x + b*y = c.
Returns (slope, y_intercept, x_intercept). A value is None when it is
undefined or does not exist as a single point.
"""
if a == 0 and b == 0:
raise ValueError("a and b cannot both be zero")
slope = Fraction(-a, b) if b != 0 else None # vertical line: no slope
y_int = Fraction(c, b) if b != 0 else None # vertical line may miss y-axis
x_int = Fraction(c, a) if a != 0 else None # horizontal line may miss x-axis
return slope, y_int, x_int
print(describe_line(2, 3, 12)) # (Fraction(-2, 3), Fraction(4, 1), Fraction(6, 1))
print(describe_line(3, -2, 8)) # (Fraction(3, 2), Fraction(-4, 1), Fraction(8, 3))The second result matches the worked example: slope 3/2, y-intercept -4, x-intercept 8/3. For a horizontal line such as y = 3 (a = 0, b = 1, c = 3), the function returns slope 0, y-intercept 3, and no x-intercept. A horizontal line only crosses the x-axis if it is the x-axis itself (c = 0), and in that case every point is an intercept.
Common Errors
- Reversing the order in the slope formula. Subtract y-values and x-values in the same order: (y2 - y1) / (x2 - x1), or (y1 - y2) / (x1 - x2). Mixing the orders flips the sign.
- Reading the slope from standard form without rearranging. In 3x - 2y = 8 the slope is not 3 and not -2. It is 3/2.
- Forgetting that the intercept rule sets the other variable to 0. For the x-intercept, set y = 0, not x = 0.
- Treating one equation in two unknowns as if it has a single answer. It has infinitely many solutions until a second condition is added.
Exercises
Exercise
The line 4x - 3y = 12 is given. Find its slope, its x-intercept, and its y-intercept.
Show answer
Solve for y: -3y = -4x + 12, so y = (4/3)x - 4. The slope is 4/3 and the y-intercept is -4. Setting y = 0 gives 4x = 12, so x = 3, and the x-intercept is 3. Check (3, 0): 12 - 0 = 12.
Exercise
A line passes through (2, -1) and (6, 7). Write its equation in slope-intercept form, then decide whether (10, 15) is on the line.
Show answer
The slope is (7 - (-1)) / (6 - 2) = 8/4 = 2. Point-slope with (2, -1): y + 1 = 2(x - 2), so y = 2x - 5. For (10, 15): 2(10) - 5 = 15, so the point is on the line.
Exercise
The point (k, k + 3) lies on the line 2x + y = 12. What is k?
Show answer
Substitute: 2k + (k + 3) = 12, so 3k = 9 and k = 3. The point is (3, 6), and 2(3) + 6 = 12.