Slope, and the Three Ways to Write a Line

The slope of a line tells you how steep it is and which way it goes. Once you can find a slope, you can write the equation of any line from two points, a graph or a word problem.

What slope measures

Slope is the change in y divided by the change in x between any two points on the line. People often say “rise over run.”

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

run = 2 rise = 1 (0, 1) xy
The line y = ½x + 1 rises 1 unit for every 2 units it runs, so its slope is ½.

Example Find the slope through (1, 2) and (4, 11)

m = (11 − 2) / (4 − 1) = 9/3 = 3. The line goes up 3 units for every 1 unit to the right.

Example Find the slope through (−2, 5) and (3, −5)

m = (−5 − 5) / (3 − (−2)) = −10/5 = −2. A negative slope means the line falls from left to right.

Four kinds of slope cover every line:

SlopeWhat the line doesExample
PositiveRises left to righty = 3x
NegativeFalls left to righty = −2x + 1
ZeroHorizontaly = 4
UndefinedVerticalx = −1

A vertical line has undefined slope because the run is zero and you can’t divide by zero.

Keep the order the same

Subtract in the same order on top and bottom. If you start with y₂ on top, start with x₂ on the bottom. Mixing the order flips the sign of your answer.

Slope-intercept form: y = mx + b

In y = mx + b, m is the slope and b is the y-intercept, where the line crosses the y-axis. This is the easiest form to graph: plot (0, b), then use the slope to step to the next point.

Example Write the equation of the line with slope 3 through (2, 7)

  1. Start with y = 3x + b.
  2. Substitute the point: 7 = 3(2) + b, so 7 = 6 + b.
  3. Solve: b = 1.
  4. The line is y = 3x + 1.

Point-slope form: y − y₁ = m(x − x₁)

Point-slope form lets you write a line the moment you know one point and the slope, with no solving for b.

Example Write the line through (1, 2) and (4, 11)

  1. The slope is 3, found above.
  2. Use the point (1, 2): y − 2 = 3(x − 1).
  3. To convert to slope-intercept form, distribute and add 2: y = 3x − 1.
  4. Check with the other point: 3(4) − 1 = 11. ✓

Standard form: Ax + By = C

Standard form puts both variables on one side. It is the quickest form for finding intercepts: set x = 0 to find the y-intercept, and y = 0 to find the x-intercept.

Example Graph 2x + 3y = 12

  1. When x = 0: 3y = 12, so y = 4. The y-intercept is (0, 4).
  2. When y = 0: 2x = 12, so x = 6. The x-intercept is (6, 0).
  3. Draw the line through those two points.
  4. To find the slope, solve for y: y = −⅔x + 4. The slope is −⅔.

Parallel and perpendicular lines

  • Parallel lines have the same slope and never meet.
  • Perpendicular lines meet at a right angle. Their slopes are negative reciprocals: flip the fraction and change the sign. A slope of ⅔ pairs with −3/2.

Example Find the line perpendicular to y = 2x + 1 that passes through (4, 3)

  1. The given slope is 2, so the perpendicular slope is −½.
  2. Substitute the point: 3 = −½(4) + b, so 3 = −2 + b.
  3. b = 5, so the line is y = −½x + 5.

What slope means in a word problem

In a real situation, slope is a rate and the intercept is a starting value.

Example A taxi charges $3 to start plus $2 per mile

The cost is y = 2x + 3, where x is miles. The slope, 2, is the cost per mile. The intercept, 3, is the cost before you go anywhere. A 7-mile ride costs 2(7) + 3 = $17.

When a test asks “what does the slope represent?”, answer with units: “the cost increases by $2 for each additional mile.”

Problems to try

  1. Find the slope of the line through (3, −1) and (7, 11).

    Show answer

    3. The change in y is 12 and the change in x is 4.

  2. Write the equation of the line with slope −4 through (1, 6).

    Show answer

    y = −4x + 10. Substitute: 6 = −4(1) + b, so b = 10.

  3. Write the equation of the line through (−1, 4) and (3, −4).

    Show answer

    y = −2x + 2. The slope is −8/4 = −2. Then 4 = −2(−1) + b gives b = 2.

  4. Find the slope and y-intercept of 3x − 4y = 8.

    Show answer

    Slope ¾, y-intercept −2. Solving for y gives y = ¾x − 2.

  5. Find the line perpendicular to y = −3x + 5 through (6, 1).

    Show answer

    y = ⅓x − 1. The perpendicular slope is ⅓, and 1 = ⅓(6) + b gives b = −1.

  6. A gym charges $50 to join and $20 a month. Write the cost after x months, and find the cost after 9 months.

    Show answer

    y = 20x + 50. After 9 months the cost is 20(9) + 50 = $230.

Questions students ask

Which form should I use?

Use slope-intercept to graph or compare lines, point-slope when you are given a point and a slope, and standard form when you need intercepts. They all describe the same line, and any one converts to the others.

How do I find slope from a graph?

Pick two points where the line crosses grid corners exactly. Count the rise and the run between them. Rising is positive, falling is negative.

Can a line have no y-intercept?

Only a vertical line other than x = 0, such as x = 3. It runs parallel to the y-axis and never crosses it.

You can check any of these by typing the equation into the graphing calculator and looking at the line.

Keep studying

Drafted with help from AI tools. Every example is worked through step by step so you can check it.