xaktly | Geometry | Algebra

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.

The equation of a line has the form

$$y = ax + b$$

In function form it looks like this

$$f(x) = ax + b$$

where $a$ and $b$ are constants (numbers). The most important feature of a linear equation is that the powers of $x$ and $y$ are one. Note that we always write $x^1$ as just $x$.


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 $\Delta x / \Delta 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.


Linear transformations


We can think of lines in a different way, as functions of the independent variable, $x$.

$$y = mx + b$$

where the slope, $m$, is a vertical scaling parameter, which stretches or shrinks the grap of the line vertically, and $b$ is a vertical translational parameter. It moves the graph up and down. In the end, that's all we need to fully describe a line in a plane: Where is it located — that's the y-intercept, just a point that pins the line to some location on the pland, and how steeply it's sloped.

You can move the sliders under the graph to change those parameters between -10 and 10 to see what effect they have on the graph.



Notice that for a line, translating it up and down is equivalent to moving it right or left. You can see that very clearly if you just twiddle the y-intercept slider; the line will also appear to move right ↔ left, depending on how you look at it.

In function notation, a linear function looks like

$$f(x) = mx + b$$

and the function $f(x) = x$ is the parent function of all lines, the simplest line we can draw.





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{ and } \; (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.



Example 4

Find the equation of a line perpendicular to another


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}{10}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

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


1.   (-2, -2) and (6, 4)

Solution

First find the slope:

$$m = \frac{4 - (-2)}{6 - (-2)} = \frac{4 + 2}{6 + 2} = \frac{6}{8} = \frac{3}{4}$$

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 4 &= \frac{3}{4} (x - 6) \\[4pt] y - 4 &= \frac{3}{4} x - \frac{18}{4} \\[4pt] y &= \frac{3}{4} x - \frac{9}{2} + \frac{8}{2} \\[4pt] y &= \frac{3}{4} x - \frac{1}{2} \end{align}$$

We can also put this into standard form by multiplying through by the greatest-common multiple of 4 and 2, the denominators (multiply by 4):

$$ \begin{align} 4y &= 3x - 2 \\[4pt] 3x - 4y &= 2 \end{align}$$


2.   (-3, 7) and (4, 2)

Solution

First find the slope:

$$m = \frac{2 - 7}{4 - (-3)} = \frac{-5}{7}$$

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 2 &= \frac{-5}{7} (x - 4) \\[4pt] y - 2 &= \frac{-5}{7} x + \frac{20}{7} \\[4pt] y &= \frac{-5}{7} x + \frac{20}{7} + \frac{14}{7} \\[4pt] y &= \frac{-5}{7} x + \frac{34}{7} \end{align}$$

We can also put this into standard form by multiplying through by 7:

$$ \begin{align} 7y &= -5x + 34 \\[4pt] 5x + 7y &= 34 \end{align}$$


3.   (1, 5) and (5, 1)

Solution

First find the slope:

$$m = \frac{1 - 5}{5 - 1} = \frac{-4}{4} = -1$$

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 1 &= -1 (x - 5) \\[4pt] y &= -x + 5 + 1 \\[4pt] y &= -x + 6 \\[4pt] \text{or } x + y &= 6 \end{align}$$

4.   (-8, -1) and (1, 5)

Solution

First find the slope:

$$m = \frac{5 - (-1)}{1 - (-8)} = \frac{5 + 1}{1 + 8} = \frac{6}{9} = \frac{2}{3}$$

By the point-slope the method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 5 &= \frac{2}{3} (x - 1) \\[4pt] y - 5 &= \frac{2}{3} x - \frac{2}{3} \\[4pt] y &= -\frac{2}{3} x - \frac{2}{3} + \frac{15}{3} \\[4pt] y &= \frac{2}{3} x + \frac{13}{3} \\[4pt] \text{or } \; 3y - 2x &= 13 \end{align}$$


5.   (4, 4) and (-6, 3)

Solution

First find the slope:

$$m = \frac{3 - 4}{-6 - 4} = \frac{-1}{-10} = \frac{1}{10}$$

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 4 &= \frac{1}{10} (x - 4) \\[4pt] y - 4 &= \frac{1}{10} x - \frac{4}{10} \\[4pt] y &= \frac{1}{10} x - \frac{4}{10} + \frac{40}{10} \\[4pt] y &= \frac{1}{10} x + \frac{36}{10} \tag{1} \\[4pt] \text{or } \; y &= \frac{1}{10} x + \frac{18}{5} \end{align}$$

We can also put this into standard form by multiplying equation (1) through by 10:

$$ \begin{align} 10y &= x + 36 \\[4pt] x - 10y &= -36 \end{align}$$


6.   (22, 4) and (-30, 18)

Solution

First find the slope:

$$m = \frac{18 - 4}{-30 - 22} = \frac{14}{-52} = \frac{-7}{26}$$

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 4 &= \frac{-7}{26} (x - 22) \\[4pt] y - 4 &= \frac{-7}{26} x + \frac{77}{13} \\[4pt] y &= -\frac{7}{26} x + \frac{77}{13} + \frac{52}{13} \\[4pt] y &= -\frac{7}{26} x + \frac{129}{13} \\[4pt] \text{or } 7x + 26y = 258 \end{align}$$


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


7.   (-3, 6), m = 5/9

Solution

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 6 &= \frac{5}{9} (x + 3) \\[4pt] y - 6 &= \frac{5}{9} x + \frac{15}{9} \\[4pt] y &= \frac{5}{9} x + \frac{15}{9} + \frac{54}{9} \\[4pt] y &= \frac{5}{9} x + \frac{69}{9} \\[4pt] y &= \frac{5}{9} x + \frac{23}{3} \\[4pt] \text{or } 9y - 5x &= 69 \end{align}$$


8.   (22, 4), m = -7/26

Solution

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y - 4 &= \frac{-7}{26} (x - 22) \\[4pt] y - 4 &= \frac{-7}{26} x + \frac{77}{13} \\[4pt] y &= -\frac{7}{26} x + \frac{77}{13} + \frac{52}{13} \\[4pt] y &= -\frac{7}{26} x + \frac{129}{13} \\[4pt] \text{or } 7x + 26y &= 258 \end{align}$$

9.   (2, -5), m = 9/2

Solution

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y + 5 &= \frac{9}{2} (x - 2) \\[4pt] y &= \frac{9}{2} x - 9 - 5 \\[4pt] y &= \frac{9}{2} x + 14 \\[4pt] \text{or } \; 2y - 9x &= 28 \end{align}$$


10.   (18, -4), m = 0.4

Solution

By the point-slope method:

$$ \begin{align} y - y_o &= m(x - x_o) \\[4pt] y + 4 &= 0.4 (x - 18) \\[4pt] y &= 0.4 x -7.2 - 4 \\[4pt] y &= 0.4 x - 11.2 \\[4pt] \text{or } \; 0.4 x - y &= 11.2 \end{align}$$


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.


X

Translation

Translation is motion in one or more of the three Cartesian (x, y, z) directions, or a combination of them, without any rotation.

X

Parameter

A parameter is an adjustable constant in the definition of a function that is different from the independent variable(s). Parameters are not independent variables. For example, in the quadratic function

f(x) = Ax2 + Bx + C

A, B and C are parameters which change the shape of the graph of the function. x is the independent variable. A, B and C are fixed for any particular version of f(x), but x can range from -&inf; to +&inf;

Creative Commons License   optimized for firefox
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.

<script src="js/TDistrib_xaktly.js"></script><script src="js/LinearTrans_xaktly.js"></script>