Resources For Teachers For Tutors For Students & Parents Pricing
Algebra Linear functions

Horizontal and vertical lines

20 practice questions 2 video lessons Theory + worked examples
Practice 20 questions
Practice questions

Every question with a fully worked solution.

Start practising
Watch 2 video(s)
  • How To Graph Horizontal and Vertical Lines Watch
  • Graphing Horizontal and Vertical Lines │Linear Equations Watch
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

Two special lines hold one coordinate constant:

  • Horizontal \(y=c\): every point has the same \(y\); slope \(0\).
  • Vertical \(x=c\): every point has the same \(x\); slope undefined.
Horizontal has no rise (slope \(0\)); vertical has no run (undefined slope).
Horizontal and vertical lines y = a horizontal line has slope 0; x = a vertical line has an undefined slope. x y y=2 x=-2
\(y=2\) is horizontal; \(x=-2\) is vertical.
Special lines Special lines Special lines y = c: horizontal, slope 0 x = c: vertical, slope undefined horizontal: constant y vertical: constant x
The two special lines.

Slopes:

\[y=c:\ m=0,\qquad x=c:\ m\ \text{undefined}\]
horizontal lines have slope zero; vertical lines have undefined slope
A vertical line is not a function β€” it fails the vertical line test.

How to identify these lines

  1. \(y=\) a number: horizontal.
  2. \(x=\) a number: vertical.
  3. Horizontal slope is \(0\).
  4. Vertical slope is undefined.
Example 1 β€” Horizontal line
Describe the graph of \(y=3\).
Solution

Every point has \(y=3\).

\(y=3\)\(\Rightarrow\)\(\text{horizontal line}\)
a horizontal line at y equals 3
Example 2 β€” Vertical line
Describe the graph of \(x=-2\).
Solution

Every point has \(x=-2\).

\(x=-2\)\(\Rightarrow\)\(\text{vertical line}\)
a vertical line at x equals negative 2
Example 3 β€” Slope of horizontal
What is the slope of \(y=3\)?
Solution

No rise, so slope is \(0\).

\(m\)\(=\)\(0\)
the slope is 0
Example 4 β€” Slope of vertical
What is the slope of \(x=-2\)?
Solution

No run means division by zero.

\(m\)\(=\)\(\text{undefined}\)
the slope is undefined

Common pitfalls

\(y=c\) is horizontal, \(x=c\) is vertical β€” easy to swap.
Slope \(0\) is not the same as undefined.
A vertical line is not a function.

Frequently asked questions

What does \(y=3\) look like?

A horizontal line through \(y=3\).

What is the slope of a vertical line?

Undefined.

What is the slope of a horizontal line?

Zero.

Is a vertical line a function?

No β€” it fails the vertical line test.