What is a vertical line?

What is a vertical line?

Understanding vertical lines has never been easier – just remember the two basic properties!

headshot photo of tess loucka

Author

Tess Loucka

Published:

March 2025

Key takeaways

Vertical line definition

A vertical line is a line that rises straight upward toward one point. 

The side of this skyscraper is an example of a vertical line.

Properties of vertical lines

Now we know the basics, but what is a vertical line, really? What are its properties?

There are two particular requirements all vertical lines must meet.

Firstly, the vertical line equation is written as x = a, where a is any number. Secondly, the slope of a vertical line will always be undefined.

Turn math into playtime with DreamBox Math

DREAMBOX MATH

Get started for FREE today!

in-app DreamBox Math screens

Vertical line examples

Vertical lines appear everywhere we look. 

Vertical lines also play a big role in geometry and trigonometry! The y-axis of an x,y graph goes up and down vertically. Every line parallel to the y-axis is a vertical line.

xy graph with line x-3

Difference between horizontal and vertical lines

So, what about the x-axis? Well, we know the x-axis isn’t vertical because it moves from left to right.

That’s because the x-axis is an example of a horizontal line. Horizontal lines move from side to side. They get their name from “horizon,” and you can probably guess why. 

Vertical and horizontal lines are related through their perpendicularity. Vertical lines are perpendicular to horizontal lines and vice versa because the angles they form when they intersect are all 90°.

Advanced topics

Now that you know all the basics of vertical lines, let’s explore in detail how you can identify and create your own.

Equation of a vertical line

As we said before, the vertical line equation is written as x = a. For every point on the y-axis, the line will have the same x-value.

vertical line graph coordinate labelling

Slope of a vertical line

When taking the slope of any vertical line, it will always be undefined. 

To find any line’s slope, use the equation rise/run. For the line x = 3, the rise is 1 and the run is 0, making the slope 1/0. However, the result of any number divided by 0 will be undefined. 

Therefore, the slope for x = 3 must be undefined. 

This is true for any vertical line. Test it out!

Vertical line test

Vertical lines can be used to distinguish functions. 

One important property of a function is that every x-value must be associated with only one y-value. If one x-value is associated with two or more, the relation cannot be a function. 

This is where vertical lines come in!

The vertical line test involves placing a vertical line along every x-value of a graphed relation or line and seeing if more than one point touches the vertical line at the same time. The examples below show the vertical line test being conducted on a line, an upright parabola, and a sideways parabola.

Which graph above does not show a function?

If you guessed it was the sideways parabola, you’re right! That’s because the vertical line intersects the parabola at two different points at the same time. Therefore, this shape cannot be a function.

For more practice problems and examples of how vertical lines are used in mathematics, consider using a math web app or test prep service.

The math program that drives results

Get started today!

DreamBox adapts to your child’s level and learning needs, ensuring they are appropriately challenged and get confidence-building wins.

Practice problems

Test your knowledge of vertical lines with the practice problems below:

Question 1: Are these lines vertical or horizontal?

Answer: Yes, they are horizontal.

Question 2: If the equation of a line is y = 2x + 3, is it vertical? Why or why not?

Answer: No. The equation of a vertical line follows the form x = a.

Question 3: What is the slope of any vertical line?

Answer: The slope of a vertical line is undefined.

Parent guide

Question 1: These lines are horizontal because they move from left to right.

Question 2: The equation mentioned in the question is written in y = mx + b form. Vertical lines must have an equation of x = a. This is true because the line solely exists on one x-value while the y-value changes.

Question 3: The slope of any vertical line is undefined because any number divided by 0 is undefined. Since the slope formula is rise/run, and the run of a vertical line will always be 0, this is true for all vertical lines.

FAQs about vertical lines

The vertical line symbol in math is a bar that goes straight up and down. It is used to express absolute value, conditional probability, mathematical norms, and numerical sets.

The vertical line test is a technique used on graphs to determine whether a relation is a function or not. If the vertical line intersects two or more points at a time, the relation is not a function.

The slope of a vertical line is always undefined.

Take at home math practice to the next level

Empowering parents and educators to make math practice more impactful. Plus, your kids will love it.