topic badge

6.04 Horizontal and vertical lines

Lesson

Introduction

We know that if there is a common difference between the y-values as the x-values change by a constant amount, then there is a linear relationship. But what if there is no change in the y-values at all? Or if the y-values change but the x-values remains the same?

Horizontal lines

Consider the following table of values:

x12345
y44444

We can see that as the x-value increases by 1, the y-value does not change at all. We can think of this as increasing, or decreasing for that matter, by 0 each step.

We know that in a linear equation of the form y=mx+c, m is equal to the gradient which is the change in the y-value for every increase in the x-value by 1. This means we have a value of m=0. That is, the gradient of the line is 0.

If we extended the table of values one place to the left, i.e. when x=0, we would find that y still has a value of 4, this means we have a y-intercept of 4. This means we have a value of c=4.

Putting it all together we end up at the equation y=0x+4 which simplifies to y=4.

A horizontal line has a gradient of zero (m=0), and an equation of the form: y=c where c is the y-intercept of the line.

The x-axis is a horizontal line, and every point on it has a y-value of 0 so the equation of the x-axis is y=0.

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y

Here are two examples of horizontal lines.

Exploration

Use the following applet to explore horizontal lines:

Loading interactive...

If a line is horizontal, the points on the line have different x-coordinates but the same y-coordinates.

Examples

Example 1

What is the equation of this line?

-4
-3
-2
-1
1
2
3
4
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

Recall that horizontal lines have equations of the form y=c, where c is the y-intercept.

Apply the idea

The y-intercept of the horizontal line is y=4, so c=4.

So, the equation of the line is y=4.

Idea summary

A horizontal line has a gradient of zero (m=0), and an equation of the form: y=c where c is the y-intercept of the line.

The x-axis is a horizontal line, and every point on it has a y-value of 0 so the equation of the x-axis is y=0.

Vertical lines

Consider the following table of values:

x44444
y12345

We can see that the x-value is not changing, and the y-value is increasing by 1 each time. Whatever the y-value is, x is always equal to 4, so the equation is x=4.

x44444
y15-81350

It doesn't actually matter what the increase in y-value is. The table could be like this one, and it would still have the same equation x=4.

In this case the gradient is considered to be undefined.

A vertical line has an undefined gradient, and an equation of the form: x=c where c is the x-intercept of the line.

The y-axis is a vertical line, and every point on it has an x-value of 0 so the equation of the y-axis is x=0.

-2
-1
1
2
3
4
5
6
x
-4
-3
-2
-1
1
2
3
4
y

Here are two examples of vertical lines.

Exploration

Use the following applet to explore vertical lines:

Loading interactive...

If a line is vertical, the points on the line have different y-coordinates but the same x-coordinates.

Examples

Example 2

Is the graph of y=2 a horizontal or vertical line?

Worked Solution
Create a strategy

Recall that horizontal lines are all of the form y=c, and vertical lines are of the form x=c.

Apply the idea

The equation y=2 is in the form of y=c, so the graph is a horizontal line.

Example 3

Consider the points in the plane below.

-7
-6
-5
-4
-3
-2
-1
1
x
-4
-3
-2
-1
1
2
3
4
5
y
a

Which of the following statements is true?

A
The set of points lie on a vertical line.
B
The set of points lie on a decreasing line.
C
The set of points lie on an increasing line.
D
The set of points lie on a horizontal line.
Worked Solution
Create a strategy

Draw a line through the points.

Apply the idea
-7
-6
-5
-4
-3
-2
-1
1
x
-4
-3
-2
-1
1
2
3
4
5
y

Since the set of points are (-6,5), (-6,2), (-6,-1), and (-6,-4), the x-values are the same.

This means the set of points lie on a vertical line, so the answer is option A.

b

What is the equation of the line passing through these points?

A
x=-6
B
y=x-6
C
y=-6
Worked Solution
Create a strategy

Recall that vertical lines are of the form x=c, where c is the x-intercept.

Apply the idea

We knew from part (a) that the line is vertical, so it must be in the form of x=c having c=-6, since it the x-intercept.

The answer is option A: x=-6.

Example 4

What is the equation of the line that is parallel to the y-axis and passes through the point (-8,3)?

Worked Solution
Create a strategy

Any line that is parallel to the y-axis is a vertical line and all vertical lines are in the form of x=c. where c is the x-coordinate of every point on the line.

Apply the idea

The x-coordinate of the point (-8,3) is -8, so c=-8.

The equation is x=-8.

Idea summary

A vertical line has an undefined gradient, and an equation of the form: x=c where c is the x-intercept of the line.

The y-axis is a vertical line, and every point on it has an x-value of 0 so the equation of the y-axis is x=0.

Outcomes

VCMNA283

Plot linear relationships on the Cartesian plane with and without the use of digital technologies

What is Mathspace

About Mathspace