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

Mathematics 1010 online

Working with Lines

This page contains examples of common calculations involving the graphs and equations of lines .

1. Given the General Form, Find Everything

Consider the line defined by

$\displaystyle 2x-3y = 4.\qquad(*)$

To find the $ x$ intercept we set $ y=0$ and solve the resulting equation:

$\displaystyle 2x=4 \quad\Longrightarrow\quad x = 2.$

The $ x$-intercept is $ 2$. Similarly, to find the $ y$-intercept we set $ x=0$ and solve the resulting equation:

$\displaystyle -3y = 4
\quad\Longrightarrow\quad y = -\frac{4}{3}.$

The $ y$-intercept is $ -\frac{4}{3}$. The $ x$ and $ y$-intercepts also gives us two points, namely $ (2,0)$ and $ \left(0,-\frac{4}{3}\right)$. Two points give us the slope:

$\displaystyle m = \frac{-4/3-0}{0-2} = \frac{2}{3}.$

We already know the $ y$-intercept so the slope-intercept form of the line is

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

Of course, we can also find that form by solving the equation$ (*)$ directly for $ y$. Subtract $ x$ on both sides and divide by negative $ -3$ to get the same equation.

The line is shown in the following Figure:

2. Given Two Points, Find the Line

Suppose we know that our line contains the points $ (2,-1)$ and $ (-1,5)$. Then we can immediately compute the slope:

$\displaystyle m = \frac{5-(-1)}{-1-2} = \frac{6}{-3} = -2.$

Thus the slope -intercept form of our line is

$\displaystyle y = -2x + b$

where we not yet know $ b$. However, we know two points on the line. Either can be used to compute $ b$. In fact, it is a good idea to use both points to check our calculation. (Always check your answers!). Using the point $ (2,-1)$ we obtain the equation

$\displaystyle -1 = -2\times 2 + b \quad\Longrightarrow \quad b = 3.$

The other point, $ (-1,5)$, gives the same value of $ b$:

$\displaystyle 5 = -2(-1) + b \quad\Longrightarrow \quad b = 3.$

The following Figure shows the required line:

3. Given Two Intercepts, Find the Line

Two intercepts are a special case of two points. For example, suppose the $ x$ intercept is $ 2$ and the $ y$ intercept is $ -1$. Then we know that the graph of the line contains the points $ (2,0)$ and $ (0,-1)$. The slope is

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

The "intercept" in the slope-intercept form of the line is the $ y$ intercept, thus the slope intercept form of this particular line is

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

This particular line is shown in the following Figure:

4. Finding the Intersection of Two Lines

The key here is the fact that the coordinates of the intersection satisfy the equations of both lines. Suppose we have the lines

$\displaystyle y = x-2 \quad\hbox{and}\quad y = -\frac{x}{ 2} + 2.$

Both equations hold for the intersection $ (x,y)$. Since the $ y$ values are equal we obtain the equation

$\displaystyle x-2 = -\frac{x}{2} +2.$

Adding $ 2$ and $ \frac{x}{2}$ on both sides gives

$\displaystyle \frac{3}{2}x = 4.$

Dividing by $ \frac{3}{2}$ gives

$\displaystyle x = \frac{8}{3}.$

To obtain $ y$ we substitute this value of $ x$ in one of the equations, and check that we get the same answer by substituting in the other equation. We get

$\displaystyle y = \frac{8}{3}-2 = -\frac{4}{3} + 2 = \frac{2}{3}.$

So the intersection point is $ \left(\frac{8}{3},\frac{2}{3}\right)$. The following Figure shows both lines and the intersection:

5. Finding a Perpendicular Line

Suppose we are given a line $ L$ and a point $ P$. We want an equation of the line through $ P$ and perpendicular to $ L$. The key fact here is that lines are perpendicular if their slopes are negative reciprocals of each other. For example, suppose $ L$ has the equation

$\displaystyle y = -2x -1$

and we want to find the equation of the perpendicular line that passes through the point $ P=(1,2)$. The slope of that line is the negative reciprocal of $ -2$, i.e., $ \frac{1}{2}$ and so the perpendicular line has the equation

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

where we need to determine $ b$. Since $ \((1,2)$ lies on that perpendicular line we have the equation

$\displaystyle 2
= \frac{1}{2} + b$

and so $ b = \frac{3}{2}$. The equation of the perpendicular line is

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

The following Figure shows both lines:

As described above, we can also compute their intersection. Solving

$\displaystyle \frac{1}{2} x + \frac{3}{2} = -2x -1$

gives $ x=-1$ and substituting in one or both of the equations gives $ y=1$. The two lines intersect in the point $ (-1,1)$. Some of the home work problems ask to compute the distance of $ P$ from the intersection point, in this case that distance is

$\displaystyle d = \sqrt{(1-2)^2
+ (-1-1)^2} = \sqrt{5}.$

6. Finding the Distance between a Point and a Line

The procedure is outlined in the preceding paragraph. Here is a n outline. Suppose the line is $ L$ and the point is $ P$.

  1. Find an equation of the line $ M$ through $ P$, and perpendicular to $ L$.
  2. Compute the intersection $ Q$ of $ L$ and $ M$.
  3. Compute the Distance between $ P$ and $ Q$.