What if you were given the graph of a vertical or horizontal line? How could you write the equation of this line? After completing this Concept, you'll be able to write horizontal and vertical linear equations and graph them in the coordiate plane.
CK-12 Foundation: 0404S Graphs of Horizontal and Vertical Lines (H264)
How do you graph equations of horizontal and vertical lines? See how in the example below.
“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 (y) to the length of the journey in miles (x).
To proceed, the first thing we need is an equation. You can see from the problem that the cost of a journey doesn’t depend on the length of the journey. It should come as no surprise that the equation then, does not have x in it. Since any value of x results in the same value of y(7.5), the value you choose for x doesn’t matter, so it isn’t included in the equation. Here is the equation:
The graph of this function is shown below. You can see that it’s simply a horizontal line.
Any time you see an equation of the form “y= constant,” the graph is a horizontal line that intercepts the y−axis at the value of the constant.
Similarly, when you see an equation of the form x= constant, then the graph is a vertical line that intercepts the x−axis at the value of the constant. (Notice that that kind of equation is a relation, and not a function, because each x−value (there’s only one in this case) corresponds to many (actually an infinite number) y−values.)
Plot the following graphs.
(a) y=4 is a horizontal line that crosses the y−axis at 4.
(b) y=−4 is a horizontal line that crosses the y−axis at −4.
(c) x=4 is a vertical line that crosses the x−axis at 4.
(d) x=−4 is a vertical line that crosses the x−axis at −4.
Find an equation for the x−axis and the y−axis.
Look at the axes on any of the graphs from previous examples. We have already said that they intersect at the origin (the point where x=0 and y=0). The following definition could easily work for each axis.
x−axis: A horizontal line crossing the y−axis at zero.
y−axis: A vertical line crossing the x−axis at zero.
So using example 3 as our guide, we could define the x−axis as the line y=0 and the y−axis as the line x=0.
Watch this video for help with the Examples above.
CK-12 Foundation: Graphs of Horizontal and Vertical Lines
Horizontal lines are defined by the equation y= constant and vertical lines are defined by the equation x= constant.
- Be aware that although we graph the function as a line to make it easier to interpret, the function may actually be discrete.
Write the equation of the horizontal line that is 3 units below the x-axis.
The horizontal line that is 3 units below the x-axis will intercept the y-axis at y=−3. No matter what the value of x, the y value of the line will always be -3. This means that the equations for the line is y=−3.
- Write the equations for the five lines (A through E) plotted in the graph below.
For 2-10, use the graph above to determine at what points the following lines intersect.
A and E
A and D
C and D
B and the y−axis
E and the x−axis
C and the line y=x
E and the line y=12x
A and the line y=x+3
B and the line y=−2x