Chapter 6 · Proportional relationships, lines, and slope
Graphing Horizontal and Vertical Lines
Learn why an equation that fixes one coordinate graphs as a horizontal or vertical line, and how to plot each kind from exact points.
You already know how to graph a line from a table of values. But what happens when an equation names only one variable, such as or ? The same skill still works, and it leads to two special kinds of lines.
First, recall what a graph is. Each point on a coordinate plane is named by an ordered pair . The x-coordinate tells you how far the point is to the right (positive) or left (negative) of the vertical y-axis. The y-coordinate tells you how far it is above (positive) or below (negative) the horizontal x-axis. In this lesson, and are plain numbers, not measurements, so distances are counted in grid units. The graph of an equation is the set of all points whose coordinates make the equation true.
So what does ask of a point? Only that its y-coordinate is . The equation never mentions , so can be any real number, which means any number on the number line. The table below shows four choices.
| x (you choose) | y (always 3) | Point (x, y) |
|---|---|---|
The figure below plots the four points from the table. Its horizontal axis is the x-axis and its vertical axis is the y-axis. Each axis runs from to , and the grid lines are unit apart. Line A is the straight line through all four points.
Every point on Line A has the same y-coordinate, . A line like this is called a horizontal line. It runs left and right, in the same direction as the x-axis, and it stays exactly units above it. It crosses the y-axis at . It never touches the x-axis, because every point on the x-axis has y-coordinate , not .
The figure shows only part of the line. Points such as and are on it too, because each has y-coordinate . That is the test to trust: read the coordinates, not how the picture looks.
Worked example
Fixing x instead of y
Graph the equation on a coordinate plane. As before, the x-axis is horizontal, the y-axis is vertical, each axis runs from to , and the grid lines are unit apart.
Read what the equation asks. A point is on the graph exactly when its x-coordinate is -2. The equation never mentions y, so y can be any real number.
List values as you would in a table. This time you choose the y-values, because y is the coordinate left free. Choosing -3, 0 and 4 gives three points, each with x-coordinate -2.
Plot the three points. Each one is 2 units to the left of the y-axis: the negative sign of -2 tells you the direction, and the distance is 2. Only their up-and-down positions differ: 3 units below the x-axis, on the x-axis, and 4 units above it.
Draw the straight line through the three points. It is Line A in the figure below. Every point on it has the same x-coordinate, -2. A line like this is called a vertical line. It runs up and down, in the same direction as the y-axis, and it crosses the x-axis at (-2, 0).
Check with coordinates, not by eye. The point (-2, 5.5) has x-coordinate -2, so it is on the graph. The point (3, -2) has -2 as its y-coordinate, but its x-coordinate is 3, so it is not on the graph.
Answer
The graph of is the vertical line through . It stays exactly units to the left of the y-axis.
Key concept
One coordinate stays fixed
Let and stand for fixed real numbers.
- The graph of is a horizontal line. Every point on it has y-coordinate , and can be any real number. It crosses the y-axis at .
- The graph of is a vertical line. Every point on it has x-coordinate , and can be any real number. It crosses the x-axis at .
The axes are special cases: the x-axis is the line , and the y-axis is the line .
To graph either kind, plot two or more different points that have the fixed coordinate, then draw the straight line through them.
Worked example
Two lines on one plane
Graph and on one coordinate plane. As before, the x-axis is horizontal, the y-axis is vertical, each axis runs from to , and the grid lines are unit apart. Which point lies on both lines?
Name the coordinate each equation fixes. In y = -4 the y-coordinate is fixed, so the graph is a horizontal line. In x = 3 the x-coordinate is fixed, so the graph is a vertical line.
Plot two points for y = -4. Use x = 0 for the point on the y-axis, then choose x = -3. Keep y at -4 both times, so both points are 4 units below the x-axis. The line through them is Line A in the figure below.
Plot two points for x = 3. Use y = 0 for the point on the x-axis, then choose y = 2. Keep x at 3 both times, so both points are 3 units to the right of the y-axis. The line through them is Line B.
Find the point on both lines. It must make both equations true, so its x-coordinate is 3 and its y-coordinate is -4. Write the x-coordinate first.
Check the order of the coordinates. The point (-4, 3) has x-coordinate -4, so it fails x = 3. The point (3, -4) has x-coordinate 3 and y-coordinate -4, so it passes both tests.
Answer
The graph of is the horizontal line units below the x-axis. The graph of is the vertical line units to the right of the y-axis. The point is the only point on both lines.
One more fact separates these two kinds of lines: slope. Slope measures how steep a line is. Go from one point on the line to a different point on it, then divide the change in by the change in . You can do that division only when the change in is not . Try it on the two lines in the figure above.
- Line A, horizontal. From to , the change in is and the change in is . The slope is . Every horizontal line has slope , because two different points on it have equal y-coordinates and unequal x-coordinates.
- Line B, vertical. From to , the change in is , but the change in is . You can't divide by , so the slope is undefined. The same happens on every vertical line, because all of its points share one x-coordinate. Undefined does not mean .
Takeaway. An equation of the form or fixes one coordinate and leaves the other free. The graph of is the horizontal line through , and its slope is . The graph of is the vertical line through . Its slope is undefined, and it is not a function of . If you're unsure which is which, test a point's coordinates in the equation.
Next, you'll meet equations that keep both variables on one side, such as . That layout is called standard form. You'll learn to rewrite it with alone on one side, called slope-intercept form, and then graph it.