[Home](https://learningfolio.de5.net/) / [Math](https://learningfolio.de5.net/math/) / [Math glossary](https://learningfolio.de5.net/math/glossary/) / Vertical Line: Equation, Slope, and the Function Test

[Math glossary](https://learningfolio.de5.net/math/glossary/)

# Vertical Line: Equation, Slope, and the Function Test

Graph x equals a constant, identify undefined slope, find intersections, and apply the vertical-line test with six examples.

Written by **Learningfolio Team**

We’re subject-matter experts in math, science, parent support, and education, with 100 years of combined experience. We believe in learning, experimenting, and growing, and we review one another’s work.

## On this page

* [TL;DR](https://learningfolio.de5.net/math/vertical-line/#tldr)
* [Key Points](https://learningfolio.de5.net/math/vertical-line/#key-points)
* [What is a vertical line on a coordinate plane?](https://learningfolio.de5.net/math/vertical-line/#what-is-a-vertical-line-on-a-coordinate-plane)
* [Why is the slope of a vertical line undefined?](https://learningfolio.de5.net/math/vertical-line/#why-is-the-slope-of-a-vertical-line-undefined)
* [Where does a vertical line intersect other lines?](https://learningfolio.de5.net/math/vertical-line/#where-does-a-vertical-line-intersect-other-lines)
* [What does the vertical-line test tell you?](https://learningfolio.de5.net/math/vertical-line/#what-does-the-vertical-line-test-tell-you)
* [Six Worked Vertical Line Examples](https://learningfolio.de5.net/math/vertical-line/#six-worked-vertical-line-examples)
* [Common Vertical Line Mistakes](https://learningfolio.de5.net/math/vertical-line/#common-vertical-line-mistakes)
* [Try It Yourself](https://learningfolio.de5.net/math/vertical-line/#try-it-yourself)
* [Conclusion](https://learningfolio.de5.net/math/vertical-line/#conclusion)
* [Read More](https://learningfolio.de5.net/math/vertical-line/#read-more)
* [Research Behind This Article](https://learningfolio.de5.net/math/vertical-line/#research-behind-this-article)

## TL;DR

**A vertical line has the equation $x=c$ and undefined slope.** Its points all have the same $x$-coordinate. A vertical line through a graph tests whether one input has multiple outputs.

## Key Points

* A vertical line is parallel to the y-axis, or coincides with it if $c=0$.
* The y-coordinate can vary freely along the line.
* Vertical lines are perpendicular to horizontal lines.
* The x-intercept is $(c,0)$. Only $x=0$ intersects the y-axis.
* The vertical-line test checks functions, not whether a graph has a vertical tangent.

## What is a vertical line on a coordinate plane?

Draw a point such as $(3,2)$. Moving straight up or down changes the second coordinate while the first remains 3. The full vertical line through the point contains every point $(3,y)$, so its equation is $x=3$.

When you draw $x=c$, locate $c$ on the x-axis and draw straight through it in both directions, parallel to the y-axis. If $c=0$, the line is the y-axis. The [coordinate plane guide](https://learningfolio.de5.net/math/coordinate-plane-and-ordered-pairs/) explains where to place the fixed coordinate. [OpenStax, Graphing Functions](https://openstax.org/books/contemporary-mathematics/pages/5-8-graphing-functions)

![A vertical line x equals three contains points three comma negative one, three comma one, and three comma three, while a horizontal line y equals two crosses it](https://learningfolio.de5.net/assets/versioned/vertical-line-one-input-many-points.f3bb691a3fbf.webp)


Every point on $x=3$ has the same first coordinate. Both coordinates stay fixed only at an intersection.

## Why is the slope of a vertical line undefined?

Slope is change in $y$ over change in $x$. For $(3,1)$ and $(3,5)$, the rise is 4 and the run is 0. Division by zero is undefined. A horizontal line has the reverse pattern. Its rise is zero and its run between distinct points is nonzero, so its slope is zero.

| Property | Vertical line | Horizontal line |
| --- | --- | --- |
| Equation | $x=c$ | $y=k$ |
| Fixed coordinate | First | Second |
| Slope | Undefined | Zero |
| Axis direction | Parallel to the y-axis when distinct | Parallel to the x-axis when distinct |

The [horizontal-line guide](https://learningfolio.de5.net/math/geometry/horizontal-line/) works through the other orientation. The [straight-line equation guide](https://learningfolio.de5.net/math/slope-intercept-to-standard-form/) shows why $x=c$ fits standard form even though it cannot be written as $y=mx+b$. [OpenStax, Understand Slope of a Line](https://openstax.org/books/elementary-algebra-2e/pages/4-4-understand-slope-of-a-line)

## Where does a vertical line intersect other lines?

The x-intercept of $x=c$ is $(c,0)$. If $c\ne0$, it never meets the y-axis because the y-axis requires $x=0$. If $c=0$, the two lines coincide. Two distinct vertical lines are parallel. A horizontal line $y=k$ meets $x=c$ at $(c,k)$ at a right angle. [OpenStax, Slope of a Line](https://openstax.org/books/intermediate-algebra-2e/pages/3-2-slope-of-a-line)

To intersect a vertical line with a nonvertical relation, substitute its fixed $x$ into the relation. The substitution may give zero, one, or several intersection points. The [intercept guide](https://learningfolio.de5.net/math/y-intercept/) applies the same reasoning to the axes.

## What does the vertical-line test tell you?

A graph represents $y$ as a function of $x$ if each input in its domain has exactly one output. Start with a vertical test line and slide it across the graph. If it meets two distinct points at the same input, the relation is not a function of $x$.

A vertical tangent does not cause an automatic failure. The graph $y=\sqrt[3]{x}$ has one output at every input, including $x=0$, where it has a vertical tangent. The test counts intersections, not slopes. A piecewise graph showing an open circle and a filled point at the same input counts only the filled point if the open circle indicates exclusion. [OpenStax, Functions and Function Notation](https://openstax.org/books/college-algebra-2e/pages/3-1-functions-and-function-notation)

A **vertical line of symmetry** is different. Reflection across $x=c$ sends $(x,y)$ to $(2c-x,y)$. An upward or downward parabola in the form $y=a(x-h)^2+k$ has vertical symmetry about $x=h$. Its two reflected points can have the same y-coordinate and different x-coordinates without violating the vertical-line test.

## Six Worked Vertical Line Examples

### Example 1

Find the vertical line through $(-4,7)$.

1. Read the first coordinate, $-4$.
2. Fix $x=-4$ while allowing all real y-values.
3. The equation is $x=-4$.

### Example 2

Find the slope between $(2,-5)$ and $(2,4)$.

1. The rise is $4-(-5)=9$.
2. The run is $2-2=0$.
3. The slope is undefined since $9/0$ has no real value.

### Example 3

Find the intersection of $x=-2$ and $y=3x+5$.

1. Substitute $x=-2$ into the second equation.
2. This gives $y=3(-2)+5=-1$.
3. Both equations hold at $(-2,-1)$.

### Example 4

Find the vertical line perpendicular to $y=6$ that passes through $(5,1)$.

1. A line perpendicular to a horizontal line is vertical.
2. Fix the x-coordinate at 5.
3. The line is $x=5$. It meets $y=6$ at $(5,6)$.

### Example 5

Check whether $x^2+y^2=25$ defines $y$ as a function of $x$.

1. Test the vertical line $x=3$.
2. Substituting gives $y^2=16$, so $y=4$ or $y=-4$.
3. The full circle fails the function test because one input has two outputs.

### Example 6

Reflect $(8,-2)$ across the line $x=3$.

1. The point is 5 units to the right of the line.
2. Move 5 units left from $x=3$ to find the reflected x-coordinate, $-2$.
3. The y-coordinate remains $-2$, so the image is $(-2,-2)$.

## Common Vertical Line Mistakes

### Mistake 1: Writing y equals the first coordinate

A vertical line through $(3,5)$ has equation $x=3$. The equation $y=3$ would draw a different, horizontal line.

### Mistake 2: Calling undefined slope zero

Check which term in rise over run is zero. A zero denominator makes the slope undefined.

### Mistake 3: Counting a test line as part of the graph

Only count its intersection points with the given relation. The test line is a tool for checking one x-coordinate.

## Try It Yourself

1. Find the equation of the vertical line through $(7,0)$.
2. Where does $x=4$ meet $y=-3$?
3. Does the graph containing the two points $(1,6)$ and $(1,9)$ pass the vertical-line test?

**Answers.** 1. $x=7$. 2. $(4,-3)$. 3. No. The test line $x=1$ meets both points.

## Conclusion

* Fix the first coordinate when drawing a vertical line.
* Check the run before dividing to find slope.
* Use one vertical test line per x-coordinate to check for multiple outputs.

## Read More

* [Check whether ordered pairs describe a relation or function](https://learningfolio.de5.net/math/relation-in-maths/)
* [Find when one shape reflects across a line of symmetry](https://learningfolio.de5.net/math/geometry/symmetry-in-geometry/)
* [Distinguish parallel and perpendicular lines](https://learningfolio.de5.net/math/geometry/perpendicular-lines/)

## Research Behind This Article

1. OpenStax, *Elementary Algebra 2e: Understand Slope of a Line*. [OpenStax](https://openstax.org/books/elementary-algebra-2e/pages/4-4-understand-slope-of-a-line)
2. OpenStax, *Intermediate Algebra 2e: Slope of a Line*. [OpenStax](https://openstax.org/books/intermediate-algebra-2e/pages/3-2-slope-of-a-line)
3. OpenStax, *Contemporary Mathematics: Graphing Functions*. [OpenStax](https://openstax.org/books/contemporary-mathematics/pages/5-8-graphing-functions)
4. OpenStax, *College Algebra 2e: Functions and Function Notation*. [OpenStax](https://openstax.org/books/college-algebra-2e/pages/3-1-functions-and-function-notation)
