Back to homeMathematics · Integrated Math III · Change subject
Start for free
Math III · Mathematics
Coordinate geometry · Coordinate geometry

Horizontal and Vertical Lines

Picture a city laid out on a grid. If you walk straight east along Maple Street, your north-south address never changes, and only your east-west position does. If you walk north along 5th Avenue, it is the other way around. These two kinds of lines are so simple that you can write their equations without any formula. Let's find out how, and what happens when Maple Street and 5th Avenue cross.

Horizontal lines

A horizontal line never rises or falls. Every point on it is at the same height, so every point has the same $y$-coordinate.

Graph of the horizontal line y = 6 with the points (1, 6), (5, 6) and (8, 6) marked on it (1, 6) (5, 6) (8, 6) y = 6 x y

Slide the value of $k$ below and watch the line move up and down while it stays flat.

Practice★☆☆Not started
Write down the equation of the line parallel to the x-axis ($X$-axis) that passes through the point $A(3, -5)$.

Write down the equation of the line parallel to the x-axis ($X$-axis) that passes through the point $A(3, -5)$.

Solve
Practice★☆☆Not started
Write down the general equations of the coordinate axes $X$ and $Y$.

Write down the general equations of the coordinate axes $X$ and $Y$.

Solve

Vertical lines

Now turn the picture a quarter turn. On a vertical line you can move up and down as much as you like, but your left-right position never changes.

Graph of the vertical line x = 7 with the points (7, 1), (7, 4) and (7, 7) marked on it (7, 1) (7, 4) (7, 7) x = 7 x y

A vertical line is not the graph of a function: one $x$-value goes with many $y$-values, so it fails the vertical line test. That is why it cannot be written as $y = mx + b$.

Practice★☆☆Not started
Write down the equation of the line parallel to the y-axis ($Y$-axis) that passes through the point $B(-2, 7)$.

Write down the equation of the line parallel to the y-axis ($Y$-axis) that passes through the point $B(-2, 7)$.

Solve
Practice★★☆Not started
A delivery drone moves through a city with grid-like streets. Its path follows a straight line parallel to the $Y$-axis passing through the coordinate $(6, 2)$. Write…

A delivery drone moves through a city with grid-like streets. Its path follows a straight line parallel to the $Y$-axis passing through the coordinate $(6, 2)$. Write down the equation of its path and the coordinates of two points it will pass through.

Solve

Direction vector and slope

Every line has a direction. A direction vector $\langle a, b\rangle$ of a line is a vector that points along the line: it says how far to move right ($a$) and how far to move up ($b$) to stay on it. Any nonzero multiple of a direction vector works too.

The slope is the rise over the run, so a line with direction vector $\langle a, b\rangle$ has slope $m = \dfrac{b}{a}$. Some problems call the slope the gradient. It is the same thing.

A horizontal line with direction vector ⟨1, 0⟩ and slope 0, next to a vertical line with direction vector ⟨0, 1⟩ and undefined slope ⟨1, 0⟩ ⟨0, 1⟩ y = 3: slope 0 x = 2: slope undefined
Practice★☆☆Not started
State the direction vector and the gradient of the line with equation $y = 4$.

State the direction vector and the gradient of the line with equation $y = 4$.

Solve
Practice★☆☆Not started
State the direction vector and the gradient of the line with equation $x = -1$.

State the direction vector and the gradient of the line with equation $x = -1$.

Solve

Parametric equations

A line can also be written by saying where a moving point is at time $t$. Start at a point $(x_0, y_0)$ and move along a direction vector $\langle a, b\rangle$:

$$x = x_0 + a t, \qquad y = y_0 + b t$$

For lines parallel to the axes, one coordinate never changes. That is how you recognize them.

The vertical line x = 2, y = t with the points for t = 0, 1, 2, 3 and 4 marked on it t = 0: (2, 0) t = 1: (2, 1) t = 2: (2, 2) t = 3: (2, 3) t = 4: (2, 4) x = 2, y = t
Practice★☆☆Not started
Given the line in parametric form $x = -3$, $y = t$, state which axis it is parallel to and write down its general equation.

Given the line in parametric form $x = -3$, $y = t$, state which axis it is parallel to and write down its general equation.

Solve
Practice★★☆Not started
The printhead of a 3D printer must draw a constant horizontal support line at $15\text{ mm}$ from the origin on the $Y$-axis. Write down the parametric equations and the…

The printhead of a 3D printer must draw a constant horizontal support line at $15\text{ mm}$ from the origin on the $Y$-axis. Write down the parametric equations and the general equation of this line.

Solve

Recognizing them from two points

You don't always get the equation. Sometimes you get two points. Look for the coordinate that repeats.

Drag the point and watch which coordinate stays fixed as you move along each axis.

Practice★☆☆Not started
A line passes through the points $P(4, 2)$ and $Q(-3, 2)$. Is it parallel to either of the axes? Write down its equation.

A line passes through the points $P(4, 2)$ and $Q(-3, 2)$. Is it parallel to either of the axes? Write down its equation.

Solve

Spotting them in standard form

A line in the form $Ax + By + C = 0$ (you may also see $Ax + By = C$) is parallel to an axis exactly when one of the two variables disappears. Some problems call this form the general equation.

Comparison of the vertical line x = −C/A when B = 0 and the horizontal line y = −C/B when A = 0 x = −C/Ay = −C/B Ax + C = 0(no y, B = 0)vertical line By + C = 0(no x, A = 0)horizontal line
Practice★★☆Not started
Determine the value of $k$ so that the line with general equation $kx + 3y - 6 = 0$ is parallel to the $X$-axis. Write down the resulting equation.

Determine the value of $k$ so that the line with general equation $kx + 3y - 6 = 0$ is parallel to the $X$-axis. Write down the resulting equation.

Solve
Practice★★☆Not started
Determine the value of $a$ so that the line with equation $4x + (a+1)y - 8 = 0$ is parallel to the $Y$-axis. Write down the resulting equation.

Determine the value of $a$ so that the line with equation $4x + (a+1)y - 8 = 0$ is parallel to the $Y$-axis. Write down the resulting equation.

Solve
Practice★★★Not started
Find the value of $m$ so that the line $(m^2-9)x + (m+3)y + 5 = 0$ is parallel to the $X$-axis. Is there any value of $m$ for which this same line is parallel to the…

Find the value of $m$ so that the line $(m^2-9)x + (m+3)y + 5 = 0$ is parallel to the $X$-axis. Is there any value of $m$ for which this same line is parallel to the $Y$-axis? Justify your answer.

Solve

Intersections, perpendicular lines, and distance

A horizontal line and a vertical line always cross at a right angle. That makes several questions easy.

Two horizontal lines y = 1 and y = 5 crossed by the vertical line x = 3, with the distance 4 between the horizontal lines marked (3, 1) (3, 5) d = |5 − 1| = 4 y = 1 y = 5 x = 3
Practice★☆☆Not started
Determine the coordinates of the point of intersection of the lines $r: x = 5$ and $s: y = -2$.

Determine the coordinates of the point of intersection of the lines $r: x = 5$ and $s: y = -2$.

Solve
Practice★★☆Not started
Find the equation of the line perpendicular to $x = 7$ that passes through the point $M(-4, 9)$.

Find the equation of the line perpendicular to $x = 7$ that passes through the point $M(-4, 9)$.

Solve
Practice★★☆Not started
Calculate the minimum distance separating the parallel lines $r: y = 8$ and $s: y = -3$.

Calculate the minimum distance separating the parallel lines $r: y = 8$ and $s: y = -3$.

Solve

Paths, altitudes, and parameters

Now combine the ideas.

Stepped paths

A path made of one horizontal move and one vertical move lies on two axis-parallel lines.

A stepped path from P(1, 2) horizontally to (5, 2) and then vertically to Q(5, 8) P(1, 2) (5, 2) Q(5, 8) y = 2 x = 5

Altitudes

An altitude of a triangle is the segment from a vertex perpendicular to the opposite side. If that side is horizontal, the altitude is vertical, and vice versa.

Lines with a parameter

When a line has a parameter $k$, split into cases: the values of $k$ that make a coefficient vanish usually behave differently from all the others. Substitute the axis-parallel line into the other equation and see what is left.

Now try a vertical line with a parameter. This time the case $k = 0$ behaves differently.

Practice★★★Not started
A robotic arm must move from the point $P(-2, -5)$ to the point $Q(4, 7)$ following a stepped path composed of two segments: first a movement parallel to the $X$-axis…

A robotic arm must move from the point $P(-2, -5)$ to the point $Q(4, 7)$ following a stepped path composed of two segments: first a movement parallel to the $X$-axis and then a movement parallel to the $Y$-axis. Write the equations of the lines that contain these two segments.

Solve
Practice★★★Not started
Given the triangle with vertices $A(-3, 2)$, $B(5, 2)$ and $C(1, 8)$, find the equation of the altitude from vertex $C$. Which axis is this altitude parallel to?

Given the triangle with vertices $A(-3, 2)$, $B(5, 2)$ and $C(1, 8)$, find the equation of the altitude from vertex $C$. Which axis is this altitude parallel to?

Solve
Practice★★★Not started
Determine the relative position of the line $r: x = 4$ and the line $s: 2x + ky - 8 = 0$ depending on the parameter $k$.

Determine the relative position of the line $r: x = 4$ and the line $s: 2x + ky - 8 = 0$ depending on the parameter $k$.

Solve

Rectangles aligned with the axes

Every rectangle with its sides parallel to the axes is bounded by two horizontal and two vertical lines. This is how courts, screens, and floor plans are described in coordinates.

A basketball court 94 feet by 50 feet centered at the origin, bounded by x = −47, x = 47, y = −25 and y = 25 y = 25 y = −25 x = −47 x = 47 (0, 0)

For the court in the figure, the length of $94$ ft lies along the x-axis and the width of $50$ ft along the y-axis. So the sides are $x = \pm 47$ and $y = \pm 25$.

Practice★★☆Not started
On a soccer field, we represent the center of the field at the origin $(0,0)$. If the field is $100\text{ m}$ long (located on the $X$-axis) and $60\text{ m}$ wide…

On a soccer field, we represent the center of the field at the origin $(0,0)$. If the field is $100\text{ m}$ long (located on the $X$-axis) and $60\text{ m}$ wide (located on the $Y$-axis), write down the equations of the four straight lines that bound the playing field.

Solve
Practice★★★Not started
In the development of a video game, the screen has a resolution of $1920 \times 1080$ pixels. If we place the origin $(0,0)$ at the bottom-left corner, write the…

In the development of a video game, the screen has a resolution of $1920 \times 1080$ pixels. If we place the origin $(0,0)$ at the bottom-left corner, write the equations of the two lines (one horizontal and one vertical) that divide the screen exactly into four equal quadrants.

Solve
Practice★★★Not started
A square has its center at the point $C(3, 3)$ and its sides are parallel to the coordinate axes. If the side of the square measures $4\text{ u}$, write the equations of…

A square has its center at the point $C(3, 3)$ and its sides are parallel to the coordinate axes. If the side of the square measures $4\text{ u}$, write the equations of the four lines that contain its sides.

X Y C(3,3) 1 5 1 5 0
Solve

Constants in real situations

When a quantity stays the same no matter what the other one does, its graph is a horizontal line. When a position is fixed while the other coordinate varies, its graph is a vertical line. In a time graph, time goes on the x-axis, so a constant quantity gives $y = k$ with direction vector $\langle 1, 0\rangle$.

Gym cost graph: a flat fee line y = 30 crossing the pay-per-visit line y = 5x at the point (6, 30) flat: y = 30 pay per visit: y = 5x (6, 30) x: visits per month, y: dollars

If a problem gives a temperature or other quantity, use the number exactly as stated and label the axis with it. For example, an oven held at $450^\circ$F for all time $t$ gives $T = 450$, a horizontal line with direction vector $\langle 1, 0\rangle$.

Practice★★☆Not started
In a chemistry experiment, the temperature $T$ (in degrees Fahrenheit) is kept constant at $35^\circ\text{C}$ over time $t$ (in minutes). Representing time on the…

In a chemistry experiment, the temperature $T$ (in degrees Fahrenheit) is kept constant at $35^\circ\text{C}$ over time $t$ (in minutes). Representing time on the $X$-axis and temperature on the $Y$-axis, write down the equation of the line and its direction vector.

Solve
Practice★★★Not started
A drip irrigation system is installed along a pipe parallel to the $Y$-axis. We know that the pipe must water a tree located at the point $A(5, 12)$ and that the exact…

A drip irrigation system is installed along a pipe parallel to the $Y$-axis. We know that the pipe must water a tree located at the point $A(5, 12)$ and that the exact distance from the pipe to the $Y$-axis is $5\text{ m}$. Write down the equation of the line representing the pipe.

Solve
Practice★★★Not started
An electronic components factory has fixed monthly costs of $12000\text{ \$}$, regardless of the quantity $x$ of parts manufactured. The revenue is given by the line $y…

An electronic components factory has fixed monthly costs of $12000\text{ \$}$, regardless of the quantity $x$ of parts manufactured. The revenue is given by the line $y = 30x$. Write the equation of the fixed cost line on the $(x, y)$ plane and find the exact point where the revenue equals the fixed costs.

Solve

Summary

Back to the street grid: Maple Street is a horizontal line such as $y = 3$ and 5th Avenue is a vertical line such as $x = 5$. They are perpendicular and meet at exactly one corner, $(5, 3)$.

See all the exercises in this section