# Lines (§2.3)

The key to understanding a line in the coordinate plane is the slope.
## Points and slopes

You'll want to learn this formula:
*m* =
(*y*_{2} − *y*_{1}) ÷
(*x*_{2} − *x*_{1}).

In this formula, you start with two points and calculate the slope:
- The first point is (
*x*_{1}, *y*_{1}),
and the second point
is (*x*_{2}, *y*_{2}).
- The
**rise**
is *y*_{2} − *y*_{1},
which is how much you move *up*;
the rise is negative if you actually move *down*.
- The
**run**
is *x*_{2} − *x*_{1},
which is how much you move to the *right*;
the run is negative if you actually move to the *left*.
- The
**slope** is the rise divided by the run,
which is usually denoted by *m*;
it is the same for any two distinct points on the same line.

The slope describes the directions in which you can travel along the line.

- Lines with positive slope run up–right and down–left;
lines with negative slope run down–right and up–left.
- Lines whose slope has a large absolute value are steep;
lines whose slope has a small absolute value are shallow.
- Horizontal lines have a slope of exactly zero;
vertical lines have a slope which is undefined
(which you can think of as an infinite slope).

## Slopes and equations

You'll want to learn this formula:
In this formula, you get the equation of a line.
- The slope is the number
*m*.
- The
*y*-intercept is (0, *b*).
- The variables
*x* and *y* stay in the equation.

If you don't know the *y*-intercept,
you can still use this equation if you know one of the points;
plug it in for *x* and *y*, and solve for *b*.
Or use this optional formula:

*y* =
*m*(*x* − *x*_{1}) +
*y*_{1}.

Conversely, if you have an equation for the line,
then solve it for *y*;
you now know what the slope and *y*-intercept are.
It's easy to draw a graph using any point and the slope.

## Vertical lines

If a line is vertical,
the the run between any two points is zero,
so the slope is undefined when you divide by the run.
You can also think of this as an infinite slope,
since a vertical line is infinitely steep.
If *a* is the *x*-coordinate of any point,
then the equation for a vertical line is always simply:

## Parallel and perpendicular lines

Since the slope of a line indicates its direction,
parallel lines always have the same slope.
In contrast, perpendicular lines have opposite reciprocal slopes.
- Parallel lines:
*m*_{1} = *m*_{2}.
- Perpendicular lines:
*m*_{1}*m*_{2} = −1,
or *m*_{2} = −1/*m*_{1}.

Also, vertical lines are parallel to one another,
and horizontal and vertical lines are each perpendicular to the other.

Go back to the course homepage.

This web page was written between 2010 and 2013 by Toby Bartels,
last edited on 2013 October 9.
Toby reserves no legal rights to it.
The permanent URI of this web page
is
`http://tobybartels.name/MATH-1150/2015SU/lines/`

.