4.1 Lines, Slope & Graphing

Key Takeaways

  • Slope is m = (y₂ − y₁)/(x₂ − x₁): the change in y divided by the change in x between two points.
  • Slope-intercept form y = mx + b reads off the slope m and the y-intercept (0, b) directly.
  • Point-slope form y − y₁ = m(x − x₁) builds a line's equation from one point and the slope.
  • Parallel lines have equal slopes; perpendicular lines have slopes that are negative reciprocals (product = −1).
  • Set y = 0 for the x-intercept and x = 0 for the y-intercept.
Last updated: June 2026

What Slope Measures

Slope is the steepness of a line — how fast y changes as x changes. Given two points (x₁, y₁) and (x₂, y₂) on the line, the slope formula is:

m = (y₂ − y₁)/(x₂ − x₁)

This is often read as "rise over run": the vertical change (rise) divided by the horizontal change (run). A positive slope rises left to right; a negative slope falls; a slope of 0 is a horizontal line; and a vertical line has an undefined slope (the run is 0, so you would divide by zero).

Worked example. Find the slope through (1, 2) and (5, 10).

  • m = (10 − 2)/(5 − 1) = 8/4 = 2.

The line rises 2 units for every 1 unit it moves right.

Worked example (negative slope). Find the slope through (−2, 6) and (4, −3).

  • m = (−3 − 6)/(4 − (−2)) = (−9)/(6) = −3/2.

Notice how subtracting a negative, 4 − (−2), becomes 4 + 2 = 6. Keep the order of the points consistent: whichever point you call "point 2" in the numerator must be "point 2" in the denominator.

The Three Forms of a Line

FormEquationBest used when
Slope-intercepty = mx + bYou know slope m and y-intercept b
Point-slopey − y₁ = m(x − x₁)You know slope and any one point
StandardAx + By = CFinding intercepts; A, B, C integers

Slope-intercept form y = mx + b is the workhorse: m is the slope and (0, b) is the y-intercept. To graph, plot (0, b), then use the slope as rise/run to step to a second point.

Worked example. Graph y = (2/3)x − 1. Start at the y-intercept (0, −1). The slope 2/3 means rise 2, run 3, giving (3, 1). Draw the line through (0, −1) and (3, 1).

Point-slope form y − y₁ = m(x − x₁) lets you write a line from one point and the slope.

Worked example. Line with slope −4 through (2, 5):

  • y − 5 = −4(x − 2)
  • y − 5 = −4x + 8
  • y = −4x + 13.

Worked example (line through two points). Find the equation through (1, 3) and (3, 11). First the slope: m = (11 − 3)/(3 − 1) = 8/2 = 4. Then point-slope with (1, 3): y − 3 = 4(x − 1) → y = 4x − 1.

Intercepts, Parallel & Perpendicular Lines

Intercepts are where a line crosses the axes. For the x-intercept, set y = 0 and solve for x; for the y-intercept, set x = 0 and solve for y. These are essential for graphing from standard form.

Worked example. Find the intercepts of 3x + 2y = 12.

  • x-intercept: 3x + 2(0) = 12 → x = 4, so (4, 0).
  • y-intercept: 3(0) + 2y = 12 → y = 6, so (0, 6).

Plot (4, 0) and (0, 6) and connect them.

Parallel lines never meet — they have equal slopes. Perpendicular lines meet at 90° — their slopes are negative reciprocals, meaning the slopes multiply to −1. If one slope is m, the perpendicular slope is −1/m.

Worked example. A line has slope 3/4. A parallel line also has slope 3/4. A perpendicular line has slope −4/3 (flip and change the sign), and indeed (3/4)(−4/3) = −1.

Worked example. Find the line through (0, 1) perpendicular to y = 2x + 5. The given slope is 2, so the perpendicular slope is −1/2. Using y = mx + b with b = 1: y = −(1/2)x + 1.

Common mistake: Subtracting the coordinates in opposite orders top and bottom — e.g., (y₂ − y₁)/(x₁ − x₂) — flips the sign of the slope. Always keep the same order. Another frequent trap: confusing parallel (equal slopes) with perpendicular (negative reciprocals).

Standard Form, Horizontal & Vertical Lines

Standard form Ax + By = C is convenient for finding both intercepts quickly and for writing equations with integer coefficients. You can always convert between forms. To convert standard form to slope-intercept, solve for y.

Worked example (convert to slope-intercept). Rewrite 2x + 5y = 20 as y = mx + b.

  • 5y = −2x + 20
  • y = −(2/5)x + 4.

So the slope is −2/5 and the y-intercept is (0, 4).

Worked example (convert to standard form). Write y = (3/4)x − 2 in standard form with integer coefficients. Multiply through by 4: 4y = 3x − 8, then move terms: −3x + 4y = −8, or equivalently 3x − 4y = 8.

Horizontal and vertical lines are special cases worth memorizing:

  • A horizontal line has the form y = b; its slope is 0 (no rise). Example: y = 3 passes through every point with y-coordinate 3.
  • A vertical line has the form x = a; its slope is undefined (no run). Example: x = −2 is the set of all points with x-coordinate −2.

Worked example. Find the equation of the horizontal line through (5, −7). Since horizontal lines fix y, the equation is simply y = −7. The vertical line through that same point is x = 5.

When graphing, remember that a positive slope tilts the line up to the right and a steeper number (like 4) is closer to vertical than a shallow one (like 1/4).

Test Your Knowledge

What is the slope of the line through the points (−1, 4) and (3, −4)?

A
B
C
D
Test Your Knowledge

A line passes through (2, −1) with slope 3. Which equation describes it?

A
B
C
D
Test Your Knowledge

Which line is perpendicular to y = (2/5)x + 3?

A
B
C
D
Test Your Knowledge

What is the x-intercept of 4x − 3y = 24?

A
B
C
D