Corequisite Skills for Introductory StatisticsXYZ Homework Edition

6.6 Finding the Equation of a Line

Finding the Equation of a Line

A source-bound narrated opening with a worked example, an eight-second thinking pause, a checked result, English captions, and a transcript.

How do online retailers know that ‘you may also like’ a particular item based on something you just ordered? How can economists know how a rise in the minimum wage will affect the unemployment rate? How do medical researchers create drugs to target cancer cells? How can traffic engineers predict the effect on your commuting time of an increase or decrease in gas prices? It’s all mathematics.

You are at an exciting point in your mathematical journey as the mathematics you are studying has interesting applications in the real world.

The physical sciences, social sciences, and the business world are full of situations that can be modeled with linear equations relating two variables. Data is collected and graphed. If the data points appear to form a straight line, an equation of that line can be used to predict the value of one variable based on the value of the other variable.

To create a mathematical model of a linear relation between two variables, we must be able to find the equation of the line. In this section we will look at several ways to write the equation of a line. The specific method we use will be determined by what information we are given.

Find an Equation of the Line Given the Slope and y-Intercept

We can easily determine the slope and intercept of a line if the equation was written in slope–intercept form, y=mx+b. Now, we will do the reverse—we will start with the slope and y-intercept and use them to find the equation of the line.

Sometimes, the slope and intercept need to be determined from the graph.

Find an Equation of the Line Given Two Points

When real-world data is collected, a linear model can be created from two data points. In the next example we’ll see how to find an equation of a line when just two points are given.

We have two options so far for finding an equation of a line: slope–intercept or point–slope. Since we will know two points, it will make more sense to use the point–slope form.

But then we need the slope. Can we find the slope with just two points? Yes. Then, once we have the slope, we can use it and one of the given points to find the equation.

We have seen that we can use either the slope–intercept form or the point–slope form to find an equation of a line. Which form we use will depend on the information we are given. This is summarized in Table 6.17.

Practice Makes Perfect

Find an Equation of the Line Given the Slope and y-Intercept

In the following exercises, find the equation of a line with given slope and y-intercept. Write the equation in slope–intercept form.

slope 3 and y-intercept (0,5)

slope 4 and y-intercept (0,1)

Show solution

y=4x+1

slope 6 and y-intercept (0,−4)

slope 8 and y-intercept (0,−6)

Show solution

y=8x−6

slope −1 and y-intercept (0,3)

slope −1 and y-intercept (0,7)

Show solution

y=−x+7

slope −2 and y-intercept (0,−3)

slope −3 and y-intercept (0,−1)

Show solution

y=−3x−1

slope 35 and y-intercept (0,−1)

slope 15 and y-intercept (0,−5)

Show solution

y=15x−5

slope −34 and y-intercept (0,−2)

slope −23 and y-intercept (0,−3)

Show solution

y=−23x−3

slope 0 and y-intercept (0,−1)

slope 0 and y-intercept (0,2)

Show solution

y=2

slope −3 and y-intercept (0,0)

slope −4 and y-intercept (0,0)

Show solution

y=−4x

In the following exercises, find the equation of the line shown in each graph. Write the equation in slope–intercept form.

A line passes through the y-intercept (0, -5) and marked point (1, -2); its x-intercept is (5/3, 0). Labeled ticks run from -6 to 6 on both axes.
A descending line passes through (0, 4) and the marked x-intercept (2, 0). Labeled ticks run from -6 to 6 on both axes.
Show solution

y=−2x+4

An ascending line passes through (0, -3) and the marked x-intercept (6, 0). Labeled ticks run from -8 to 8 on both axes.
An ascending line passes through (0, 2) and marked point (4, 5); its x-intercept is (-8/3, 0). Labeled ticks run from -6 to 6 on both axes.
Show solution

y=34x+2

A descending line passes through the y-intercept (0, 3) and marked point (3, -1); its x-intercept is (9/4, 0). Labeled ticks run from -6 to 6 on both axes.
A descending line passes through (0, -1) and marked point (2, -4); its x-intercept is (-2/3, 0). Labeled ticks run from -6 to 6 on both axes.
Show solution

y=−32x−1

A horizontal line y = -2 passes through the marked point (2, -2). Labeled ticks run from -6 to 6 on both axes.
A horizontal line y = 6 passes through the marked point (-3, 6). Labeled ticks run from -8 to 8 on both axes.
Show solution

y=6

Find an Equation of the Line Given Two Points

In the following exercises, find the equation of a line containing the given points. Write the equation in slope–intercept form when possible. For a vertical line, give its equation in the form x = a and explain why slope–intercept form is not possible.

(2,6) and (5,3)

(3,1) and (2,5)

Show solution

y=−4x+13

(4,3) and (8,1)

(2,7) and (3,8)

Show solution

y=x+5

(−3,−4) and (5,−2)

(−5,−3) and (4,−6)

Show solution

y=−13x−143

(−1,3) and (−6,−7)

(−2,8) and (−4,−6)

Show solution

y=7x+22

(6,−4) and (−2,5)

(3,−2) and (−4,4)

Show solution

y=−67x+47

(0,4) and (2,−3)

(0,−2) and (−5,−3)

Show solution

y=15x−2

(7,2) and (7,−2)

(4,2) and (4,−3)

Show solution

x=4

(−7,−1) and (−7,−4)

(−2,1) and (−2,−4)

Show solution

x=−2

(6,1) and (0,1)

(6,2) and (−3,2)

Show solution

y=2

(3,−4) and (5,−4)

(−6,−3) and (−1,−3)

Show solution

y=−3

(4,3) and (8,0)

(0,0) and (1,4)

Show solution

y=4x

(−2,−3) and (−5,−6)

(−3,0) and (−7,−2)

Show solution

y=12x+32

(8,−1) and (8,−5)

(3,5) and (−7,5)

Show solution

y=5

Corequisite Skills for Introductory Statistics is a custom course edition compiled for Introductory Statistics corequisite courses from OpenStax Contemporary Mathematics, Elementary Algebra 2e, Intermediate Algebra 2e, Prealgebra 2e. Content by OpenStax is reproduced as published, apart from any corrections recorded for this edition. Sections are renumbered to follow the course outline. The course outline is adapted from Larry Green's Support Course for Elementary Statistics (LibreTexts, https://stats.libretexts.org/Bookshelves/Introductory_Statistics/Support_Course_for_Elementary_Statistics), used under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Lessons 2.4 and 6.7 are written for this edition by XYZ Homework. Every OpenStax lesson is abridged to the subsections and practice exercises this course uses. Lessons are headed with their course titles, not the source section titles. Access the complete originals free at openstax.org. License: CC-BY-NC-SA-4.0.

⇩ Download ▾

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.