Department of Mathematics --- College of Science --- University of Utah

Mathematics 1010 online

Equations and Graphs of Straight Lines

Slope

All you need to understand about straight lines is contained in the picture above. Think of moving along the blue line. You climb one unit for every two units that you move to the right. The slope of the line is the ratio of the vertical and the horizontal distances, called rise and run, respectively.

$\displaystyle \hbox{\bf slope} = \frac{\hbox{\bf rise}}{\hbox{\bf run}}. $

A straight line is characterized by the fact that the slope is independent of where you compute the rise and the run. The two triangles AEC and BFD in the Figure are similar. This means that corresponding angles are equal, and hence the ratios of the lengths of corresponding sides are equal. It does not matter which two points on the line we pick (as long as they are distinct), we will get a similar triangle, and the same slope, for all choices. In the picture, the various points have the following coordinates:

\begin{displaymath}
\begin{array}{ccccccc}
\hbox{point} & \hbox{A} & \hbox{B} & ...
... \\
y & 1.5 & 1.0 & 0.5 & -0.5 & 0.5 & -0.5 \\
\end{array} \end{displaymath}

Using the cyan triangle AEC we obtain for the slope $ m $ of the line

$\displaystyle m = \frac{1.5-0.5}{2-0} = \frac{1}{2}. $

Using the magenta triangle BFD we obtain the same value:

$\displaystyle m = \frac{1.0-(-0.5)}{1-(-2)} = \frac{1.5}{3} = \frac{1}{2}. $

Everything about straight lines flows from the concept of slope. There are some details and some language that you need to be familiar with. But essentially all problems concerning straight lines, certainly in this class, require that you work with the slope of the straight line.

A straight line may be horizontal in which case its slope is zero. It may be vertical, in which case the definition of slope breaks down since it calls for a division by zero. We say that the slope is undefined. It may also descend to the right in which case the slope is negative. Check here for an example of a line with a negative slope.

Intercepts

A straight line may intersect the $ x $ and $ y $ axes, in the points $ (X,0)\ $ and $ (0,Y) $, respectively. The numbers $ X $ and $ Y $ are called the $ x $-intercept and $ y $-intercept of the straight line, respectively. Note that the intercepts are numbers, they are not points. For the line illustrated on this page the $ x $ intercept = $ -\frac{1}{2} $ and the $ y $-intercept is $ +\frac{1}{2} $.

The Slope-Intercept Form of a line.

The line in the above Figure is described by the equation

$\displaystyle y = \frac{x}{2} + \frac{1}{2}. $

Note that this is consistent with what we have observed before. If we increase $ x $ by $ 1 $ then $ y $ increases by $ \frac{1}{2} $ and so the slope of that line is $ \frac{1}{2} $. When $ x=0 $ then $ y=\frac{1}{2} $ and so the $ y $-intercept is $ \frac{1}{2} $. To obtain the $ x $-intercept we set $ y=0 $ and solve for $ x $:

$\displaystyle 0 = \frac{x}{2} + \frac{1}{2} \qquad\Longrightarrow \qquad x=-\frac{1}{2}. $

These considerations generalize. An equation of the form

$\displaystyle y = mx + b $

defines a line with slope $ m $ and $ y $ intercept $ b $. It is called the slope-intercept form of a line.

The Two-Point-Form of a Straight Line.

Suppose we are given two points $ (x_1,y_1) $ and $ (x_2,y_2) $ on a line. Let's denote a general point on the line by $ (x,y) $. Then, since the slope is independent of the choice of points we obtain the equation

$\displaystyle \frac{y_2-y_1}{x_2-x_1} =\frac{y-y_1}{x-x_1}. $

This is called the two-point-form of a straight line. For example, for the line in the Figure, picking $ (x_1,y_1) = B $ and $ x_2,y_2 $, as indicated in the cyan triangle in the above Figure, we obtain the equation

$\displaystyle \frac{1}{2} =\frac{1.5-0.5}{2-0} = \frac{y-0.5}{x-0}. $

Multiplying with $ x $ and adding 0.5 on both sides gives the slope-intercept form.

The Point-Slope-Form of a Straight Line.

If we are given the slope $ m $ of a line, and a point $ (x_1,y_1) $ on it, we denote again by $ (x,y) $ a general point and obtain

$\displaystyle \frac{y-y_1}{x-x_1} = m. $

This is called the point-slope form of the line. For example, using again $ (x_1,y_1) = B $ and $ m = \frac{1}{2} $ we obtain for the line in our Figure:

$\displaystyle \frac{y-1}{x-1} = \frac{1}{2}. $

Multiplying with $ x-1 $ and adding 1 on both sides again gives the familiar slope intercept form.

The general equation of a straight line.

An equation of the form

$\displaystyle Ax + By + C = 0 $

where $ A $, $ B $ and $ C $ are constants defines a straight line. For example, our line on this page can be written as

$\displaystyle x - 2y + 1 = =0 $

where $ A=C=1 $ and $ B=-2 $. Once again, you can solve for $ y $ and obtain the slope-intercept form. Such a general equation has the advantage of capturing the possibility of a vertical line (where $ B=0 $).

Parallel Lines

Two lines are parallel if their slopes are equal. You can see this immediately by drawing two parallel lines and triangles like those in the Figure on this page. All the triangles are similar.

Perpendicular Lines

Two lines with slopes $ m_1 $ and $ m_2 $ are perpendicular if

$\displaystyle m_2 =
-\frac{1}{m1_1} $

or, equivalently,

This makes sense: if one line goes up the other goes down (since their slopes have opposite signs), and if one line is shallow the other is steep.

The following Figure explains why the slopes are related in this way:

It shows two perpendicular lines with slopes 1/2 (shown in blue) and -2 (shown in red), intersecting in the point (2,3). The two green triangles are congruent, and the one associated with the red line can be obtained by rotating by 90 degrees the other triangle associated with the blue line. If you think of subtracting the coordinates of the point close to the intersection from those of the point far away, that rotation turns the original run into the new rise, and the original rise into the negative of the new run, as illustrated in the Figure. You can also think of subtracting the coordinates of the leftmost point from those of the rightmost, in which case the rise is multiplied with negative 1 and the run maintains its sign, without affecting the sign of the slope.