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 \begin{align*}x-\end{align*}axis and the amount of money you have to pay along the \begin{align*}y-\end{align*}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 \begin{align*}(y)\end{align*} to the length of the journey in miles \begin{align*}(x)\end{align*}.

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 \begin{align*}(x)\end{align*} |
Cost \begin{align*}(y)\end{align*} |
---|---|

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, \begin{align*}y\end{align*}. The equation that represents this situation is:

\begin{align*}y=7.50\end{align*}

Whenever there is an equation of the form \begin{align*}y= \text{constant}\end{align*}, the graph is a horizontal line that intercepts the \begin{align*}y-\end{align*}axis at the value of the constant.

Similarly, if there is an equation of the form \begin{align*}x=\text{constant}\end{align*}, the graph is a vertical line that intercepts the \begin{align*}x-\end{align*}axis at the value of the constant. Notice that this is a relation but not a function because each \begin{align*}x\end{align*} value (there’s only one in this case) corresponds to many (actually an infinite number of) \begin{align*}y\end{align*} values.

- Graph \begin{align*}y=-2\end{align*} by making a table and plotting the points.

Notice that there is no \begin{align*}x\end{align*} in this equation. So, no matter what the value of \begin{align*}x\end{align*} is, \begin{align*}y\end{align*} will always be -2. A table of points on this line will look like the following:

\begin{align*}(x)\end{align*} | \begin{align*}(y)\end{align*} |
---|---|

\begin{align*}-2\end{align*} | \begin{align*}-2\end{align*} |

\begin{align*}-1\end{align*} | \begin{align*}-2\end{align*} |

\begin{align*}0\end{align*} | \begin{align*}-2\end{align*} |

\begin{align*}1\end{align*} | \begin{align*}-2\end{align*} |

\begin{align*}2\end{align*} | \begin{align*}-2\end{align*} |

- \begin{align*}y=4\end{align*}

\begin{align*}y=4\end{align*} is a horizontal line that crosses the \begin{align*}y-\end{align*}axis at 4.

- \begin{align*}y=-4\end{align*}

\begin{align*}y=-4\end{align*} is a horizontal line that crosses the \begin{align*}y-\end{align*}axis at –4.

- \begin{align*}x=4\end{align*}

\begin{align*}x=4\end{align*} is a vertical line that crosses the \begin{align*}x-\end{align*}axis at 4.

- \begin{align*}x=-4\end{align*}

\begin{align*}x=-4\end{align*} is a vertical line that crosses the \begin{align*}x-\end{align*}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 \begin{align*}x-\end{align*}axis and the amount of money you have to pay along the \begin{align*}y-\end{align*}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 \begin{align*}x-\end{align*}axis (the number of pancakes you eat), the \begin{align*}y-\end{align*}value would be the same, $8.99.

#### Example 2

Graph \begin{align*}y=-3\end{align*} and \begin{align*} x=5 \end{align*} on the same plot.

The graph of \begin{align*}y=-3\end{align*} is a horizontal line where \begin{align*}y\end{align*} is always equal to 3 no matter what \begin{align*}x\end{align*} is, and the graph of \begin{align*}x=5\end{align*} is a vertical line where \begin{align*}x\end{align*} is always equal to 5 no matter what \begin{align*}y\end{align*} is:

### Review

- What is the equation for the \begin{align*}x-\end{align*}axis?
- What is the equation for the \begin{align*}y-\end{align*}axis?

Write the equations for the graphed lines pictured below.

- \begin{align*}E\end{align*}
- \begin{align*}B\end{align*}
- \begin{align*}C\end{align*}
- \begin{align*}A\end{align*}
- \begin{align*}D\end{align*}

- Graph \begin{align*}x=-7\end{align*}.
- Graph \begin{align*}y=100\end{align*}.
- Graph \begin{align*}y=1/2\end{align*}.

### Review (Answers)

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