Equations of horizontal and vertical lines
key notes:
What are Horizontal and Vertical Lines?
- Horizontal line: A line that runs left to right and is parallel to the x-axis.
- Vertical line: A line that runs up and down and is parallel to the y-axis.
Equation of a Horizontal Line
- All points on a horizontal line have the same y-coordinate.
- Equation is:
y=k
where k is a constant (the y-value for all points on the line).
Example:
y=3 means the line passes through all points with y=3, like (0, 3), (4,3), (-2, 3).
Equation of a Vertical Line
- All points on a vertical line have the same x-coordinate.
- Equation is:
x=h
where hhh is a constant (the x-value for all points on the line).
Example:
x=−2 means the line passes through all points with x=−2, like (-2, 0), (-2, 5), (-2, -3).
Characteristics
Line Type | Equation | Slope | Intercepts |
---|---|---|---|
Horizontal line | y=k | Slope m=0 | y-intercept = k no x-intercept (unless k=0 |
Vertical line | x=h | Slope is undefined | x-intercept = h, no y-intercept (unless h=0) |
Graphing Horizontal and Vertical Lines
- Horizontal line: Draw a straight line through y=k parallel to the x-axis.
- Vertical line: Draw a straight line through x=h parallel to the y-axis.
Examples
- Write the equation of a horizontal line passing through (2, 5):
y=5
- Write the equation of a vertical line passing through (-3, 4):
x=−3
Practice
Write the equation of:
- A horizontal line through (6, -1)
- A vertical line through (0, 3)
- A horizontal line through (-4, 0)
- A vertical line through (7, -5)
Learn with an example
Is the graph of this equation a horizontal or vertical line?
x = -1
The equation x = -1 tells you that every x-value is -1.
First plot some points that have an x-value of -1.

Now draw a line connecting the points.

The graph of x = -1 is a vertical line.
Is the graph of this equation a horizontal or vertical line?
y = 8
The equation y = 8 tells you that every y-value is 8.
First plot some points that have a y-value of 8.

Now draw a line connecting the points.

The graph of y = 8 is a horizontal line.
Let’s Practice!