Lines

Equations of lines

If you have worked through the notes on slope, distance and midpoint, you already know a lot about the algebra of lines. Now we can wrap it up and figure out how to represent a line on a plane with an equation.

That's what it is all about in mathematics: We try to model things using equations (and another kind of mathematical construct you'll learn about later, "functions"). Getting your knowledge of lines and their equations squared away early will really help you to understand much of the math yet to come.

Equations of lines

The equation of a line expresses the relationship of each x to its corresponding y to give an ordered pair (x, y) that lies on the line. Ordered pairs (x, y) that don't lie on the line will not satisfy the equation.

Points on a line Shown here is part of a line represented by the equation y = x + 4. That equation perfectly pairs one y with every x. Only ordered pairs (x, y) that lie on the line will "satisfy" the equation — make it true. Any point not on the line will make the equation false.

For example, when the x and y-coordinates of the point (7,11) are substituted for x and y in the equation, the equal sign is a true statement: 11 = 11, obviously true.

But when the x and y-coordinates of the point (3, 3), which visibly does not lie on the line, are put into the equation, the result is 3 = 7, which is not true.

Our job will be to figure out how to come up with the equation of any line, like the y = x + 4 at left, using just two pieces of information. The first question is: Why two pieces of information?

Only two properties are needed to fully describe any line in a plane.

A line in the x-y plane (or any plane) is fully described if we know how much it is tilted from horizontal or vertical, and where it is located.

We specfiy tilt by measuring slope, which we defined as the change in the y coordinate divided by the change in x:

$$m = \frac{y_2 - y_1}{x_2 - x_1}$$

We could easily define slope as Δx / Δy, but the way we do it is a long-standing convention. A positive slope means the line runs from lower left to upper right; a negative slope means the opposite.

All that remains is to specify where the line is on the plane. That turns out to be pretty easy; as we move the line up and down (±y), it simultaneously moves left and right (±x). That means we only need to have the location of a single point to specify the location.

Again by long-standing convention, we usually pick the place where the line intersects the y-axis, the y-intercept, where x = 0.

So we generally find the equation that represents a line by finding its slope and its y-intercept. The two mainly-used forms of any equation that models a line are shown below. The slope is as defined above and the y-intercept, b, is the point (0, b).   Correspondences

It's not too difficult at all to find correspondences between these two forms of the equation of a line. After all, they represent the same thing. Take the standard form, for example:

$$Ax + By + C$$

We can begin to morph this equation into slope-intercept form by moving the x-term to the right by subtraction:

$$By = -Ax + C$$

Then if we divide both sides by A, we get

$$y = \frac{-A}{B} \, x + \frac{C}{B}$$

Now it's pretty easy to see the correspondences between the standard and slope-intercept forms.

The slope is given by -A/B (magenta) and the intercept by C/B (green). That is,

$$m = \frac{-A}{B} \; \text{ and } \; b = \frac{C}{B}$$

I wouldn't go to the trouble of memorizing these correspondences, however. In practice, the algebra steps to convert between forms are so easy that you just won't have to.

Example 1

Find the equation of a line from two points

Here are our two points. They could be any two points on the x-y plane; only one line can be drawn through any two points.

$$(-3, -1) \; \text{ & } (2, 7)$$

There are two ways to find the equation. Different people have different opinions about which is easier. In the first, start by finding the slope:

$$m = \frac{y_2 - y_1}{x_2 - x_1} = \frac{7 - (-1)}{2 - (-3)} = \frac{8}{5}$$

Now we need to find the y-intercept, (b). To do that, rearrange the slope-intercept formula by subtracting mx from both sides:

$$y = mx + b \; \longrightarrow \; b = y - mx$$

Now we use our slope and just one of the points. Either will work, but I'm going to choose one with positive components. That's always a good choice – less possibility of silly errors. So the intercept is (note the I've converted 7 to 5ths to add the fractions):

$$b = \frac{35}{5} - \frac{16}{5} = \frac{19}{5}$$

Then the formula, in slope-intercept form, is

$$y = \frac{8}{5} x + \frac{19}{5}$$

That's fine, but it's possible to manipulate it so that it has no fractions, just by multiplying both sides by 5:

$$5y = 8x + 19$$

... and in nice standard form (x and y both on the left, constant on the right), it's:

$$5y - 8x = 19$$

The second way

The other way to find linear equations from two points is to rearrange the slope formula:

$$m = \frac{y_2 - y_1}{x_2 - x_1}$$

If we multiply both sides by (x2 - x1), we get what is called the "point-slope formula."

$$y_2 - y_1 = m(x_2 - x_1)$$

Into this we plug one of the coordinates and the slope (still need that!) Then it's just a matter of multiplying through by the slope (remember to distribute) and solving for y

$$y - 7 = \frac{8}{5}(x - 2)$$

From here you can convince yourself that we've arrived at the same equation (just convert 7 to 5ths and keep going).

$$y = \frac{8}{5} x - \frac{16}{5} + 7$$

Which method you use is up to you, but they both have to yield the same result.

Example 2

Find the equation of a line from one point and the slope

Let's say that our line passes through the point (-2, 3) and has a slope of m = 7/3. This problem is really just like the one in example 1, except that we can skip the step of calculating the slope because we already know it.

We again have two ways to find the equation of this line. The first is just to use the slope-intercept formula to find the y-intercept:

$$y = mx + b \; \longrightarrow \; b = y - mx$$

We use the coordinates of the known point (-2, 3) and the slope to find the y-intercept: Watch the negative signs! If we convert 3 to 3rds, we get

$$b = \frac{9}{3} + \frac{14}{3} = \frac{23}{3}$$

Now we just plug the slope and intercept into the slope-intercept formula, y = mx + b:

$$y = \frac{7}{3} + \frac{23}{3}$$

We can always reduce the fractions, in this case by multiplying both sides of the equation by 3:

$$3y = 7x + 23$$

... and we can convert it to standard form by moving the variables to the left:

$$3y - 7x = 23$$

The second method (point-slope formula) will give the same result. Start here:

$$y_2 - y_1 = m(x_2 - x_1)$$

Now plug in (x1, y1) = (-2, 3), and m = 7/3 : Multiply through by the slope,

$$y - 3 = \frac{7}{3} (x + 2)$$

and reduce to get the same equation: Example 3

Find the equation of a line parallel to another

X

Parallel lines

Parallel lines have the same slope. Any two lines with different slope will eventually intersect, and therefore can't be parallel.

Problem: Find the equation of a line passing through (1, 2) and parallel to the line passing through points (-1, -1) and (2, 5).

Our first task is to find the slope of the line for which we have two points:

\begin{align} m = \frac{y_2 - y_1}{x_2 - x_1} &= \frac{5 - (-1)}{2 - (-1)} \\ \\ &= \frac{6}{3} = 2 \end{align}

Because parallel lines have the same slope, the slope of our new line is m = 2. We can plug that slope and our point (1, 2) into the point-slope formula: That gives:

$$y - 2 = 2(x - 1)$$

A little rearrangement gives us

$$y = 2x - 2 + 2$$

... and finally a very simple equation for our function:

$$y = 2x$$

Both lines are plotted on the graph below. I'll leave it to you to find the equation of the first graph; the result is y = 2x + 1. You can see that these two equations don't differ in slope (m = 2), but one line (y = 2x + 1) is shifted upward by 1 unit on the graph. X

Perpendicular lines

Two lines that are perpendicular in the same plane have reciprocal slopes of opposite sign. If the slope of a line is m, then the slope of any line perpendicular to it is -1/m

Problem: Find the equation of a line that passes through the point (-1, 4) and is perpendicular to the line passing through points (2, 7) and (-1, -3).

Here again (see example 3) we first calculate the slope of the line for which we have enough information:

\begin{align} m = \frac{y_2 - y_1}{x_2 - x_1} &= \frac{-3 -7}{-1 -2} \\ \\ &= \frac{-10}{-3} = \frac{10}{3} \end{align}

Now the slope of a line perpendicular to that line is $$m_{\perp} = \frac{-3}{10}$$

Now we can plug that slope and the one point we know that lies along our new line, (-1, 4), into the point-slope formula: That give us

$$y - 4 = \frac{-3}{10} (x + 1)$$

multiplying through and moving the 4 to the right by addition (note that I've converted it to 40/10 so I have a common denominator), we get

$$y = \frac{-3}{10} x - \frac{3}{10} + \frac{40}{10}$$

The slope-intercept form of the equation of our new line is

$$y = \frac{-3}{1-}x + \frac{37}{10}$$

If we multiply through by 10 and move the x to the left by addition, we get a nicer standard form of that equation:

$$3x + 10y = 37$$

I'll leave it to you to find the standard form of the equation of the other line. It is:

$$3y - 10x = 1$$

Now if we plot both lines on the same graph, it's easy to see that they are indeed perpendicular. X

Point-slope formula

Remember that the point-slope formula isn't a magic trick; it's just a rearrangement of the definition of the slope of a line. Practice problems

1. Find the equation of the line passing through these pairs of points:

 1 (-2, -2) and (6, 4) 2 (-3, 7) and (4, 2) 3 (1, 5) and (5, 1)
 4 (-8, -1) and (1, 5) 5 (4, 4) and (-6, 3) 6 (22, 4) and (-30, 18)

2. Find an equation for the lines passing through the point given and with the specified slope, m.

 7 (6, 1), m = -2 8 (-3, 6), m = 5/9 9 (-5, 5), m = 1/3
 10 (-1, -4), m = 1/4 11 (2, -5), m = -9/2 12 (18, -4), m = 0.4

A quick word on lines in more than one plane ...

Take a look at the two lines in the figure to the left. The x-y plane is meant to be in the plane of your screen, and the y-z plane is sticking out of it (there's also an x-z plane I haven't shown).

The black line is in the y-z plane, and the magenta line is in the x-y plane. They do not cross, and never do, yet they are not parallel.

We have to be careful about our understanding of geometry problems.   xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2016, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.