Before you get started, take this readiness quiz.
We have graphed linear equations by plotting points, using intercepts, recognizing horizontal and vertical lines, and using the point–slope method. Once we see how an equation in slope–intercept form and its graph are related, we’ll have one more method we can use to graph lines.
In Graph Linear Equations in Two Variables, we graphed the line of the equation \(y=12x+3\) by plotting points. See Figure \(\PageIndex\). Let’s find the slope of this line.
The red lines show us the rise is \(1\) and the run is \(2\). Substituting into the slope formula:
What is the \(y\)-intercept of the line? The \(y\)-intercept is where the line crosses the \(y\)-axis, so \(y\)-intercept is \((0,3)\). The equation of this line is:
Notice, the line has:
3 in the y-intercept is colored blue." />
When a linear equation is solved for \(y\), the coefficient of the \(x\)-term is the slope and the constant term is the \(y\)-coordinate of the \(y\)-intercept. We say that the equation \(y=\fracx+3\) is in slope–intercept form.
3 in the y-intercept is colored blue. Below that statement is the equation y equals one half x, plus 3. The fraction one half is colored red and the number 3 is colored blue. Below the equation is another equation y equals m x, plus b. The variable m is colored red and the variable b is colored blue." />
The slope–intercept form of an equation of a line with slope \(m\) and \(y\)-intercept, \((0,b)\) is,
Sometimes the slope–intercept form is called the “y-form.”
Use the graph to find the slope and \(y\)-intercept of the line, \(y=2x+1\).
Compare these values to the equation \(y=mx+b\).
Solution
To find the slope of the line, we need to choose two points on the line. We’ll use the points \((0,1)\) and \((1,3)\).
Find the rise and run. | |
Find the \(y\)-intercept of the line. | The \(y\)-intercept is the point \((0, 1)\). |
The slope is the same as the coefficient of \(x\) and the \(y\)-coordinate of the \(y\)-intercept is the same as the constant term.
Use the graph to find the slope and \(y\)-intercept of the line \(y=\fracx−1\). Compare these values to the equation \(y=mx+b\).
Answer
slope \(m = \frac\) and \(y\)-intercept \((0,−1)\)
Use the graph to find the slope and \(y\)-intercept of the line \(y=\fracx+3\). Compare these values to the equation \(y=mx+b\).
Answer
slope \(m = \frac\) and \(y\)-intercept \((0,3)\)
In Understand Slope of a Line, we graphed a line using the slope and a point. When we are given an equation in slope–intercept form, we can use the \(y\)-intercept as the point, and then count out the slope from there. Let’s practice finding the values of the slope and \(y\)-intercept from the equation of a line.
Identify the slope and \(y\)-intercept of the line with equation \(y=−3x+5\).
Solution
We compare our equation to the slope–intercept form of the equation.
Write the equation of the line. | |
Identify the slope. | |
Identify the \(y\)-intercept. |
Identify the slope and \(y\)-intercept of the line \(y=\fracx−1\).
Answer
Identify the slope and \(y\)-intercept of the line \(y=−\fracx+1\).
Answer
When an equation of a line is not given in slope–intercept form, our first step will be to solve the equation for \(y\).
Identify the slope and \(y\)-intercept of the line with equation \(x+2y=6\).
Solution
This equation is not in slope–intercept form. In order to compare it to the slope–intercept form we must first solve the equation for \(y\).
Solve for \(y\). | \(x+2y=6\) |
Subtract x from each side. | |
Divide both sides by \(2\). | |
Simplify. | |
(Remember: \(\frac = \frac + \frac\)) | |
Simplify. | |
Write the slope–intercept form of the equation of the line. | |
Write the equation of the line. | |
Identify the slope. | |
Identify the \(y\)-intercept. |
Identify the slope and \(y\)-intercept of the line \(x+4y=8\).
Answer
Identify the slope and \(y\)-intercept of the line \(3x+2y=12\).
Answer
Now that we know how to find the slope and \(y\)-intercept of a line from its equation, we can graph the line by plotting the \(y\)-intercept and then using the slope to find another point.
Graph the line of the equation \(y=4x−2\) using its slope and \(y\)-intercept.
Solution
Graph the line of the equation \(y=4x+1\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(y=2x−3\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(y=−x+4\) using its slope and \(y\)-intercept.
Solution
\(y=mx+b\) | |
The equation is in slope–intercept form. | \(y=−x+4\) |
Identify the slope and \(y\)-intercept. | \(m=−1\) |
\(y\)-intercept is \((0, 4)\) | |
Plot the \(y\)-intercept. | See graph below. |
Identify the rise and the run. | \(m = \frac\) |
Count out the rise and run to mark the second point. | rise \(−1\), run \(1\) |
Draw the line. | |
To check your work, you can find another point on the line and make sure it is a solution of the equation. In the graph we see the line goes through \((4, 0)\). |
Graph the line of the equation \(y=−x−3\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(y=−x−1\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(y=−\fracx−3\) using its slope and \(y\)-intercept.
Solution
\(y=mx+b\) | |
The equation is in slope–intercept form. | \(y=−\fracx−3\) |
Identify the slope and \(y\)-intercept. | \(m = -\frac\); \(y\)-intercept is \((0, −3)\) |
Plot the \(y\)-intercept. | See graph below. |
Identify the rise and the run. | |
Count out the rise and run to mark the second point. | |
Draw the line. |
Graph the line of the equation \(y=−\fracx+1\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(y=−\fracx−2\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(4x−3y=12\) using its slope and \(y\)-intercept.
Solution
\(4x−3y=12\) | |
Find the slope–intercept form of the equation. | \(−3y=−4x+12\) |
\(−\frac=\frac\) | |
The equation is now in slope–intercept form. | \(y=\fracx−4\) |
Identify the slope and \(y\)-intercept. | \(m=\frac\) |
\(y\)-ntercept is \((0, −4)\) | |
Plot the \(y\)-intercept. | See graph below. |
Identify the rise and the run; count out the rise and run to mark the second point. | |
Draw the line. |
Graph the line of the equation \(2x−y=6\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(3x−2y=8\) using its slope and \(y\)-intercept.
Answer
We have used a grid with \(x\) and \(y\) both going from about \(−10\) to \(10\) for all the equations we’ve graphed so far. Not all linear equations can be graphed on this small grid. Often, especially in applications with real-world data, we’ll need to extend the axes to bigger positive or smaller negative numbers.
Graph the line of the equation \(y=0.2x+45\) using its slope and \(y\)-intercept.
Solution
We’ll use a grid with the axes going from about \(−80\) to \(80\).
\(y=mx+b\) | |
The equation is in slope–intercept form. | \(y=0.2x+45\) |
Identify the slope and \(y\)-intercept. | \(m=0.2\) |
The \(y\)-intercept is \((0, 45)\) | |
Plot the \(y\)-intercept. | See graph below. |
Count out the rise and run to mark the second point. The slope is \(m=0.2\); in fraction form this means \(m=\frac\). Given the scale of our graph, it would be easier to use the equivalent fraction \(m=\frac\). | |
Draw the line. |
Graph the line of the equation \(y=0.5x+25\) using its slope and \(y\)-intercept.
Answer
Graph the line of the equation \(y=0.1x−30\) using its slope and \(y\)-intercept.
Answer
Now that we have graphed lines by using the slope and \(y\)-intercept, let’s summarize all the methods we have used to graph lines. See Figure \(\PageIndex\).
make sure they line up, then draw the line.” The Second column is labeled “Slope–Intercept” and shows the equation y equals m x, plus b. Below the equation it reads “Find the slope and y-intercept. Start at the y-intercept, then count the slope to get a second point.” The third column is labeled “Intercepts” and shows a smaller table with four rows and two columns. The first row is a header row with the first column labeled “x” and the second labeled “y”. The second row has a 0 in the “x” column and the “y” column is blank. The second row is blank in the “x” column and has a 0 in the “y” column. The third row is blank. Below the table it reads “Find the intercepts and a third point. Plot the points, make sure they line up, then draw the line.” The fourth column is labeled “Recognize Vertical and Horizontal Lines”. Below that it reads “The equation has only one variable.” The equation x equals a is a vertical line and the equation y equals b is a horizontal line." />
Now that we have seen several methods we can use to graph lines, how do we know which method to use for a given equation?
While we could plot points, use the slope–intercept form, or find the intercepts for any equation, if we recognize the most convenient way to graph a certain type of equation, our work will be easier. Generally, plotting points is not the most efficient way to graph a line. We saw better methods in sections 4.3, 4.4, and earlier in this section. Let’s look for some patterns to help determine the most convenient method to graph a line.
Here are six equations we graphed in this chapter, and the method we used to graph each of them.
Equations #1 and #2 each have just one variable. Remember, in equations of this form the value of that one variable is constant; it does not depend on the value of the other variable. Equations of this form have graphs that are vertical or horizontal lines.
In equations #3 and #4, both \(x\) and \(y\) are on the same side of the equation. These two equations are of the form \(Ax+By=C\). We substituted \(y=0\) to find the \(x\)-intercept and \(x=0\) to find the \(y\)-intercept, and then found a third point by choosing another value for \(x\) or \(y\).
Equations #5 and #6 are written in slope–intercept form. After identifying the slope and \(y\)-intercept from the equation we used them to graph the line.
This leads to the following strategy.
Consider the form of the equation.
Determine the most convenient method to graph each line.
Solution
1. \(y=−6\)
This equation has only one variable, \(y\). Its graph is a horizontal line crossing the \(y\)-axis at \(−6\).
2. \(5x−3y=15\)
This equation is of the form \(Ax+By=C\). The easiest way to graph it will be to find the intercepts and one more point.
3. \(x=7\)
There is only one variable, \(x\). The graph is a vertical line crossing the \(x\)-axis at \(7\).
4. \(y=\fracx−1\)
Since this equation is in \(y=mx+b\) form, it will be easiest to graph this line by using the slope and \(y\)-intercept.
Determine the most convenient method to graph each line:
Determine the most convenient method to graph each line:
Many real-world applications are modeled by linear equations. We will take a look at a few applications here so you can see how equations written in slope–intercept form relate to real-world situations.
Usually when a linear equation models a real-world situation, different letters are used for the variables, instead of \(x\) and \(y\). The variable names remind us of what quantities are being measured.
The equation \(F=\fracC+32\) is used to convert temperatures, \(C\), on the Celsius scale to temperatures, \(F\), on the Fahrenheit scale.
Solution
3. Interpret the slope and \(F\)-intercept of the equation.
Even though this equation uses \(F\) and \(C\), it is still in slope–intercept form.
The slope, \(\frac\), means that the temperature Fahrenheit (\(F\)) increases \(9\) degrees when the temperature Celsius (\(C\)) increases \(5\) degrees.
The \(F\)-intercept means that when the temperature is \(0°\) on the Celsius scale, it is \(32°\) on the Fahrenheit scale.
4. Graph the equation.
We’ll need to use a larger scale than our usual. Start at the \(F\)-intercept \((0,32)\) then count out the rise of \(9\) and the run of \(5\) to get a second point. See Figure \(\PageIndex\).
The equation \(h=2s+50\) is used to estimate a woman’s height in inches, \(h\), based on her shoe size, \(s\).
The equation \(T=\fracn+40\) is used to estimate the temperature in degrees Fahrenheit, \(T\), based on the number of cricket chirps, \(n\), in one minute.
The cost of running some types business has two components—a fixed cost and a variable cost. The fixed cost is always the same regardless of how many units are produced. This is the cost of rent, insurance, equipment, advertising, and other items that must be paid regularly. The variable cost depends on the number of units produced. It is for the material and labor needed to produce each item.
Stella has a home business selling gourmet pizzas. The equation \(C=4p+25\) models the relation between her weekly cost, \(C\), in dollars and the number of pizzas, \(p\), that she sells.
Solution
1. Find Stella's cost for a week when she sells no pizzas. | |
Find \(C\) when \(p=0\). | |
Simplify. | |
Stella's fixed cost is \($25\) when she sells no pizzas. | |
2. Find the cost for a week when she sells \(15\) pizzas. | |
Find \(C\) when \(p=15\). | |
Simplify. | |
Stella's costs are \($85\) when she sells \(15\) pizzas. | |
3. Interpret the slope and \(C\)-intercept of the equation. | |
The slope, \(4\), means that the cost increases by \($4\) for each pizza Stella sells. The \(C\)-intercept means that even when Stella sells no pizzas, her costs for the week are \($25\). | |
4. Graph the equation. We'll need to use a larger scale than our usual. Start at the \(C\)-intercept \((0, 25)\) then count out the rise of \(4\) and the run of \(1\) to get a second point. |
Sam drives a delivery van. The equation \(C=0.5m+60\) models the relation between his weekly cost, \(C\), in dollars and the number of miles, \(m\), that he drives.
Loreen has a calligraphy business. The equation \(C=1.8n+35\) models the relation between her weekly cost, \(C\), in dollars and the number of wedding invitations, \(n\), that she writes.
The slope of a line indicates how steep the line is and whether it rises or falls as we read it from left to right. Two lines that have the same slope are called parallel lines. Parallel lines never intersect.
What about vertical lines? The slope of a vertical line is undefined, so vertical lines don’t fit in the definition above. We say that vertical lines that have different \(x\)-intercepts are parallel. See Figure \(\PageIndex\).
Parallel lines are lines in the same plane that do not intersect.
Let’s graph the equations \(y=−2x+3\) and \(2x+y=−1\) on the same grid. The first equation is already in slope–intercept form: \(y=−2x+3\). We solve the second equation for \(y\):
Graph the lines.
Notice the lines look parallel. What is the slope of each line? What is the \(y\)-intercept of each line?
The slopes of the lines are the same and the \(y\)-intercept of each line is different. So we know these lines are parallel.
Since parallel lines have the same slope and different \(y\)-intercepts, we can now just look at the slope–intercept form of the equations of lines and decide if the lines are parallel.
Use slopes and \(y\)-intercepts to determine if the lines \(3x−2y=6\) and \(y = \fracx + 1\) are parallel.
Solution
The equation is now in slope–intercept form.
The equation of the second line is already in slope–intercept form.
Identify the slope and \(y\)-intercept of both lines.
The lines have the same slope and different \(y\)-intercepts and so they are parallel. You may want to graph the lines to confirm whether they are parallel.
Use slopes and \(y\)-intercepts to determine if the lines \(2x+5y=5\) and \(y=−\fracx−4\) are parallel.
Answer
Use slopes and \(y\)-intercepts to determine if the lines \(4x−3y=6\) and \(y=\fracx−1\) are parallel.
Answer
Use slopes and \(y\)-intercepts to determine if the lines \(y=−4\) and \(y=3\) are parallel.
Solution
The lines have the same slope and different \(y\)-intercepts and so they are parallel.
There is another way you can look at this example. If you recognize right away from the equations that these are horizontal lines, you know their slopes are both \(0\). Since the horizontal lines cross the \(y\)-axis at \(y=−4\) and at \(y=3\), we know the \(y\)-intercepts are \((0,−4)\) and \((0,3)\). The lines have the same slope and different \(y\)-intercepts and so they are parallel.
Use slopes and \(y\)-intercepts to determine if the lines \(y=8\) and \(y=−6\) are parallel.
Answer
Use slopes and \(y\)-intercepts to determine if the lines \(y=1\) and \(y=−5\) are parallel.
Answer
Use slopes and \(y\)-intercepts to determine if the lines \(x=−2\) and \(x=−5\) are parallel.
Solution
Since there is no \(y\), the equations cannot be put in slope–intercept form. But we recognize them as equations of vertical lines. Their \(x\)-intercepts are \(−2\) and \(−5\). Since their \(x\)-intercepts are different, the vertical lines are parallel.
Use slopes and \(y\)-intercepts to determine if the lines \(x=1\) and \(x=−5\) are parallel.
Answer
Use slopes and \(y\)-intercepts to determine if the lines \(x=8\) and \(x=−6\) are parallel.
Answer
Use slopes and \(y\)-intercepts to determine if the lines \(y=2x−3\) and \(−6x+3y=−9\) are parallel. You may want to graph these lines, too, to see what they look like.
Solution
The second equation is now in slope–intercept form as well.
Identify the slope and \(y\)-intercept of both lines.
The lines have the same slope, but they also have the same \(y\)-intercepts. Their equations represent the same line. They are not parallel; they are the same line.
Use slopes and \(y\)-intercepts to determine if the lines \(y=−\fracx+1\) and \(x+2y=2\) are parallel.
Answer
not parallel; same line
Use slopes and \(y\)-intercepts to determine if the lines \(y=\fracx−3\) and \(3x−4y=12\) are parallel.
Answer
not parallel; same line
Let’s look at the lines whose equations are \(y=\fracx−1\) and \(y=−4x+2\), shown in Figure \(\PageIndex\).
These lines lie in the same plane and intersect in right angles. We call these lines perpendicular.
What do you notice about the slopes of these two lines? As we read from left to right, the line \(y=\fracx−1\) rises, so its slope is positive. The line \(y=−4x+2\) drops from left to right, so it has a negative slope. Does it make sense to you that the slopes of two perpendicular lines will have opposite signs?
If we look at the slope of the first line, \(m_=\frac\), and the slope of the second line, \(m_=−4\), we can see that they are negative reciprocals of each other. If we multiply them, their product is \(−1\).
This is always true for perpendicular lines and leads us to this definition.
Perpendicular lines are lines in the same plane that form a right angle.
If \(m_\) and \(m_\) are the slopes of two perpendicular lines, then:
Vertical lines and horizontal lines are always perpendicular to each other.
We were able to look at the slope–intercept form of linear equations and determine whether or not the lines were parallel. We can do the same thing for perpendicular lines.
We find the slope–intercept form of the equation, and then see if the slopes are negative reciprocals. If the product of the slopes is \(−1\), the lines are perpendicular. Perpendicular lines may have the same \(y\)-intercepts.
Use slopes to determine if the lines, \(y=−5x−4\) and \(x−5y=5\) are perpendicular.
Solution
The first equation is already in slope–intercept form: \(\quad y=−5x−4\)
The second equation is now in slope-intercept form as well.
The slopes are negative reciprocals of each other, so the lines are perpendicular. We check by multiplying the slopes,
Use slopes to determine if the lines \(y=−3x+2\) and \(x−3y=4\) are perpendicular.
Answer
Use slopes to determine if the lines \(y=2x−5\) and \(x+2y=−6\) are perpendicular.
Answer
Use slopes to determine if the lines, \(7x+2y=3\) and \(2x+7y=5\) are perpendicular.
Solution
The slopes are reciprocals of each other, but they have the same sign. Since they are not negative reciprocals, the lines are not perpendicular.
Use slopes to determine if the lines \(5x+4y=1\) and \(4x+5y=3\) are perpendicular.
Answer
Use slopes to determine if the lines \(2x−9y=3\) and \(9x−2y=1\) are perpendicular.
Answer
Access this online resource for additional instruction and practice with graphs.
parallel lines Lines in the same plane that do not intersect. perpendicular lines Lines in the same plane that form a right angle. slope-intercept form of an equation of a line The slope–intercept form of an equation of a line with slope mm and \(y\)-intercept, \((0,b)\) is, \(y=mx+b\).
This page titled 4.5: Use the Slope–Intercept Form of an Equation of a Line is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.