5.3: Find the Equation of a Line given its Graph
Learning Outcomes
- Find the slope of a line given its graph.
- Find the y-intercept of a line given its graph.
- Find the equation of a line given its graph.
There are two main ways of representing a line: the first is with its graph, and the second is with its equation. In this section, we will practice how to find the equation of the line if we are given the graph of the line. The two key numbers in the equation of a line are the slope and the y-intercept. Thus the main steps in finding the equation of a line are finding the slope and finding the y-intercept. In statistics we are often presented with a scatterplot where we can eyeball the line. Once we have the graph of the line, getting the equation is helpful for making predictions based on the line.
Finding the Slope of a Line Given Its Graph
The steps to follow to fine the slope of the line given its graph are the following.
Step 1: Identify two points on the line. Any two points will do, but it is recommended to find points with nice and coordinates.
Step 2: The slope is the rise over the run. Thus if the points have coordinates and , then the slope is:
Example 5.3.1
Find the slope of the line shown below.
Solution
First, we locate points on the line that are as easy as possible to work with. The points with integer coordinates are (0,-4) and (2,2).
Next, we use the rise over run formula to find the slope of the line.
Finding the y-intercept from the graph
If the portion of the graph that is in view includes the y-axis, then the y-intercept is very easy to spot. You just see where it crosses the y-axis. On the other hand, if the portion of the graph in view does not contain the y-axis, then it is best to first find the equation of the line and then use the equation to find the y-intercept.
Example 5.3.2
Find the y-intercept of the line shown below.
Solution
We just look at the line and notice that it crosses the y-axis at . Therefore, the y-intercept is 1 or (0,1).
Finding the equation of the line given its graph
If you are given the graph of a line and want to find its equation, then you first find the slope as in Example . Then you use one of the points you found when you computed the slope, , and put it into the point slope equation:
Then you multiply the slope through and add to both sides to get by itself.
Example 5.3.3
Find the equation of the line shown below.
Solution
First we find the slope by identifying two nice points. Notice that the line passes through (0,-1) and (3,1). Now compute the slope using the rise over run formula:
Next use the point slope equation with the point (0,-1).
Now simplify:
Finally subtract 1 from both sides to get:
Example 5.3.4
A study was done to look at the relationship between the square footage of a house and the price of the house. The scatter plot and regression line are shown below. Find the equation of the regression line.
Solution
First we find the slope by identifying two nice points. You will have to eyeball it and notice that the line passes through (1600, 300000) and (2000,400000). Now compute the slope using the rise over run formula:
Next use the point slope equation with the point (2000,400000).
Now simplify:
Finally add 400000 to both sides to get:
Notice that although the y-intercept is not visible from the graph of the line, we can see from the equation of the line that the y-intercept is -100000 or (0,-100000).
Exercise
VIDEO RESOURCES
SECTION WRAP-UP