Sub topic 6
Finding x- and y-Intercepts
This chapter assumes you can solve one-variable linear equations, substitute values into a formula, and rearrange an equation to isolate a variable. It also assumes you know slope-intercept form, y = mx + b, from the previous chapter.
What an intercept is
An intercept is a point where a line crosses a coordinate axis.
- The y-intercept is where the line crosses the y-axis. Every point on the y-axis has x = 0, so the y-intercept has the form (0, b).
- The x-intercept is where the line crosses the x-axis. Every point on the x-axis has y = 0, so the x-intercept has the form (a, 0).
Many GRE questions say "the x-intercept is 4" when they mean the point (4, 0). Both phrasings are common, so read the question to see whether it wants a number or a point.
The rule behind all the methods in this chapter is the same: to find one intercept, set the other variable to zero and solve.
Finding intercepts from an equation
From slope-intercept form
For y = mx + b, the y-intercept is already visible. Set x = 0 and you get y = b.
For the x-intercept, set y = 0:
0 = mx + b, so x = -b/m.
For y = 3x - 1, the y-intercept is -1 and the x-intercept is 1/3. This is the line through (1, 2) with slope 3 from the earlier chapter. Substituting the point gives b = 2 - 3(1) = -1.
x1, y1 = 1, 2
m = 3
b = y1 - m * x1 # y-intercept: -1
x_intercept = -b / m # set y = 0: 1/3
print(f"y = {m}x + {b}")
print(x_intercept)From standard form
Standard form is Ax + By = C. Setting each variable to zero in turn gives:
- x-intercept: set y = 0, so Ax = C and x = C/A.
- y-intercept: set x = 0, so By = C and y = C/B.
Take 3x + 4y = 12. With y = 0, x = 4. With x = 0, y = 3. The line passes through (4, 0) and (0, 3).
Standard form is often the faster route on the GRE, because you can find both intercepts without rearranging anything. Two points also fix a line, so the intercepts are enough to graph it.
from fractions import Fraction
def intercepts(a, b, c):
"""Intercepts of the line a*x + b*y = c.
Returns (x_intercept, y_intercept). None means the line never
crosses that axis.
"""
if a == 0 and b == 0:
raise ValueError("a and b cannot both be zero")
x_int = Fraction(c, a) if a != 0 else None
y_int = Fraction(c, b) if b != 0 else None
return x_int, y_int
for a, b, c in [(3, 4, 12), (2, -3, 12), (3, -1, 1), (0, 1, 5), (1, 0, -2), (2, 3, 0)]:
x_int, y_int = intercepts(a, b, c)
print(f"{a}x + {b}y = {c}: x-intercept {x_int}, y-intercept {y_int}")The output shows each case, including the special ones covered below.
A repeatable procedure
Reading intercepts from a graph
On a graph, find where the line meets each axis and read the coordinate along that axis.
- At the y-axis crossing, read the y-value. The x-value is 0.
- At the x-axis crossing, read the x-value. The y-value is 0.
Two checks help. First, the sign of the slope should agree with the intercepts. A line that crosses the x-axis at a positive number and the y-axis at a positive number must slope downward. Second, if the graph's grid scale is not 1 per square, check the axis labels before you read a value.
You can also get the slope from the intercepts. If the x-intercept is (a, 0) and the y-intercept is (0, b), then
m = (0 - b) / (a - 0) = -b/a.
A line through (3, 0) and (0, -5) has slope -(-5)/3 = 5/3.
Edge cases
| Line | x-intercept | y-intercept | Why |
|---|---|---|---|
| y = 5 (horizontal) | none | (0, 5) | y is never 0, so the line never reaches the x-axis |
| x = -2 (vertical) | (-2, 0) | none | x is never 0, so the line never reaches the y-axis |
| y = 0 | every point | (0, 0) | the line is the x-axis |
| x = 0 | (0, 0) | every point | the line is the y-axis |
| y = 2x (through the origin) | (0, 0) | (0, 0) | both intercepts are the same point |
A few consequences:
- A horizontal line with y = k, where k is not 0, has no x-intercept. A vertical line with x = k, where k is not 0, has no y-intercept.
- A line through the origin has only one intercept point. In standard form this happens exactly when C = 0. Setting either variable to zero then gives the other as zero as well, so the intercept method gives you only one point and you need another point or the slope to graph the line.
- A non-horizontal line with slope m has an x-intercept of -b/m. When m = 0 the formula divides by zero, which matches the fact that a horizontal line has no x-intercept (unless b = 0, in which case it is the x-axis itself).
Using intercepts to build areas
The two intercepts and the origin form a right triangle whose legs lie on the axes. The legs have lengths |a| and |b|, so
area = (1/2) |a| |b|.
For 3x + 4y = 12, the intercepts are 4 and 3, so the area is (1/2)(4)(3) = 6. The hypotenuse is the segment of the line between the intercepts. Its length is 5, from the 3-4-5 triangle.
Use absolute values. For 2x - 3y = 12 the intercepts are 6 and -4. The triangle lies partly below the axis, and its area is (1/2)(6)(4) = 12, not -12.
def triangle_area_with_axes(a, b, c):
"""Area of the triangle formed by a*x + b*y = c and the two axes."""
if a == 0 or b == 0 or c == 0:
raise ValueError("line must cross both axes at distinct points")
return abs(c / a) * abs(c / b) / 2
print(triangle_area_with_axes(3, 4, 12)) # 6.0
print(triangle_area_with_axes(2, -3, 12)) # 12.0Common errors
- Reporting b as the x-intercept. In y = mx + b, b is the y-intercept. The x-intercept is -b/m.
- Dropping the sign. For y = 2x + 6, the x-intercept is -3, not 3. Solving 0 = 2x + 6 gives 2x = -6.
- Setting the wrong variable to zero. To find the x-intercept, y is the one that becomes 0. Writing the answer as a point, (a, 0) or (0, b), makes this mistake easier to catch.
- Forgetting the sign when moving terms. In 2x - 3y = 12, setting x = 0 gives -3y = 12, so y = -4. Dividing 12 by 3 and stopping at 4 loses the negative.
- Assuming every line has two intercepts. Horizontal and vertical lines have one, and lines through the origin have a single shared point.
GRE strategies
- Use standard form directly. If the equation is already Ax + By = C, the intercepts are C/A and C/B. Do not convert to y = mx + b first.
- Look for a missing variable. If the line has no y term, it is vertical and has no y-intercept. If it has no x term, it is horizontal and has no x-intercept.
- Use the two points. Intercepts give you two points, so slope, distance between them, and the area with the axes follow quickly.
- Check against the answer choices. After finding an intercept, substitute it back into the equation. This takes seconds and catches sign errors.
- In quantitative comparisons, test the edge cases. If the line is not fully specified, ask whether it could be horizontal, vertical, or pass through the origin, since each changes which intercepts exist.
Exercise
Find the x-intercept and y-intercept of the line 5x - 2y = 20.
Show answer
Set y = 0: 5x = 20, so x = 4, giving (4, 0). Set x = 0: -2y = 20, so y = -10, giving (0, -10).
Exercise
The line y = -2x + 6 and the two coordinate axes form a triangle. What is its area?
Show answer
The y-intercept is 6. Setting y = 0 gives 2x = 6, so the x-intercept is 3. The area is (1/2)(3)(6) = 9.
Exercise
A line crosses the x-axis at (3, 0) and the y-axis at (0, -5). What is its equation in slope-intercept form?
Show answer
The slope is (0 - (-5)) / (3 - 0) = 5/3, and the y-intercept is -5. The equation is y = (5/3)x - 5.
Exercise
The line kx + 4y = 12 has x-intercept 2. What is k, and what is the y-intercept?
Show answer
Substitute (2, 0): 2k = 12, so k = 6. Setting x = 0 gives 4y = 12, so the y-intercept is 3.