← Back to Algebra

Slope and equations of lines

Slope measures how steep a line is and in which direction it runs. With a slope and one point, you can write a line's equation in several useful forms.

Slope

The slope of a line through \((x_1, y_1)\) and \((x_2, y_2)\) is \(m = \frac{y_2 - y_1}{x_2 - x_1}\), rise over run. Through (1, 3) and (4, 9), the slope is \(\frac{6}{3} = 2\): y rises 2 units for each unit x increases. The slope is the same between any two points on a straight line.

Signs of slope

A positive slope rises from left to right; a negative slope falls. A horizontal line has slope 0, because its rise is zero. A vertical line has undefined slope, because its run is zero and division by zero is undefined. Steeper lines have slopes of larger absolute value.

Slope as a rate

In applications, slope is a rate of change with units. If a car's distance in kilometres is graphed against time in hours, the slope is the speed in km/h. If a plumber charges $60 for 1 hour and $150 for 2.5 hours, the slope is 90 / 1.5 = $60 per hour.

Slope-intercept form

The equation \(y = mx + b\) describes the line with slope m and y-intercept b. For \(y = -\tfrac{2}{3}x + 4\), start at (0, 4) and move 3 right and 2 down to reach (3, 2). To put an equation like \(2x + 3y = 12\) into this form, solve for y: \(y = -\tfrac{2}{3}x + 4\).

Point-slope form

If a line has slope m and passes through \((x_1, y_1)\), then \(y - y_1 = m(x - x_1)\). For slope 2 through (1, 3): \(y - 3 = 2(x - 1)\), which simplifies to \(y = 2x + 1\). This is often the quickest way to write a line's equation.

Line through two points

Find the slope first, then use point-slope form. Through (-2, 5) and (4, -1): \(m = \frac{-1 - 5}{4 - (-2)} = \frac{-6}{6} = -1\), so \(y - 5 = -1(x + 2)\), giving \(y = -x + 3\). Check with the other point: \(-4 + 3 = -1\).

Standard form and special lines

Standard form is \(Ax + By = C\), handy for finding intercepts. Horizontal lines have equations \(y = k\); vertical lines \(x = h\). A vertical line is the one kind of line that cannot be written as \(y = mx + b\).

Worked example

A gym charges a joining fee plus a monthly fee. After 3 months a member has paid $130, and after 8 months $280. The slope is (280 - 130)/(8 - 3) = 30, so the monthly fee is $30. Using point-slope form, y - 130 = 30(x - 3), so y = 30x + 40: the joining fee is $40.

Key takeaways

Slope is rise over run, the change in y divided by the change in x, and is constant along a line. Positive slopes rise, negative slopes fall, horizontal lines have slope 0, and vertical lines have undefined slope. In applications, slope is a rate of change with units. Slope-intercept form y = mx + b shows the slope and y-intercept; point-slope form y - y1 = m(x - x1) builds an equation from a slope and a point. For two points, find the slope first. Vertical lines are x = h.

Flashcard

Slope

Rise over run

(y2 - y1)/(x2 - x1).

Check your understanding

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

← Previous lesson Next lesson →