Writing an Equation of a Line Parallel or Perpendicular to an Axis

1.14.5 Writing an Equation of a Line Parallel or Perpendicular to an Axis

1.14.5 • Writing an Equation of a Line Parallel or Perpendicular to an Axis

Activity

The line x = 5 x = 5 and the point ( 3 , − 2 ) ( 3 , − 2 ) are shown on the graph.

A graph with a vertical arrowed line passing through x = 5, and a light blue point at (3, -2) on a labeled x and y axis grid. ranging from -8 to 8.

Work with a partner to complete the tasks:

1.

Identify the slope of the original line, l l .

Compare your answer:

Undefined

Use the graphing tool or technology outside the course.

2.

Graph line m m through the point 3,−23,−2 and parallel to line l l using the Desmos tool.

Compare your answer:

A coordinate grid showing two vertical blue parallel lines, labeled M at x=3 and L at x=5, with arrows indicating upward and downward directions.

Then,

3.

Identify the slope of the new line, m m .

Compare your answer:

Undefined

4.

Write the equation of the new line, m m .

Compare your answer:

x = 3 x = 3

Use the graphing tool or technology outside the course.

5.

Graph line n n through the point ( 3 , − 2 ) ( 3 , − 2 ) and perpendicular to line l l using the Desmos tool.

Compare your answer:

Graph with three blue lines: line l at x = 5, line m at x = 3, and line n at y = -2. Lines l and m are vertical, n is horizontal. All lines are labeled, and arrows indicate they extend infinitely.

Then,

6.

Identify the slope of the new line, n n .

Compare your answer:

0

7.

Write the equation of the new line, n n .

Compare your answer:

y = − 2 y = − 2

The original line l l and the line m m that you created are both parallel to the y y -axis and perpendicular to the x x -axis. It follows, then, that line n n is parallel to the x x -axis and perpendicular to the y y -axis.

8.

Write the equation of a line that is parallel to the y y -axis and passing through ( − 2 , − 5 ) ( − 2 , − 5 ) .

Compare your answer:

x = − 2 x = − 2

9.

Write the equation of a line that is perpendicular to the y y -axis and passing through ( 1 , 5 ) ( 1 , 5 ) .

Compare your answer:

y = 5 y = 5

10.

Write the equation of a line parallel to the x x -axis and passing through ( 3 , 4 ) ( 3 , 4 ) .

Compare your answer:

y = 4 y = 4

11.

How does the line described as “parallel to the x x -axis and passing through ( 3 , 4 ) ( 3 , 4 ) ” relate to the y y -axis? Will it always, sometimes, or never be perpendicular to it?

Compare your answer:

Always perpendicular.

Self Check

Which is the equation that is perpendicular to the line  x = 1 that contains the point ( − 5 , 2 ) .
  1. y = − 2
  2. y = 1
  3. x = − 5
  4. y = 2

Additional Resources

Find Equations of Lines Perpendicular to an Axis

Lines that are horizontal or vertical are special for two reasons. First, their equations have just one variable.

  • Horizontal line y = b y = b ; because all the y y -coordinates are the same and the slope equals zero.
  • Vertical line x = a x = a ; because all the x x -coordinates are the same and the slope is undefined.

Second, they have a special relationship with the x- and y-axes because they are either parallel or perpendicular to them.

Examine the line that passes through ( 0 , 4 ) ( 0 , 4 ) and ( 3 , 4 ) ( 3 , 4 ) .

A graph with a horizontal line segment from (0, 4) to (3, 4) on the xy-plane. Arrows at both ends indicate the segment extends beyond these points. The grid is labeled from -1 to 5 on x and -1 to 7 on y.

What is the rise? The rise is 0.

What is the run? The run is 3.

What is the slope? m = rise run = 0 3 = 0 m = rise run = 0 3 = 0

So, the horizontal line passing through ( 0 , 4 ) ( 0 , 4 ) and ( 3 , 4 ) ( 3 , 4 ) has a slope of 0. For all of the points on this line, the y y -values will always equal 4. So, the equation is y = 4 y = 4 .

Also notice that it is parallel to the x x -axis and perpendicular to the y y -axis.

Now consider the vertical line passing through ( 3 , 2 ) ( 3 , 2 ) and ( 3 , 0 ) ( 3 , 0 ) .

A graph with a vertical line passing through x=3, intersecting points (3,0) and (3,2). The line extends from y = -5 to y = 5. The x- and y-axes range from -5 to 5.

What is the rise? The rise is 2.

What is the run? The run is 0.

What is the slope? m = rise run = 2 0 m = rise run = 2 0 (undefined)

So, the vertical line passing through ( 3 , 2 ) ( 3 , 2 ) and ( 3 , 0 ) ( 3 , 0 ) has an undefined slope. And, for all of the points on this line, the x x -values will always equal 3. So, the equation is x = 3 x = 3 .

Also notice that it is parallel to the y y -axis and perpendicular to the x x -axis.

Example 1

Find the equation of the line parallel to the x x -axis and passing through ( 8 , 1 ) ( 8 , 1 ) .

Step 1 - Identify the point.

( 8 , 1 ) ( 8 , 1 )

Step 2 - Identify the slope of the line.

Since the line is parallel to the x x -axis, the line is horizontal. This means the slope of the line is 0.

m = 0 m = 0

Step 3 - Substitute the values into an equation.

From here, you may know the equation, but if you don’t, then we can use the point-slope equation.

y − y 1 = m ( x − x 1 ) y − y 1 = m ( x − x 1 )

y − 1 = 0 ( x − 8 ) y − 1 = 0 ( x − 8 )

Step 4 - Simplify.

y − 1 = 0 y − 1 = 0

y = 1 y = 1

Thus, the equation of the line parallel to the x x -axis and passing through ( 8 , 1 ) ( 8 , 1 ) is y = 1 y = 1 .

Example 2

Find the equation of the line perpendicular to the x x -axis and passing through ( 8 , 1 ) ( 8 , 1 ) .

Step 1 - Identify the point.

( 8 , 1 ) ( 8 , 1 )

Step 2 - Identify the slope of the line.

Since the line is perpendicular to the x x -axis, the line is vertical. This means the slope of the line is undefined!

m = undefined m = undefined

Step 3 - Substitute the values into an equation.

Since the slope is undefined, we cannot use the point-slope equation. But, we know that if ( 8 , 1 ) ( 8 , 1 ) is on the line, then another point vertically above this point is ( 8 , 2 ) ( 8 , 2 ) . Another point vertically below this point is ( 8 , 0 ) ( 8 , 0 ) . On a vertical line, the xx-values do not change.

So, x = x 1 x = x 1

x = 8 x = 8

Example 3

Find an equation of a line perpendicular to x = 5 x = 5 that contains the point ( 3 , − 2 ) ( 3 , − 2 ) . Write the equation in slope-intercept form.

Again, since we know one point, the point-slope option seems more promising than the slope-intercept option. We need the slope to use this form, and we know the new line will be perpendicular to x = 5 x = 5 . This line is vertical, so its perpendicular will be horizontal. This tells us the m ⟂ = 0 m ⟂ = 0 .

Step 1 - Identify the point.

( 3 , − 2 ) ( 3 , − 2 )

Step 2 - Identify the slope of the perpendicular line.

m ⟂ = 0 m ⟂ = 0

Step 3 - Substitute the values into an equation.

y − y 1 = m ( x − x 1 ) y − ( − 2 ) = 0 ( x − 3 ) y − y 1 = m ( x − x 1 ) y − ( − 2 ) = 0 ( x − 3 )

Step 4 - Simplify

y + 2 = 0 y = − 2 y + 2 = 0 y = − 2

Example 4

Find an equation of a line that is perpendicular to  y = 4 y = 4 that contains the point ( 2 , 3 ) ( 2 , 3 ) . Write the equation in slope-intercept form.

The line y = 4 y = 4 is a horizontal line. Any line perpendicular to it must be vertical, in the form x = a x = a . Since the perpendicular line is vertical and passes through ( 2 , 3 ) ( 2 , 3 ) , every point on it has an x x -coordinate of 2. The equation of the perpendicular line is x = 2 x = 2 .

Try it

Find Equations of Lines Perpendicular to an Axis

Find an equation of a line that is perpendicular to  y = − 3 y = − 3 that contains the point ( − 3 , 5 ) ( − 3 , 5 ) .

Compare your answer:

Here is how to find the equation of a line perpendicular to  y = − 3 y = − 3 that contains the point ( − 3 , 5 ) ( − 3 , 5 ) .

Step 1 - Find the slope of the given line.

The line is horizontal.

m = 0 m = 0

Step 2 - Find the slope of the perpendicular line.

The perpendicular line is a vertical line.

undefined

Step 3 - Identify the point.

The given point is ( − 3 , 5 ) ( − 3 , 5 ) .

( x 1 , y 1 ) ( x 1 , y 1 )

( − 3 , 5 ) ( − 3 , 5 )

Step 4 - Write the equation.

The perpendicular line is vertical and passes through ( − 3 , 5 ) ( − 3 , 5 ) ; every point on it has an x x -coordinate of − 3 − 3 .

x = − 3 x = − 3