Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Writing an Equation from a Graph

Author: Sophia

what's covered
In this lesson, you will learn how to select an equation in slope-intercept form by using a graph. Specifically, this lesson will cover:

Table of Contents

1. Slope and Intercepts

Before we begin to write equations from a graph, let's review some important information about the graphs of lines: slopes and intercepts. Being able to easily identify slopes and intercepts from a graph will be extremely useful when writing the equation to the line.

The slope of a line can be found by using any two points on a graph. All we need are the x- and y-coordinates from two points to plug into our equation for slope:

formula to know
Slope
m equals fraction numerator y subscript 2 minus y subscript 1 over denominator x subscript 2 minus x subscript 1 end fraction

Intercepts are where the line crosses a particular axis.

  • The x-intercept is the location where the line crosses the x-axis, and it has coordinates of (x, 0).
  • The y-intercept is the location where the line crosses the y-axis, and it has coordinates of (0, y).
big idea
At the x-intercept, y equals 0, and at the y-intercept, x equals 0.


2. When the y-Intercept Is Visible

If the y-intercept of a line is displayed on the graph, we will want to write the equation in slope-intercept form, because part of the equation contains the y-intercept itself, or at least the y-coordinate of it. Slope-intercept form is y equals m x plus b, where b is the y-coordinate of the y-intercept. The only other thing we will need to solve for is the slope.

EXAMPLE

Find the equation of the line graphed below:



Here, the y-intercept is clearly displayed on our graph. The line intercepts the y-axis at the point (0, 2). This means that our b-value is 2 in our equation written in slope-intercept form.

Now we just need to calculate slope. To calculate slope, we can identify another point on our line and plug the coordinates into the formula for slope. Let's use the point (2, 5), which is also on our line.

m equals fraction numerator y subscript 2 minus y subscript 1 over denominator x subscript 2 minus x subscript 1 end fraction Use the slope formula and substitute in the two points: open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 0 comma space 2 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses equals open parentheses 2 comma space 5 close parentheses
m equals fraction numerator 5 minus 2 over denominator 2 minus 0 end fraction Evaluate the numerator and denominator
m equals 3 over 2 The slope

Now that we have the slope, 3 over 2, and the y-coordinate of the y-intercept, 2, we can write the equation of the line in slope-intercept form:

y equals 3 over 2 x plus 2


3. When the y-intercept Is Not Visible

In our first example, we saw how helpful it was to use the y-intercept on the graph to design our equation. Sometimes, the y-intercept is not visible on the graph, but we can calculate it algebraically. The first thing we'll want to do in this situation is locate any two points on the graph and calculate the slope. From there, we will be able to plug in fixed values for everything else in slope-intercept form, thus allowing us to solve for b.

EXAMPLE

Write the equation to the line graphed below:



Since we cannot easily determine the y-intercept graphically, let's identify two points that we can see on the graph and calculate the slope of this line. We'll choose the points (3, 5) and (4, 2).

m equals fraction numerator y subscript 2 minus y subscript 1 over denominator x subscript 2 minus x subscript 1 end fraction Use the slope formula and substitute in the two points: open parentheses x subscript 1 comma space y subscript 1 close parentheses equals open parentheses 3 comma space 5 close parentheses and open parentheses x subscript 2 comma space y subscript 2 close parentheses equals open parentheses 4 comma space 2 close parentheses
m equals fraction numerator 2 minus 5 over denominator 4 minus 3 end fraction Evaluate the numerator and denominator
m equals fraction numerator short dash 3 over denominator 1 end fraction Simplify
m equals short dash 3 The slope

Now that we found the slope of the line to be -3, we can say that the equation so far is y equals short dash 3 x plus b. We just need to solve for b. To do this, we can take any point on the line, plug in the coordinates of that point for x and y in the equation, and solve for b. To make things easier, we can choose either of the two points we have already identified when we calculated the slope. Let's use the point (4, 2). This means that we will plug in 4 for x and 2 for y in the equation y equals short dash 3 x plus b.

y equals short dash 3 x plus b Using the equation that we have so far, plug in a point on the line, for instance, (4, 2). Substitute 4 for x and 2 for y
2 equals short dash 3 open parentheses 4 close parentheses plus b Multiply -3 and 4
2 equals short dash 12 plus b Add 12 to both sides
14 equals b The y-coordinate of the y-intercept

Now that we have the slope, -3, and the y-coordinate of the y-intercept, 14, we can write the equation of the line in slope-intercept form:

The equation of the line is y equals short dash 3 x plus 14.

hint
If the original graph was extended vertically, we would have been able to see the y-intercept at (0, 14).

summary
Being able to easily identify the slope and intercepts from a graph will be extremely useful when writing the equation to the line. The slope of a line can be found by locating any two points on a line, and using the coordinates in the slope formula. The y-intercept is the point where the line crosses the y-axis, at x equals 0. Remember, the x-intercept is the point where the line crosses the x-axis, or at y equals 0. When the y-intercept is visible, we can use the y-coordinate, calculate the slope, and write the equation. When the y-intercept is NOT visible, first locate any two points, calculate the slope, and then substitute the value for slope and any point on the line for the variables m, x, and y in the slope-intercept equation and solve for b.

Source: ADAPTED FROM "BEGINNING AND INTERMEDIATE ALGEBRA" BY TYLER WALLACE, AN OPEN SOURCE TEXTBOOK AVAILABLE AT www.wallace.ccfaculty.org/book/book.html. License: Creative Commons Attribution 3.0 Unported License

Formulas to Know
Slope

m equals fraction numerator y subscript 2 minus y subscript 1 over denominator x subscript 2 minus x subscript 1 end fraction