Chapter 6 ยท Proportional relationships, lines, and slope
Graphing Lines and Writing Equations from Graphs
Graph a line from its equation by plotting where it crosses the vertical axis and stepping with the slope. Then read a graph to write the equation of its line.
In the last lesson you worked with equations in slope-intercept form, . You read two numbers from them: the slope , which is how much changes each time increases by , and the -intercept , which is the value of when . The graph of an equation like this is a straight line, so it is called a linear equation.
Now you will connect those two numbers to a picture. First you will turn an equation into a graph. Then you will go the other way and turn a graph into an equation.
Every graph in this lesson is drawn on a coordinate plane. The horizontal axis shows and the vertical axis shows . Both are plain numbers with no units, and the grid lines are apart.
Start with one equation: , where and . The table that follows lists exact pairs of values that make this equation true. Look for the two numbers in it.
- When , . Every point with lies on the -axis, so the line crosses the -axis at . That is what looks like on a graph.
- Each time goes up by , goes up by . On a graph, a change in is a sideways move called the run, and a change in is an up-or-down move called the rise. Here a run of to the right goes with a rise of up. That is what looks like on a graph: .
| x | Work for 2x + 1 | y | Point on the line |
|---|---|---|---|
Key concept
One line, two facts: slope and y-intercept
Every non-vertical line (any line that is not straight up and down) has exactly one equation in slope-intercept form. The equation and the graph hold the same two facts.
- is where the line crosses the -axis: at the point .
- is how the line moves: , so a run of to the right changes by .
Equation to graph: plot , use the slope to step to a second point, and draw the line through both.
Graph to equation: read on the -axis, find from two exact points, and write the equation.
A vertical line has an undefined slope, so it has no equation of this form.
Worked example
Graph a line with a whole-number slope
Graph the line on a coordinate plane. The horizontal axis shows , the vertical axis shows , both are plain numbers with no units, and the grid lines are apart.
Read the slope and the y-intercept from the equation. Compared with y = mx + b, the number multiplying x is m and the number added is b.
Plot the y-intercept first. When x is 0, the equation gives y = 1, so the line crosses the y-axis at the point (0, 1).
Use the slope to step to a second point. A slope of 2 is a rise of 2 for a run of 1. From (0, 1), move 1 to the right and 2 up. You land on (1, 3).
Check the new point. A point is on the graph exactly when its coordinates make the equation true, so substitute x = 1 and see whether y comes out as 3.
Draw the straight line through (0, 1) and (1, 3). Only one straight line passes through two different points, so these two points fix the graph. Extend the line past both points, because x can be any number.
Answer
The graph of is the straight line through and . It rises for every it moves to the right, as the figure that follows shows.
Worked example
Graph a line with a negative fraction slope
Graph the line on a coordinate plane with on the horizontal axis and on the vertical axis. Both are plain numbers with no units, and the grid lines are apart.
Read the slope and the y-intercept from the equation. The slope is negative, so y goes down as x goes up.
Plot the y-intercept. When x is 0, y is 4, so the line crosses the y-axis at (0, 4).
Read the slope as rise over run, with the negative sign on the rise: a run of 3 to the right goes with a rise of -2, which is 2 down. A run of 3 lands exactly on a grid point. From (0, 4), move 3 right and 2 down to (3, 2).
Check (3, 2) in the equation. Two-thirds of 3 is 2, so the product is -2, and -2 + 4 = 2. The point is on the line.
Take the same step again for a third point: 3 right and 2 down from (3, 2) is (6, 0). Check it the same way.
Draw the straight line through (0, 4), (3, 2) and (6, 0). All three points make the equation true, so this line is the graph. Extend it in both directions.
Answer
The graph of is the straight line through , and . It falls for every it moves to the right, as the figure that follows shows.
Now reverse the process. The graph of a non-vertical line shows the same two facts, so you can read them and write the equation.
- Find . Look at the point where the line crosses the -axis. That point is . In this lesson the crossing is always a point you can read exactly.
- Find . Choose two points on the line whose coordinates you know exactly. Divide the change in by the change in , subtracting in the same order both times. The change in is not , because the line is not vertical. On a non-vertical line, any two different points give the same slope, so pick the two that are easiest to read.
Trust coordinates, not looks. A line can seem steep or flat, but only exact points give exact values of and . Try it with the line in the figure that follows.
Worked example
Write the equation of a line from its graph
The figure before this example shows a line on a coordinate plane with on the horizontal axis and on the vertical axis. Both are plain numbers with no units, and the grid lines are apart. The line passes through Point B at and Point C at . Write the equation of the line in slope-intercept form.
Read the y-intercept. Point B has an x-coordinate of 0, so it is the point where the line crosses the y-axis. Its y-coordinate is b.
Find the slope from Point B to Point C. On the graph you move 4 to the right and 3 up. In symbols, subtract the coordinates of B from the coordinates of C, in the same order on top and bottom. Subtracting -2 is the same as adding 2.
Put m and b into y = mx + b. Adding -2 is the same as subtracting 2.
Check with a point you have not used yet. Point D is at (-4, -5). Substitute x = -4 into your equation and see whether y comes out as -5. Three-fourths of -4 is -3.
Answer
The equation of the line is . Its slope is and its -intercept is . Because is not , the line does not pass through the origin, so it is linear but not proportional.
Takeaway. For any non-vertical line, the equation and the graph tell you the same two facts. The -intercept gives a starting point, . The slope gives the step, . To graph a line, plot the starting point and take the step. To write an equation, read the starting point and measure the step between two exact points. Either way, test one more point in the equation to check your work.
Next, you will write a linear equation from any two points, see why lines through the origin and lines through a -intercept have the equations they do, and practice finding and fixing errors in linear equations.