5.4: Graph a Line given its Equation
Learning Outcomes
- Identify the slope and y-intercept from the equation of a line.
- Plot the y-intercept of a line given its equation.
- Plot a second point on a line given the y-intercept and the slope.
- Graph a line given its equation in slope y-intercept form.
Often we are given an equation of a line and we want to visualize it. For this reason, it is important to be able to graph a line given its equation. We will look at lines that are in slope intercept form: where is the y-intercept of the line and is the slope of the line. The y-intercept is the value of where the line crosses the y-axis. The slope is the rise over run. If we write the slope as a fraction, then the numerator tells us how far to move up (or down if it is negative) and the denominator tells us how far to the right we need to go. the main application to statistics is in regression analysis which is the study of how to use a line to make a prediction about one variable based on the value of the other variable.
Example 5.4.1
Graph the line given by the equation:
Solution
We follow the three step process:
Step 1: Plot the y-intercept
The y-intercept is the number that is not associated with the . For this example, it is 1. The x-coordinate of the y-intercept is always 0. So the coordinates of the y-intercept are (0,1). Thus start at the origin and move up 1:
Step 2: Plot the Slope.
The slope of a line is the coefficient of the term. Here it is . What this means is that we rise 3 and run to the right 2. Rising 3 from an original y-coordinate of 1 gives a new y-coordinate of 4. Running 2 to the right from an initial x-coordinate of 0gives a new x-coordinate of 2. Thus we next plot the point (2,4).
Step 3: Connect the Dots
The last thing we need to do is connect the dots with a line:
Example 5.4.2
A study was done to look at the relationship between the weight of a car, , in tons and its gas mileage in mpg, . The equation of the regression line was found to be:
Graph this line.
Solution
The fist step is to note that the y-intercept is 110, hence the graph goes through the point (0,110). The next step is to see that the slope is -70. We can always put a number over 1 in order to make it a fraction. The slope of tells us that goes down by 70 if goes up by 1. We use this to find the second point. The y-coordinate is: . The x-coordinate is 1. Thus, a second point is (1,40). We can now plot the two points and connect the dots with a line.
Exercise
VIDEO RESOURCES
SECTION WRAP-UP