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.

TL;DR

A vertical line has the equation x=cx=c and undefined slope. Its points all have the same xx-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=0c=0.
  • The y-coordinate can vary freely along the line.
  • Vertical lines are perpendicular to horizontal lines.
  • The x-intercept is (c,0)(c,0). Only x=0x=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)(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)(3,y), so its equation is x=3x=3.

When you draw x=cx=c, locate cc on the x-axis and draw straight through it in both directions, parallel to the y-axis. If c=0c=0, the line is the y-axis. The coordinate plane guide explains where to place the fixed coordinate. OpenStax, 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
Every point on x=3x=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 yy over change in xx. For (3,1)(3,1) and (3,5)(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=cx=c y=ky=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 works through the other orientation. The straight-line equation guide shows why x=cx=c fits standard form even though it cannot be written as y=mx+by=mx+b. OpenStax, Understand Slope of a Line

Where does a vertical line intersect other lines?

The x-intercept of x=cx=c is (c,0)(c,0). If c≠0c\ne0, it never meets the y-axis because the y-axis requires x=0x=0. If c=0c=0, the two lines coincide. Two distinct vertical lines are parallel. A horizontal line y=ky=k meets x=cx=c at (c,k)(c,k) at a right angle. OpenStax, Slope of a Line

To intersect a vertical line with a nonvertical relation, substitute its fixed xx into the relation. The substitution may give zero, one, or several intersection points. The intercept guide applies the same reasoning to the axes.

What does the vertical-line test tell you?

A graph represents yy as a function of xx 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 xx.

A vertical tangent does not cause an automatic failure. The graph y=x3y=\sqrt[3]{x} has one output at every input, including x=0x=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

A vertical line of symmetry is different. Reflection across x=cx=c sends (x,y)(x,y) to (2c−x,y)(2c-x,y). An upward or downward parabola in the form y=a(x−h)2+ky=a(x-h)^2+k has vertical symmetry about x=hx=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)(-4,7).

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

Example 2

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

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

Example 3

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

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

Example 4

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

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

Example 5

Check whether x2+y2=25x^2+y^2=25 defines yy as a function of xx.

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

Example 6

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

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

Common Vertical Line Mistakes

Mistake 1: Writing y equals the first coordinate

A vertical line through (3,5)(3,5) has equation x=3x=3. The equation y=3y=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)(7,0).
  2. Where does x=4x=4 meet y=−3y=-3?
  3. Does the graph containing the two points (1,6)(1,6) and (1,9)(1,9) pass the vertical-line test?

Answers. 1. x=7x=7. 2. (4,−3)(4,-3). 3. No. The test line x=1x=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

Research Behind This Article

  1. OpenStax, Elementary Algebra 2e: Understand Slope of a Line. OpenStax
  2. OpenStax, Intermediate Algebra 2e: Slope of a Line. OpenStax
  3. OpenStax, Contemporary Mathematics: Graphing Functions. OpenStax
  4. OpenStax, College Algebra 2e: Functions and Function Notation. OpenStax