Precalculus

Slope Formula: Point-Slope and Slope-Intercept Form

Slope Formula: Point-Slope and Slope-Intercept Form

The slope formula is ( m = frac{y_2 – y_1}{x_2 – x_1} ) (rise over run). A line with slope m through ( (x_1, y_1) ) has point-slope form ( y – y_1 = m(x – x_1) ) and slope-intercept form ( y = mx + b ), where b is the y-intercept. For example: through ( (1, 2) ) and ( (4, 11) ), ( m = 3 ) and the line is ( y = 3x – 1 ).

The slope of a line measures how steep it is: how much y changes for each one-unit change in x. Through two points ( (x_1, y_1) ) and ( (x_2, y_2) ), the slope formula is

$$m = frac{y_2 - y_1}{x_2 - x_1} = frac{text{rise}}{text{run}}$$

A slope of 3 means the line goes up 3 units for every 1 unit to the right. However, a slope of ( -frac12 ) means it goes down 1 unit for every 2 units to the right.

The four kinds of slope

SlopeDirectionExample
Positiverises left to right( y = 2x + 1 )
Negativefalls left to right( y = -x + 4 )
Zerohorizontal( y = 3 )
Undefinedvertical( x = -2 )

How to find the slope of a line

From two points

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

Slope formula: From two points

$$m = frac{11 - 2}{4 - 1} = frac{9}{3} = 3$$

Example 2. Through ( (-2, 3) ) and ( (4, 0) ):

$$m = frac{0 - 3}{4 - (-2)} = frac{-3}{6} = -frac12$$

It doesn’t matter which point you call first, as long as you use the same order on top and bottom.

From a graph

Pick two points where the line crosses grid corners exactly. Count the rise (up is positive, down is negative) and the run (always count to the right), then divide.

From an equation

Solve for y. In ( 4x + 2y = 10 ), ( y = -2x + 5 ), so the slope is ( -2 ). In standard form ( Ax + By = C ), the slope is ( -frac{A}{B} ).

Slope-intercept form

$$y = mx + b$$

Math calculations, graph, calculator, pencil, and eraser on graph paper.

Here m is the slope and b is the y-intercept, where the line crosses the y-axis. It’s sometimes searched as “slope intersection form”, but the standard name is slope-intercept form. It’s the easiest form to graph: plot ( (0, b) ), then use the slope to step to a second point.

Example 3. Graph ( y = frac23x – 1 ): start at ( (0, -1) ), then go up 2 and right 3 to ( (3, 1) ), and draw the line.

Point-slope form

When you know one point and the slope, use

An empty classroom with desks, chairs, blackboards, and a projector screen.

$$y - y_1 = m(x - x_1)$$

Example 4. Find the line through ( (1, 2) ) and ( (4, 11) ). The slope is 3 (Example 1). Using the first point:

$$y - 2 = 3(x - 1)$$

Distribute and solve for y to convert to slope-intercept form: ( y = 3x – 1 ). In standard form that’s ( 3x – y = 1 ).

Example 5. Find the line with slope ( -frac12 ) through ( (-2, 3) ): ( y – 3 = -frac12(x + 2) ), which simplifies to ( y = -frac12x + 2 ).

Slope calculator

Enter two points to get the slope as an exact fraction and the line in all three forms.

Algebra & Trig#29

Slope & Line Equation

Slope \(m = \frac{y_2 - y_1}{x_2 - x_1}\) through two points, plus point-slope, slope-intercept and standard form.

The full-page slope calculator has more examples.

Parallel and perpendicular lines

  • Parallel lines have equal slopes.
  • Perpendicular lines have slopes that are negative reciprocals: ( m_1 m_2 = -1 ).

Example 6. Find the line through ( (2, 5) ) perpendicular to ( y = 4x – 7 ). The perpendicular slope is ( -frac14 ), so

$$y - 5 = -frac14(x - 2) quadRightarrowquad y = -frac14x + frac{11}{2}$$

Slope as a rate of change

Slope has units: “units of y per unit of x”. For example, if a taxi’s fare is ( C = 2.5d + 4 ) dollars for d miles, the slope 2.5 means $2.50 per mile. The intercept 4 is the fixed starting fee. Also, if a car is 120 km from home at 1 pm and 300 km at 3 pm, the slope of distance against time is ( frac{180}{2} = 90 ) km/h, its average speed.

Slope as a rate of change

x- and y-intercepts

The y-intercept is where the line crosses the y-axis (set ( x = 0 )); the x-intercept is where it crosses the x-axis (set ( y = 0 )).

Example. For ( 3x + 2y = 12 ): with ( x = 0 ), ( y = 6 ), so the y-intercept is ( (0, 6) ); with ( y = 0 ), ( x = 4 ), so the x-intercept is ( (4, 0) ). Plotting the two intercepts is the fastest way to graph a line in standard form. The slope is ( -frac{6}{4} = -frac32 ).

Average rate of change

For any function, the average rate of change from ( x = a ) to ( x = b ) is the slope of the line through ( (a, f(a)) ) and ( (b, f(b)) ):

A female runner on a track in a stadium.

$$text{average rate of change} = frac{f(b) - f(a)}{b - a}$$

Example. For ( f(x) = x^2 ) from ( x = 1 ) to ( x = 4 ): ( frac{16 – 1}{4 – 1} = 5 ). If x is time in seconds and ( f(x) ) is distance in metres, that’s an average speed of 5 m/s (see velocity and acceleration).

From slope to derivatives

A straight line has the same slope everywhere. However, a curve doesn’t. Calculus handles this by zooming in: the slope between two points on a curve (a secant line) gets closer and closer to a single value as the points move together. That limit is the slope of the tangent line, and it’s called the derivative:

A winding road on a steep, barren mountainside, illustrating slope.

$$f'(a) = lim_{hto0}frac{f(a + h) - f(a)}{h}$$

The fraction is just the slope formula with points ( (a, f(a)) ) and ( (a + h, f(a + h)) ).

Example 7. For ( f(x) = x^2 ) at ( x = 3 ), the derivative is ( f'(3) = 6 ), so the tangent line is ( y – 9 = 6(x – 3) ), point-slope form again. See the equation of a tangent line and the tangent line calculator.

Common mistakes

  • Run over rise. Slope is change in y over change in x, not the other way round.
  • Mixed order. ( frac{y_2 – y_1}{x_1 – x_2} ) gives the wrong sign.
  • Subtracting negatives. ( 4 – (-2) = 6 ).
  • Zero vs undefined. Horizontal lines have slope 0. However, vertical lines have no slope at all.
  • Reading b from point-slope form. In ( y – 2 = 3(x – 1) ), the intercept is not 2. Instead, it’s ( -1 ) after simplifying.

Practice problems

  1. Find the slope through ( (3, 7) ) and ( (5, 15) ).
  2. Find the slope through ( (-1, 4) ) and ( (3, -4) ).
  3. Find the slope of ( 6x – 3y = 12 ).
  4. Write the line with slope 5 through ( (2, -1) ) in slope-intercept form.
  5. Find the line through ( (0, 3) ) parallel to ( y = -2x + 8 ).
  6. What is the slope of a line perpendicular to ( y = frac35x + 1 )?

Answers: (1) 4; (2) ( -2 ); (3) 2; (4) ( y = 5x – 11 ); (5) ( y = -2x + 3 ); (6) ( -frac53 ).

FAQ

What is the slope formula?

( m = frac{y_2 – y_1}{x_2 – x_1} ), the change in y divided by the change in x between two points.

What is point-slope form?

( y – y_1 = m(x – x_1) ), the equation of a line through ( (x_1, y_1) ) with slope m.

What is slope-intercept form?

( y = mx + b ), where m is the slope and b is the y-intercept.

How do you find the slope of a line from an equation?

Rearrange it into ( y = mx + b ); the coefficient of x is the slope.

What does a negative slope mean?

The line falls as you move from left to right: y decreases as x increases.

Further reading

Calculators for this topic

Leave a comment

Your email address will not be published. Required fields are marked *