Suppose you're at an all-you-can-eat pancake house where you can pay $8.99 and have all the pancakes you want. What if you graphed the number of pancakes you ate along the axis and the amount of money you have to pay along the axis. Would the line representing this situation be horizontal or vertical?

### Horizontal and Vertical Line Graphs

Not all graphs are slanted or **oblique**. Some are horizontal or vertical.

#### Let's graph the following situations and equations:

- “Mad-cabs” have an unusual offer going on. They are charging $7.50 for a taxi ride of any length within the city limits. Graph the function that relates the cost of hiring the taxi to the length of the journey in miles .

No matter the mileage, your cab fare will be $7.50. To see this visually, create a graph. You can also create a table to visualize the situation.

# of miles |
Cost |
---|---|

0 | 7.50 |

10 | 7.50 |

15 | 7.50 |

25 | 7.50 |

60 | 7.50 |

Because the mileage can be anything, the equation should relate only to the restricted value, in this case, . The equation that represents this situation is:

Whenever there is an equation of the form , the graph is a horizontal line that intercepts the axis at the value of the constant.

Similarly, if there is an equation of the form , the graph is a vertical line that intercepts the axis at the value of the constant. Notice that this is a relation but not a function because each value (there’s only one in this case) corresponds to many (actually an infinite number of) values.

- Graph by making a table and plotting the points.

Notice that there is no in this equation. So, no matter what the value of is, will always be -2. A table of points on this line will look like the following:

is a horizontal line that crosses the axis at 4.

is a horizontal line that crosses the axis at –4.

is a vertical line that crosses the axis at 4.

is a vertical line that crosses the axis at –4.

### Examples

#### Example 1

Earlier, you were told that you're at an all-you-can-eat pancake house where you can pay $8.99 and have all the pancakes you want. You were asked if the line representing how much the number of pancakes you ate along the axis and the amount of money you have to pay along the axis would be horizontal or vertical.

Similar to problem 1 about the taxi from above, the line that would represent this situation would be a horizontal line. No matter what value you are looking at on the axis (the number of pancakes you eat), the value would be the same, $8.99.

#### Example 2

Graph and on the same plot.

The graph of is a horizontal line where is always equal to 3 no matter what is, and the graph of is a vertical line where is always equal to 5 no matter what is:

### Review

- What is the equation for the axis?
- What is the equation for the axis?

Write the equations for the graphed lines pictured below.

- Graph .
- Graph .
- Graph .

### Review (Answers)

To see the Review answers, open this PDF file and look for section 4.3.