Chapter 3 ยท Algebraic foundations

Horizontal and Vertical Distance on the Coordinate Plane

Find the exact distance between two points that share a horizontal or vertical line, then use those distances to solve word problems set on a coordinate plane.

16 min read

You already know how to plot a point from its ordered pair (x,y)(x, y). In this lesson you will measure how far apart two points are when they line up straight across or straight up and down.

A horizontal line runs left and right, and every point on it has the same yy-coordinate. A vertical line runs up and down, and every point on it has the same xx-coordinate. So you can tell from the coordinates alone whether two points share one of these lines: exactly equal yy-coordinates mean a shared horizontal line, and exactly equal xx-coordinates mean a shared vertical line.

The distance between two points is the length of the straight path from one to the other. Here you will count it in grid units: one grid unit is the length from 00 to 11 on either axis. A distance tells you how far, not which way, so it is never negative.

Coordinate grid from x -6 to 6 and y -2 to 6, with a grid step of 1, showing 4 plotted elements. Details: line 0 x plus 1 y equals 3; point at (-4, 3), named Point A; point at (5, 3), named Point B; point at (0, 3), named (0, 3).
Point A is at (โˆ’4,3)(-4, 3) and Point B is at (5,3)(5, 3). Both are on the horizontal line y=3y = 3, which crosses the yy-axis at (0,3)(0, 3).

In the figure, the horizontal axis is the xx-axis and the vertical axis is the yy-axis, and both use grid units. Point A is at (โˆ’4,3)(-4, 3) and Point B is at (5,3)(5, 3). The two yy-coordinates are both 33, so A and B are on the horizontal line y=3y = 3, the line of all points whose yy-coordinate is 33. The point labeled (0,3)(0, 3) marks where that line crosses the yy-axis.

Travel along the line from A to B. You go 44 units to get from x=โˆ’4x = -4 to x=0x = 0, then 55 more units to get from x=0x = 0 to x=5x = 5. That is 4+5=94 + 5 = 9 units in all.

Subtraction gives the same result in one step. Take the xx-coordinate of B and subtract the xx-coordinate of A: 5โˆ’(โˆ’4)=5+4=95 - (-4) = 5 + 4 = 9. Subtracting a negative number is the same as adding its opposite, which is the number the same distance from zero on the other side. The opposite of โˆ’4-4 is 44, and that is exactly why the 44 units to the left of zero get added on.

What if you subtract in the other order? Then you get โˆ’4โˆ’5=โˆ’9-4 - 5 = -9. The size, 99, is right, but a distance is never negative. The tool that fixes this is absolute value. The absolute value of a number is its distance from zero on a number line. You write it with bars, so โˆฃโˆ’9โˆฃ=9|-9| = 9 and โˆฃ9โˆฃ=9|9| = 9.

A difference is the result of a subtraction. The two differences here, 5โˆ’(โˆ’4)5 - (-4) and โˆ’4โˆ’5-4 - 5, are opposites, so they have the same absolute value: โˆฃ5โˆ’(โˆ’4)โˆฃ=โˆฃ9โˆฃ=9|5 - (-4)| = |9| = 9 and โˆฃโˆ’4โˆ’5โˆฃ=โˆฃโˆ’9โˆฃ=9|-4 - 5| = |-9| = 9. Once you take the absolute value, the order of subtraction does not matter.

Key concept

Distance along a horizontal or vertical line

Let two points be (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2). Their coordinates can be any positive numbers, negative numbers or zero. Let dd be the distance between the points, in grid units.

  • If y1=y2y_1 = y_2, the points share a horizontal line, and dd is the absolute value of the difference of the xx-coordinates.
  • If x1=x2x_1 = x_2, the points share a vertical line, and dd is the absolute value of the difference of the yy-coordinates.

Decide which case you have from the exact coordinates, not from how a picture looks. The distance dd is never negative, and it is exact whenever the coordinates are exact. If the two points have different xx-coordinates and different yy-coordinates, this rule does not apply.

d=โˆฃx2โˆ’x1โˆฃย ifย y1=y2,d=โˆฃy2โˆ’y1โˆฃย ifย x1=x2d = |x_2 - x_1| \text{ if } y_1 = y_2, \qquad d = |y_2 - y_1| \text{ if } x_1 = x_2

Worked example

Two points on a vertical line

Find the distance between C(2,โˆ’7)C(2, -7) and D(2,โˆ’3)D(2, -3). Both axes use grid units.

  1. Compare the coordinates to see which line the points share. Both x-coordinates are 2, so C and D are on the vertical line x = 2. The y-coordinates are different, so those are the ones to subtract.

  2. Subtract the y-coordinates. Subtracting -7 is the same as adding its opposite, 7.

    โˆ’3โˆ’(โˆ’7)=โˆ’3+7=4-3 - (-7) = -3 + 7 = 4
  3. Take the absolute value, because a distance is never negative. The difference 4 is already positive, so it stays 4. Check by subtracting in the other order: you get -4, and its absolute value is 4 as well.

    โˆฃโˆ’3โˆ’(โˆ’7)โˆฃ=โˆฃ4โˆฃ=4โˆฃโˆ’7โˆ’(โˆ’3)โˆฃ=โˆฃโˆ’4โˆฃ=4|-3 - (-7)| = |4| = 4 \qquad |-7 - (-3)| = |-4| = 4

Answer

The distance between C and D is exactly 44 grid units.

A word problem puts real places on the coordinate plane. Before you calculate, settle three things:

  • what the xx-coordinate measures,
  • what the yy-coordinate measures,
  • the scale, which is the real length that one grid unit stands for.

Then find each distance in grid units from the exact coordinates. Convert to the real unit last: multiply the number of grid units by the real length of one grid unit. That step is valid only when the problem states the scale and the scale is the same along the line you are measuring. Put every length in the same unit before you add or compare.

Here is a park map on a coordinate plane. A statue stands at the origin, (0,0)(0, 0). The xx-coordinate gives a place's position east (positive) or west (negative) of the statue, so the xx-axis runs west to east. The yy-coordinate gives its position north (positive) or south (negative) of the statue, so the yy-axis runs south to north. One grid unit on either axis stands for 1010 meters.

In the figure, Point E is the entrance at (โˆ’6,4)(-6, 4), Point F is the fountain at (3,4)(3, 4) and Point G is the garden at (3,โˆ’2)(3, -2). So the entrance is 66 grid units west and 44 grid units north of the statue. One straight path joins the entrance to the fountain along the horizontal line y=4y = 4. Another joins the fountain to the garden along the vertical line x=3x = 3. The figure draws each whole line, but a path is only the part between its two points.

Coordinate grid from x -8 to 6 and y -4 to 6, with a grid step of 1, showing 5 plotted elements. Details: line 0 x plus 1 y equals 4; line 1 x plus 0 y equals 3; point at (-6, 4), named Point E; point at (3, 4), named Point F; point at (3, -2), named Point G.
Point E (โˆ’6,4)(-6, 4) is the entrance, Point F (3,4)(3, 4) is the fountain and Point G (3,โˆ’2)(3, -2) is the garden. The paths lie on the lines y=4y = 4 and x=3x = 3.

Worked example

A walk through the park

On the park map, one grid unit on either axis stands for 1010 meters. The entrance is Point E at (โˆ’6,4)(-6, 4), the fountain is Point F at (3,4)(3, 4) and the garden is Point G at (3,โˆ’2)(3, -2). You walk the straight path from the entrance to the fountain, then the straight path from the fountain to the garden. How many meters do you walk?

  1. Entrance to fountain: E and F both have y-coordinate 4, so they are on the horizontal line y = 4. Subtract their x-coordinates and take the absolute value. Subtracting -6 is the same as adding 6.

    โˆฃ3โˆ’(โˆ’6)โˆฃ=โˆฃ3+6โˆฃ=9|3 - (-6)| = |3 + 6| = 9
  2. Fountain to garden: F and G both have x-coordinate 3, so they are on the vertical line x = 3. Subtract their y-coordinates and take the absolute value. The difference is -6, and a distance is never negative, so the absolute value turns it into 6.

    โˆฃโˆ’2โˆ’4โˆฃ=โˆฃโˆ’6โˆฃ=6|-2 - 4| = |-6| = 6
  3. Add the two parts of the walk. Both are in grid units, so you can add them directly. This is the length of the walk along the two paths. It is not the straight-line distance from E to G: those two points share neither coordinate, so the rule does not apply to that pair.

    9+6=159 + 6 = 15
  4. Convert to meters. Each grid unit stands for 10 meters on both axes, so multiply the number of grid units by 10.

    15ย gridย unitsร—10ย metersย perย gridย unit=150ย meters15 \text{ grid units} \times 10 \text{ meters per grid unit} = 150 \text{ meters}

Answer

You walk exactly 150150 meters: 9090 meters from the entrance to the fountain and 6060 meters from the fountain to the garden.

Worked example

Fencing a rectangular dog park

A town plans a rectangular dog park on a coordinate plane. The xx-coordinate is the position east (positive) or west (negative) of a lamp post at the origin, and the yy-coordinate is the position north (positive) or south (negative) of it. One grid unit on either axis stands for 44 meters. Three corners are at (โˆ’4,โˆ’1.5)(-4, -1.5), (3.5,โˆ’1.5)(3.5, -1.5) and (3.5,2)(3.5, 2), and every side is horizontal or vertical. Where is the fourth corner, and how many meters of fence go all the way around?

  1. Find the fourth corner. The side from (-4, -1.5) to (3.5, -1.5) is horizontal, so the other side at (-4, -1.5) is vertical: the missing corner has x-coordinate -4. The side from (3.5, -1.5) to (3.5, 2) is vertical, so the other side at (3.5, 2) is horizontal: the missing corner has y-coordinate 2.

    (โˆ’4,2)(-4, 2)
  2. Find the length of a horizontal side. The corners (-4, -1.5) and (3.5, -1.5) share the y-coordinate -1.5, so subtract their x-coordinates and take the absolute value. Subtracting -4 is the same as adding 4.

    โˆฃ3.5โˆ’(โˆ’4)โˆฃ=โˆฃ3.5+4โˆฃ=7.5|3.5 - (-4)| = |3.5 + 4| = 7.5
  3. Find the length of a vertical side. The corners (3.5, -1.5) and (3.5, 2) share the x-coordinate 3.5, so subtract their y-coordinates and take the absolute value. Subtracting -1.5 is the same as adding 1.5.

    โˆฃ2โˆ’(โˆ’1.5)โˆฃ=โˆฃ2+1.5โˆฃ=3.5|2 - (-1.5)| = |2 + 1.5| = 3.5
  4. Add the four sides in grid units. Opposite sides of a rectangle have equal lengths, so there are two sides of 7.5 units and two sides of 3.5 units. The coordinates agree: the top side joins (-4, 2) and (3.5, 2), and those x-coordinates are also 7.5 units apart.

    2(7.5)+2(3.5)=15+7=222(7.5) + 2(3.5) = 15 + 7 = 22
  5. Convert to meters. Each grid unit stands for 4 meters on both axes, so multiply the number of grid units by 4.

    22ย gridย unitsร—4ย metersย perย gridย unit=88ย meters22 \text{ grid units} \times 4 \text{ meters per grid unit} = 88 \text{ meters}

Answer

The fourth corner is at (โˆ’4,2)(-4, 2), and the fence around the dog park is exactly 8888 meters long.

Here is the idea to keep. When two points share a coordinate, the distance between them is the absolute value of the difference of the coordinates that do not match. Equal yy-coordinates mean a horizontal line, so you subtract xx-coordinates. Equal xx-coordinates mean a vertical line, so you subtract yy-coordinates. Trust the exact coordinates rather than how a picture looks, keep every sign until the absolute value at the end, and expect a distance that is never negative. In a word problem, name what each axis measures and what one grid unit stands for, work in grid units, then convert so every length is in the same real unit.