Straight Lines

The tangent line to a curve is one of the central objects of differential calculus. Before you can understand tangent lines, you need fluency with straight lines: how to measure slope, how to write the equation of a line through a given point, and when two lines are parallel or perpendicular.

Concept Formula
Slope m = y 2 y 1 x 2 x 1 = rise run
Point-slope form y y 1 = m ( x x 1 )
Parallel lines m 1 = m 2
Perpendicular lines m 1 m 2 = 1

Slope of a Line

Consider a straight line L and two distinct points P ( x 1 , y 1 ) and Q ( x 2 , y 2 ) on it. The slope of the line, denoted by m , is defined to be the ratio:

m = y 2 y 1 x 2 x 1 = rise run .
A straight line through two points P and Q showing the rise and run used to compute slope

If α ( 0 < α < π ) is the angle that a non-horizontal line makes with the positive direction of the x -axis, then m = tan α . (For a quick review of trigonometric functions, see Section 1.17.)

The sign of the slope is related to the direction of the line:

  • If m > 0 , α is an acute angle and the line rises to the right.
  • If m < 0 , α is an obtuse angle and the line falls to the right.
  • If m = 0 , the line is horizontal.
Three lines illustrating positive slope (rising), negative slope (falling), and zero slope (horizontal)

Equations of a Line

The equation of the line passing through a given point P ( x 1 , y 1 ) with slope m is:

y y 1 = m ( x x 1 ) .

This is called the point-slope form of the equation of the line.

If we are given two points ( x 1 , y 1 ) and ( x 2 , y 2 ) , we first calculate m = ( y 2 y 1 ) / ( x 2 x 1 ) , then substitute into the point-slope form to obtain the point-point form:

y = y 1 + ( y 2 y 1 x 2 x 1 ) ( x x 1 ) .
  • The equation of a vertical line through ( x 1 , y 1 ) is simply x = x 1 . A vertical line has no defined slope (the run is zero, so the rise-over-run ratio is undefined).

Parallel and Perpendicular Lines

Two lines with slopes m 1 and m 2 are:

  • parallel m 1 = m 2 .
  • perpendicular m 1 m 2 = 1 .

Horizontal lines (slope 0) are perpendicular to vertical lines (undefined slope), which is consistent with the above rule in the limiting sense.

Frequently Asked Questions

What does the slope of a tangent line mean in calculus? The derivative f'(a) is defined as the slope of the tangent line to the graph of y = f ( x ) at the point ( a , f ( a ) ) . It measures the instantaneous rate of change of f at x = a . The equation of the tangent line at that point is y - f(a) = f'(a)(x-a), which is just the point-slope form.

How do I find the equation of a line perpendicular to y = 2 x + 1 passing through $(3, 0)$? The slope of y = 2 x + 1 is m 1 = 2 . A perpendicular line has slope m 2 = 1 m 1 = 1 2 . Using the point-slope form with point $(3,0)$: y 0 = 1 2 ( x 3 ) y = 1 2 x + 3 2 .

What if a line has slope zero, is it still a function? Yes. A horizontal line y = c is a perfectly valid function (a constant function). A vertical line x = k , however, is not a function, because it assigns multiple y -values to the single x -value k .