Key Points
- Every point on the line has the same x-coordinate, ; can be anything.
- You need only the x-coordinate of one point to write the equation.
- The slope is undefined: the run is 0, and dividing by 0 has no answer.
- It has no form, but fits with .
- and are units apart.
What Keeps a Skyscraper's Core Perfectly Straight Up?
A plumb line dropped from the top of a skyscraper never leans to the left or right. Builders hang a weight on a string because gravity pulls it straight down into a true vertical. Drawn on a grid, that string is a line parallel to the y-axis.
- The height changes all the way down the string.
- The across-position never changes, so one number, the x-coordinate, captures the whole line.
That is the equation of a line parallel to the y-axis:
A string 3 units right of the y-axis is the line , top to bottom. It has no tilt and, as it turns out, no slope at all.

What Is the Equation of a Line Parallel to the Y-Axis?
It is , where is a constant. The line holds every point whose x-coordinate is , such as , and .
| Value of a | Position | Example |
|---|---|---|
| right of the y-axis | ||
| on the y-axis | ||
| left of the y-axis |
- It crosses the x-axis once, at , its x-intercept.
- It runs the same way as a vertical line.
- It is a special case of the equation of a straight line.
Why there is no y in the equation
An equation lists the conditions a point must meet. Here the only condition is ; any height will do. A missing variable means that coordinate is free.
How to draw x = a
- Find .
- Mark on the x-axis.
- Mark a point straight above it, such as .
- Join them and extend the line up and down.
Why Is the Slope of a Line Parallel to the Y-Axis Undefined?
Slope is rise over run, and here the run is always zero. For two points and :
- because .
- So would need a number that gives 5 when multiplied by 0. None exists.
- The slope is undefined: not zero, not large, not a number.
Zero slope means flat; an undefined slope means upright. Mixing them up is the most common error.
Why "infinite slope" is loose talk
Slope is the tangent of the angle the line makes with the x-axis. Watch it as the line steepens:
- at , slope
- at about , slope
- at about , slope
- at , no value at all

- Just past vertical, at , the slope is .
- From one side the slope races up; from the other it races down. There is no single number, so "infinite" hides the picture.
How Do You Find the Equation of a Line Parallel to the Y-Axis?
You need one number: the x-coordinate of any point on the line. Through , the line is , and is ignored.
- If x changed, the line would tilt. So the equation locks x and says nothing about y.
Spotting one from two points
Compare the x-coordinates first. and share , so the line is . The slope formula would divide by zero, which says the same thing.
Why x = a cannot be written as y = mx + c
- Slope-intercept form needs a slope, and this line has none.
- It also needs a y-intercept, and never crosses the y-axis.
- The general form has room. Choose :
For example, is the line . Any linear equation with no term is one of these lines.
What Is the Equation of the Y-Axis Itself?
Every point on the y-axis, like or , has x-coordinate 0, so its equation is .
What Are the Properties of a Line Parallel to the Y-Axis?
Locking x to a constant gives this line its own set of properties.
- Equation : one constant describes the whole line.
- Same x for every point: y can be any real value.
- Undefined slope: the run is 0.
- Not a function of x: it fails the vertical line test (next section).
- Perpendicular to the x-axis, meeting it at .
- Never crosses the y-axis unless .
- Distance from the y-axis: , right if , left if .
Distances and meeting points
Two lines and never meet, and the gap is the same at every height:
- The halfway line is .
- To meet a slanted line, put into it. For and : , so .
- A horizontal line meets it at , at a right angle.
Why x = a Is Not a Function of x
A function gives each input one output, but pairs the input 2 with every y. The points , and all lie on it. It fails the vertical line test.

Turn it around: with y as the input, the output is always 2. As a function of , is a constant function.
Try It Yourself
In the tool, drag both blue handles to the same x, such as and : reads "undefined". Put the orange handles at and and the verdict says perpendicular. Nudge one blue handle sideways and an enormous slope appears.
Examples of the Equation of a Line Parallel to the Y-Axis
Six short examples, from reading off a point to a pair of parallel lines.
Example 1
Write the line parallel to the y-axis through (4, 5).
- The x-coordinate is 4; the y-value is ignored.
Answer: .
Example 2
Find the line through (−2, 7) parallel to the y-axis.
- is tempting, but has , so it misses the point.
- A line parallel to the y-axis fixes x, and the point's x-coordinate is .
Answer: .

Example 3
Find the line parallel to the y-axis and 6 units to its left.
- Left means a negative x-value.
Answer: .
Example 4
A line parallel to the y-axis has the same x-intercept as 3x + 5y − 15 = 0. Find it.
- Set : , so .
Answer: .
Example 5
Find the line parallel to the y-axis through the point where 2x + y = 7 and x − y = 2 meet.
- Add the equations: , so .
- Then ; they meet at .
Answer: .

Example 6
How far apart are x = −3 and x = 4, and which line lies midway?
- Distance: units.
- Midway: .
Answer: 7 units apart; is halfway.

Where Do Students Trip Up on Lines Parallel to the Y-Axis?
Mistake 1: Writing y = a instead of x = a
Where it slips in: The question says "y-axis", or the familiar "" habit takes over.
Don't do this: Write for the line through .
The correct way: Along the y-direction, y varies and x stays fixed. Write .
Mistake 2: Calling the slope zero
Where it slips in: Mixing up which axis-parallel line has slope 0.
Don't do this: Say the slope of is 0.
The correct way: From to : rise 3, run 0, and has no value. Zero slope belongs to flat lines.
Mistake 3: Forcing x = a into y = mx + c
Where it slips in: Treating as "the" equation of a line and meeting .
Don't do this: Invent a huge , or write .
The correct way: Say it has no slope-intercept form, and write , the general form .
Mistake 4: Giving one answer to "4 units from the y-axis"
Where it slips in: A distance with no left or right given.
Don't do this: Give only .
The correct way: Give both lines, and .
Where Does the Equation x = a Show Up in the Real World?
A line is perfect verticality: a fixed across-position while something varies up and down.
- Building: a plumb line hangs along a true vertical, on a drawing. Builders use it to check walls are upright.
- Screens: every pixel in one column shares the same x-address.
- Charts: a marker line at noon, , holds the time fixed whatever the temperature.

Builders have used the plumb bob for thousands of years. Since René Descartes' La Géométrie (1637), that vertical can be written as a line whose x never changes.
Conclusion
- A line parallel to the y-axis is ; the y-axis itself is .
- One number writes it: the x-coordinate of any point on the line.
- Its slope is undefined, not zero.
- It has no form and is not a function of .
- The equation always starts with , never .
Read More
- Equation of Line Parallel to X Axis
- Slope
- X and Y Axis in a Graph
- Finding Slope From Two Points
- Cartesian Plane
- Straight Line
Practice These to Solidify Your Understanding
Work through these in order:
- Write the line parallel to the y-axis through .
- Give both lines that are 5 units from the y-axis.
- Find where meets .
- Find the distance between and .
Answers:
- .
- and .
- , so : the point .
- 8 units.
Got or for the first one? Reread Mistake 1. Next, notice that and always cross at .
To take coordinate geometry further with a teacher, explore Bhanzu's geometry tutor, a high school math tutor, or math classes online for guided straight-line practice.
Want a live Bhanzu trainer to walk your child through vertical and horizontal lines? Book a free demo class, online globally, or in person at our McKinney, TX center.
Research Behind This Article
- OpenStax, College Algebra 2e, Section 4.1: Linear Functions (vertical lines and their undefined slope). openstax.org
- OpenStax, Precalculus 2e, Section 2.2: Graphs of Linear Functions (horizontal, vertical, parallel and perpendicular lines). openstax.org
- OpenStax, Precalculus 2e, Section 2.1: Linear Functions (slope and the forms of a line). openstax.org
- J. J. O'Connor and E. F. Robertson, René Descartes, MacTutor History of Mathematics, University of St Andrews (coordinates that turn lines into equations). mathshistory.st-andrews.ac.uk
Quick Quiz: Check Yourself
Three levels, questions with figures, instant feedback with the reason.
Was this article helpful?
Your feedback helps us write better content
Frequently Asked Questions
What is the equation of a line parallel to the y-axis?
What is the slope of a line parallel to the y-axis?
Is x = a a function?
How is it different from a line parallel to the x-axis?
Is a vertical line the same as a line parallel to the y-axis?
What is required to find the equation of a line parallel to the y-axis?
