### Learning Objectives

After completing this module, you should be able to:

- Graph functions using intercepts.
- Compute slope.
- Graph functions using slope and $y$-intercept.
- Graph horizontal and vertical lines.
- Interpret graphs of functions.
- Model applications using slope and $y$-intercept.

In this section, we will expand our knowledge of graphing by graphing linear functions. There are many real-world scenarios that can be represented by graphs of linear functions. Imagine a chairlift going up at a ski resort. The journey a skier takes travelling up the chairlift could be represented as a linear function with a positive slope. The journey a skier takes down the slopes could be represented by a linear function with a negative slope.

### Graphing Functions Using Intercepts

Every linear equation can be represented by a unique line that shows all the solutions of the equation. We have seen that when graphing a line by plotting points, you can use any three solutions to graph. This means that two people graphing the line might use different sets of three points. At first glance, their two lines might not appear to be the same, since they would have different points labeled. But if all the work was done correctly, the lines should be exactly the same. One way to recognize that they are indeed the same line is to look at where the line crosses the $x$-axis and the $y$-axis. These points are called the intercepts of a line. Let us review the graphs of the lines in Figure 5.65.

The table below lists where each of these lines crosses the $x$- and $y$-axis. Do you see a pattern? For each line, the $y$-coordinate of the point where the line crosses the $x$-axis is zero. The point where the line crosses the $x$-axis has the form $\left(a,0\right)$ and is called the $x$-intercept of the line. The $x$-intercept occurs when $y$ is zero. In each line, the $x$-coordinate of the point where the line crosses the $y$-axis is zero. The point where the line crosses the $y$-axis has the form $\left(0,b\right)$ and is called the $y$-intercept of the line. The $y$-intercept occurs when $x$ is zero.

Figure |
The line crosses the $x\text{-axis}$ at: |
Ordered Pair for this Point |
The line crosses the $y\text{-axis}$ at: |
Ordered Pair for This Point |
---|---|---|---|---|

Figure (a) | 3 | $\left(3,0\right)$ | 6 | $\left(0,6\right)$ |

Figure (b) | 4 | $\left(4,0\right)$ | $-3$ | $\left(0,-3\right)$ |

Figure (c) | 5 | $\left(5,0\right)$ | $-5$ | $\left(0,-5\right)$ |

Figure (d) | 0 | $\left(0,0\right)$ | 0 | $\left(0,0\right)$ |

General Figure | $a$ | $\left(a,0\right)$ | $b$ | $\left(0,b\right)$ |

### Example 5.70

#### Finding $x$- and $y$-Intercepts

Find the $x$-intercept and $y$-intercept on the (a) and (b) graphs in Figure 5.66.

#### Solution

In Figure 5.66, the graph crosses the $x$-axis at the point $\left(4,0\right)$. The $x$-intercept is $\left(4,0\right)$. The graph crosses the $y$-axis at the point $\left(0,2\right)$. The $y$-intercept is $\left(0,2\right)$. In Figure 5.66, the graph crosses the $x$-axis at the point $\left(2,0\right)$. The $x$-intercept is $\left(2,0\right)$. The graph crosses the $y$-axis at the point $\left(0,-6\right)$. The $y$-intercept is $\left(0,-6\right)$.

### Your Turn 5.70

### Example 5.71

#### Graphing a Function Using Intercepts

Find the intercepts of $2x+y=8$. Then graph the function using the intercepts.

#### Solution

Let $y=0$ to find the $x$-intercept, and let $x=0$ to find the $y$-intercept.

$2x+y=8$ | $2x+y=8$ | ||

To find the $x$-intercept, let $y=0$. | $2x+0=8$ | To find the $y$-intercept, let $x=0$. | $2\left(0\right)+y=8$ |

Simplify. | $\begin{array}{ccc}\hfill 2x& \hfill =\hfill & 8\hfill \\ \hfill x& \hfill =\hfill & 4\hfill \end{array}$ | Simplify. | $y=8$ |

The $x$-intercept is: | $\left(4,0\right)$ | The $y$-intercept is: | $\left(0,8\right)$ |

Plot the intercepts to get the graph in Figure 5.67.

### Your Turn 5.71

### Computing Slope

When graphing linear equations, you may notice that some lines tilt up as they go from left to right and some lines tilt down. Some lines are very steep and some lines are flatter. In mathematics, the measure of the steepness of a line is called the slope of the line. To find the slope of a line, we locate two points on the line whose coordinates are integers. Then we sketch a right triangle where the two points are vertices of the triangle and one side is horizontal and one side is vertical. Next, we measure or calculate the distance along the vertical and horizontal sides of the triangle. The vertical distance is called the rise and the horizontal distance is called the run.

We can assign a numerical value to the slope of a line by finding the ratio of the rise and run. The rise is the amount the vertical distance changes while the run measures the horizontal change, as shown in this illustration. Slope (Figure 5.68) is a rate of change.

### FORMULA

To calculate slope $\left(m\right)$, use the formula

where the rise measures the vertical change and the run measures the horizontal change.

The concept of slope has many applications in the real world. In construction, the pitch of a roof, the slant of plumbing pipes, and the steepness of stairs are all applications of slope. As you ski or jog down a hill, you definitely experience slope.

### Example 5.72

#### Finding the Slope from a Graph

Find the slope of the line shown in Figure 5.69.

#### Solution

**Step 1:** Locate two points on the graph whose coordinates are integers, such as $\left(0,5\right)$ and $\left(3,3\right)$. Starting at $\left(0,5\right)$, sketch a right triangle to $\left(3,3\right)$ as shown in Figure 5.70.

**Step 2:** Count the rise; since it goes down, it is negative. The rise is −2.

**Step 3:** Count the run. The run is 3.

**Step 4:** Use the slope formula $m=\frac{\mathit{rise}}{\mathit{run}}$ substitute the values of the rise and run. $m=\frac{-2}{3}$

The slope of the line is $-\frac{2}{3}$.

The solution is $y$ decreases by 2 units as $x$ increases by 3 units.

### Your Turn 5.72

Sometimes we will need to find the slope of a line between two points when we don’t have a graph to measure the rise and the run. We could plot the points on grid paper, then count out the rise and the run, but there is a way to find the slope without graphing. First, we need to introduce some algebraic notation.

We have seen that an ordered pair ($x$, $y$) gives the coordinates of a point. But when we work with slopes, we use two points. How can the same symbol ($x$, $y$) be used to represent two different points? Mathematicians use subscripts to distinguish such points. For example, (${x}_{1}$, ${y}_{1}$) would be said aloud as “$x$ sub 1, $y$ sub 1” and (${x}_{2}$, ${y}_{2}$) read “$x$ sub 2, $y$ sub 2.” The “sub” is a short way of saying “subscript.” We will use (${x}_{1}$, ${y}_{1}$) to identify the first point and (${x}_{2}$, ${y}_{2}$) to identify the second point in our slope equation. If we had more than two points, (if we were finding more than one slope), we could use (${x}_{3}$, ${y}_{3}$), (${x}_{4}$, ${y}_{4}$), and so on.

Let’s review how the rise and run relate to the coordinates of the two points by taking another look at the slope of the line between the points $\left(2,3\right)$ and $\left(7,6\right)$, as shown in Figure 5.71.

On the graph, we count the rise of 3 and the run of 5. Notice on the graph that that (${x}_{1}$, ${y}_{1}$) is the point $\left(2,3\right)$ and (${x}_{2}$, ${y}_{2}$) is the point $\left(7,6\right)$. The rise can be found by subtracting the $y$-coordinates, 6 and 3, and the run can be found by subtracting the $x$-coordinates 7 and 2.

We have shown that $m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$ is really another version of $m=\frac{\mathit{rise}}{\mathit{run}}$. We can use this formula to find the slope of a line.

### FORMULA

To find the slope of the line between two points (${x}_{1}$, ${y}_{1}$) and (${x}_{2}$, ${y}_{2}$), use the formula

### Example 5.73

#### Finding the Slope of the Line Using Points

Use the slope formula to find the slope of the line through the points (−2, −3) and (−7, 4).

#### Solution

We’ll call (−2, −3) point 1 and (−7, 4) point 2.

**Step 1:** Use the slope formula: $m=\frac{{y}_{2}-{y}_{1}}{{x}_{2}-{x}_{1}}$

**Step 2:** Substitute the values: $m=\frac{4-(-3)}{-7-(-2)}$

**Step 3:** Simplify: $m=\frac{7}{-5}=-\frac{7}{5}$

**Step 4:** Verify the slope on the graph shown in Figure 5.72.

### Your Turn 5.73

### Graphing Functions Using Slope and $y$-Intercept

We have graphed linear equations by plotting points and using intercepts. Once we see how an equation in slope-intercept form and its graph are related, we will have one more method we can use to graph lines. Review the graph of the equation $y=\frac{1}{2}x+3$ in Figure 5.73 and find its slope and $y$-intercept.

The vertical and horizontal lines in the graph show us the rise is 1 and the run is 2, respectively.

Substituting into the slope formula: $m=\frac{\mathit{rise}}{\mathit{run}}=\frac{1}{2}$

The $y$-intercept is $\left(0,3\right)$. Look at the equation of this line.

Look at the slope and $y$-intercept.

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=\frac{1}{2}x+3$ is in **slope-intercept form**. Sometimes the slope-intercept form is called the $y$-form.

### Example 5.74

#### Finding the Slope and $y$-Intercept of a Line

Identify the slope and $y$-intercept of the line from the equation:

- $y=-\frac{4}{7}x-2$
- $x+3y=9$

#### Solution

- We compare our equation to the slope-intercept form of the equation.

**Step 1:**Write the slope-intercept form of the equation of the line.

$$y=mx+b$$

**Step 2:**Write the equation of the line.

$$y=-\frac{4}{7}x-2$$

**Step 3:**Identify the slope.

$$m=-\frac{4}{7}$$

**Step 4:**Identify the $y$-intercept.

$$y\text{-}\text{intercept is}\phantom{\rule{0.28em}{0ex}}(0,-2)$$ - When an equation of a line is not given in slope-intercept form, our first step will be to solve the equation for $y$.

**Step 1:**Solve for $y$.

$$x+3y=9$$

**Step 2:**Subtract $x$ from each side.

$$3y=-x+9$$

**Step 3:**Divide both sides by 3.

$$\frac{3y}{3}=\frac{-x+9}{3}$$

**Step 4:**Simplify.

$$y=-\frac{1}{3}x+3$$

**Step 5:**Write the slope-intercept form of the equation of the line.

$$y=mx+b$$

**Step 6:**Write the equation of the line.

$$y=-\frac{1}{3}x+3$$

**Step 7:**Identify the slope.

$$m=-\frac{1}{3}$$

**Step 8:**Identify the $y$-intercept.

$$y\text{-}\text{intercept is}\phantom{\rule{0.28em}{0ex}}(0,3)$$.

### Your Turn 5.74

### Example 5.75

#### Graphing the Slope and $y$-Intercept

Graph the line of the equation $y=-x+4$ using its slope and $y$-intercept.

#### Solution

The equation is in slope-intercept form $y=mx+b$.

**Step 1:** Identify the slope and $y$-intercept.

$m=-1$, $y$-intercept is $\left(0,4\right)$.

**Step 2:** Plot the $y$-intercept on the coordinate system (Figure 5.74).

- Identify the rise over the run.

$m=-1=\frac{-1}{1}$ - Count out the rise and run to mark the second point.

rise $-1$, run 1

### Your Turn 5.75

### Graphing Horizontal and Vertical Lines

Some linear equations have only one variable. They may have just $x$ without the $y$, or just $y$ without an $x$. This changes how we make a table of values to get the points to plot. Let us consider the equation $x=-3$. This equation has only one variable, $x$. The equation says that $x$ is always equal to $-3$, so its value does not depend on $y$. No matter what the value of $y$ is, the value of $x$ is always $-3$. To make a table of values, write $-3$ in for all the $x$-values. Then choose any values for $y$. Since $x$ does not depend on $y$, you can choose any numbers you like. But to fit the points on our coordinate graph, we will use 1, 2, and 3 for the $y$-coordinates in the table below.

$x=-3$ | ||
---|---|---|

$x$ | $y$ | ($x$, $y$) |

−3 | 1 | $\left(-3,1\right)$ |

$-3$ | 2 | $\left(-3,2\right)$ |

$-3$ | 3 | $\left(-3,3\right)$ |

Plot the points from the table and connect them with a straight line (Figure 5.75). Notice that we have graphed a vertical line.

What is the slope? If we take the two points $\left(-3,3\right)$ and $\left(-3,1\right)$ then the rise is 2 and the run is 0.

Using the slope formula we get: $m=\frac{\mathit{rise}}{\mathit{run}}=\frac{2}{0}$

The slope is **undefined** since division by zero is undefined. We say that the slope of the vertical line $x=-3$ is undefined. The slope of any **vertical line** $x=a$ (where $a$ is any number) will be undefined.

What if the equation has $y$ but no $x$? Let’s graph the equation $y=4$. This time the $y$-value is a constant, so in this equation, $y$ does not depend on $x$. Fill in 4 for all the $y$ values in the table below and then choose any values for $x$. We will use 0, 2, and 4 for the $x$-coordinates.

$y=4$ | ||

$x$ | $y$ | ($x$, $y$) |

0 | 4 | $\left(0,4\right)$ |

2 | 4 | $\left(2,4\right)$ |

4 | 4 | $\left(4,4\right)$ |

In Figure 5.76, we have graphed a horizontal line passing through the $y$-axis at 4.

What is the slope? If we take the two points $\left(2,4\right)$ and $\left(4,4\right)$ then the rise is 0 and the run is 2. Using the slope formula, we get $m=\frac{\mathit{rise}}{\mathit{run}}=\frac{0}{2}=0$. The slope of the horizontal line $y=4$ is 0. The slope of any **horizontal line** $y=b$ (where $b$ is any number) will be 0. When the $y$-coordinates are the same, the rise is 0.

### Example 5.76

#### Graphing A Vertical Line

Graph: $x=2$.

#### Solution

The equation has only one variable, $x$, and $x$ is always equal to 2. We create a table where $x$ is always 2 and then put in any values for $y$. The graph is a vertical line passing through the $x$-axis at 2 (Figure 5.77).

$x=2$ | ||
---|---|---|

$x$ | $y$ | ($x$, $y$) |

2 | 1 | $\left(2,1\right)$ |

2 | 2 | $\left(2,2\right)$ |

2 | 3 | $\left(2,3\right)$ |

### Your Turn 5.76

### Example 5.77

#### Graphing A Horizontal Line

Graph: $y=-1$.

#### Solution

The equation $y=-1$ has only one variable, $y$. The value of $y$ is constant. All the ordered pairs in the next table have the same $y$-coordinate. The graph is a horizontal line passing through the $y$-axis at −1 (Figure 5.78).

$y=-1$ | ||
---|---|---|

$x$ | $y$ | ($x$, $y$) |

0 | $-1$ | $\left(0,-1\right)$ |

3 | $-1$ | $\left(3,-1\right)$ |

$-3$ | $-1$ | $\left(-3,-1\right)$ |

### Your Turn 5.77

The table below summarizes all the methods we have used to graph lines.

### Interpreting Graphs of Functions

An important yet often overlooked area in algebra involves interpreting graphs. Oftentimes in math classes, students are given mathematical functions and can make graphs to represent them. But the interpretation of graphs is a more applicable skill to the real world. Being able to “read” a graph—understanding its domain and range, what the intercepts mean, and what the slope (or curve) means— that's a real-world skill.

### Example 5.78

#### Interpreting a Graph

In Figure 5.79 the $x$-axis on the graph represents the 120-minute bike ride Juan went on. The $y$-axis represents how far away he was from his home.

- Interpret the $x$- and $y$-intercept.
- For each segment, find the slope.
- Create an interpretation of this graph (i.e., make up a story that goes with it).

#### Solution

- $\left(0,0\right)$ is the $x$- and $y$-intercept and represents Juan at home before his bike ride. The distance from home is 0 miles and 0 minutes have passed.
- In the first 30 minutes, the slope is $\frac{1}{5}$ and indicates Juan is traveling 1 mile for every 5 minutes. Between 30 and 60 minutes, the slope is 0 and indicates that he’s not riding the bike (the distance is not increasing). Then between 60 and 90 minutes, the slope is $\frac{1}{5}$ again. Finally, after 90 minutes the slope is $-\frac{4}{15},$ meaning Juan is getting 4 miles closer to home every 15 minutes.
- Answers will vary. Juan left his house for a bike ride. After 30 minutes, he was 6 miles from home and he stopped for ice cream at his local ice-cream truck. He enjoyed his ice cream for 30 minutes. He then jumped back on his bike and rode to his friend’s house. He arrived there 30 minutes later. His friend’s house was 12 miles from his home. His friend was not home so he immediately turned around and quickly rode home in 45 minutes.

### Your Turn 5.78

### Modeling Applications Using Slope and $y$-Intercept

Many real-world applications are modeled by linear equations. We will review a few applications here so you can understand how equations written in slope-intercept form relate to real-world situations. Usually when a linear equation model uses real-world data, different letters are used for the variables instead of using only $x$ and $y$. The variable names often remind us of what quantities are being measured. Also, we often need to extend the axes in our rectangular coordinate system to bigger positive and negative numbers to accommodate the data in the application.

### Example 5.79

#### Converting Temperature

The equation $F=\frac{9}{5}C+32$ is used to convert temperatures from degrees Celsius ($C$) to degrees Fahrenheit ($F$).

- Find the Fahrenheit temperature for a Celsius temperature of 0°.
- Find the Fahrenheit temperature for a Celsius temperature of 20°.
- Interpret the slope and $F$-intercept of the equation.
- Graph the equation.

#### Solution

- Find the Fahrenheit temperature for a Celsius temperature of 0°.
Find $F$ when $C=0$. $F=\frac{9}{5}(0)+32$ Simplify. $F=32$ - Find the Fahrenheit temperature for a Celsius temperature of 20°.
Find $F$ when $C=20$. $F=\frac{9}{5}(20)+32$ Simplify. $F=36+32$ Simplify. $F=68$ - Interpret the slope and $F$-intercept of the equation.
Even though this equation uses $F$ and $C$, it is still in slope-intercept form.

$\begin{array}{l}y=mx+b\\ F=mC+b\\ F=\frac{9}{5}C+32\end{array}$

The slope ${\scriptscriptstyle \frac{9}{5}}$ 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.

- Graph the equation.
We will need to use a larger scale than our usual. Start at the $F$-intercept $\left(0,32\right)$, and then count out the rise of 9 and the run of 5 to get a second point as shown in Figure 5.80.

### Your Turn 5.79

### Example 5.80

#### Calculating Driving Costs

Sam drives a delivery van. The equation $C=0.5d+60$ models the relation between his weekly cost, $C$, in dollars and the number of miles, $d$, that he drives.

- Find Sam’s cost for a week when he drives 0 miles.
- Find the cost for a week when he drives 250 miles.
- Interpret the slope and $C$-intercept of the equation.
- Graph the equation.

#### Solution

- Find Sam’s cost for a week when he drives 0 miles.
Find $C$ when $d$ = 0. $C=0.5\left(0\right)+60$ Simplify. $C=60$ Sam’s costs are $60 when he drives 0 miles.

- Find the cost for a week when he drives 250 miles.
Find $C$ when $d=250$. $C=0.5\left(250\right)+60$ Simplify. $C=185$ Sam’s costs are $185 when he drives 250 miles.

- Interpret the slope and $C$-intercept of the equation.
$\begin{array}{l}y=mx+b\\ C=0.5d+60\end{array}$

The slope, 0.5, means that the weekly cost, $C$, increases by $0.50 when the number of miles driven, $d$, increases by 1. The $C$-intercept means that when the number of miles driven is 0, the weekly cost is $60.

- Graph the equation (Figure 5.81).
We’ll need to use a larger scale than usual. Start at the $C$-intercept (0, 60). To count out the slope $m=0.5$, we rewrite it as an equivalent fraction that will make our graphing easier.

$$m=0.5=\frac{5}{10}=\frac{50}{100}$$So to graph the next point go up 50 from the intercept of 60 and then to the right 100. The second point will be (100, 110).