Junior Cycle Maths

Geometry and trigonometry · Chapter 30

Coordinate geometry

Clear notes, 3 worked examples and 3 questions to try.

01 · Understand the idea

The essentials

Key terms

Coordinate
A number locating a point relative to axes.
Midpoint
The point halfway between two endpoints.
Slope
Vertical change divided by horizontal change.

Key ideas

  • An ordered pair (x,y)\displaystyle (x,y) gives horizontal movement first and vertical movement second.
  • The midpoint is (x1+x22,y1+y22)\displaystyle (\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}).
  • Distance is d=(x2−x1)2+(y2−y1)2\displaystyle d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}, from Pythagoras.
  • Slope is m=y2−y1x2−x1\displaystyle m=\frac{y_2-y_1}{x_2-x_1} when the denominator is non-zero.
  • A horizontal line has slope zero. A vertical line has undefined slope and equation x=k\displaystyle x=k.
From A to B: slope is 4/6 = 2/3; the midpoint averages the coordinates to give (4, 4).

03 · Follow the working

Worked examples

Read the question first. Cover the working and decide what you would do next.

New step-by-step examples

Midpoint
xy-6-5-4-3-2-1123456-3-2-1123A(−3, −2)B(3, 4)M(0, 1)
M lies halfway along the segment from A to B.

Find the midpoint of A(−3, −2) and B(3, 4).

M=(x1+x22,y1+y22)M=\left(\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2}\right)

Label A as point 1 and B as point 2.

M=(−3+32,−2+42)M=\left(\dfrac{-3+3}{2},\dfrac{-2+4}{2}\right)

Substitute the x-values together and the y-values together.

M=(02,22)M=\left(\dfrac{0}{2},\dfrac{2}{2}\right)

Add each pair before dividing.

Final answerM=(0,1)M=(0,1)
Distance between two points
xy-6-5-4-3-2-1123456-3-2-1123A(−2, −1)B(4, 3)
The dashed sides show 6 units across and 4 units up. The blue segment is the distance.

Find the distance from A(−2, −1) to B(4, 3).

d=(x2−x1)2+(y2−y1)2d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}

Write the distance formula. A is point 1; B is point 2.

d=(4−(−2))2+(3−(−1))2d=\sqrt{(4-(-2))^2+(3-(-1))^2}

Subtract the coordinates in the same order. Keep brackets around negative values.

d=62+42=52d=\sqrt{6^2+4^2}=\sqrt{52}

Square each difference, then add.

Final answerd=213≈7.21 unitsd=2\sqrt{13}\approx 7.21\text{ units}
Slope of a line
xy-6-5-4-3-2-1123456-3-2-1123A(−2, 3)B(4, −1)
From A to B: move 6 units right and 4 units down. The line falls from left to right.

Find the slope through A(−2, 3) and B(4, −1).

m=y2−y1x2−x1m=\dfrac{y_2-y_1}{x_2-x_1}

Write the slope formula. The y-values go on top.

m=−1−34−(−2)m=\dfrac{-1-3}{4-(-2)}

Subtract A from B both above and below the bar.

m=−46m=\dfrac{-4}{6}

Simplify the numerator and denominator.

Final answerm=−23m=-\dfrac{2}{3}
01Distance between two points

P(0,1)\displaystyle P \left(0 , 1\right) and Q(6,9)\displaystyle Q \left(6 , 9\right) are two points. Find the distance between them.

Coordinates matching this question: P(0, 1), Q(6, 9).

Why this method? Write the coordinates in the same point order. Decide whether we need a distance, a midpoint or a slope before substituting.

Blue follows the horizontal change. Purple follows the vertical change. They become the two shorter sides used in Pythagoras.

  1. 6−0=6\displaystyle 6-0=6
    Why?Find the horizontal change from P to Q. The x-coordinate changes from 0\displaystyle 0 to 6\displaystyle 6.
  2. 9−1=8\displaystyle 9-1=8
    Why?Find the vertical change in the same point order. The y-coordinate changes from 1\displaystyle 1 to 9\displaystyle 9.
  3. d2=\displaystyle d^2=62\displaystyle 6^2+\displaystyle +82\displaystyle 8^2
    Why?These changes are the perpendicular sides of a right triangle. The straight-line distance is its hypotenuse.
  4. d2=\displaystyle d^2=36\displaystyle 36+\displaystyle +64\displaystyle 64=100\displaystyle =100
    Why?Square each change and add.
  5. d=100=10\displaystyle d=\sqrt{100}=10
    Why?Take the positive square root because a distance cannot be negative.

Think about it: Before moving on: why do the horizontal and vertical distances not simply add up to the distance?

02Midpoint of a line segment

P(3,−1)\displaystyle P \left(3 , - 1\right) and Q(5,5)\displaystyle Q \left(5 , 5\right) are two points. What is the x-coordinate of the midpoint of PQ?

Coordinates matching this question: P(3, -1), Q(5, 5).

Why this method? Write the coordinates in the same point order. Decide whether we need a distance, a midpoint or a slope before substituting.

  1. xM=x1+x22\displaystyle x_M=\frac{x_1+x_2}{2}
    Why?The midpoint x-coordinate is halfway between the two x-coordinates.
  2. xM=3+52\displaystyle x_M=\frac{3+5}{2}
    Why?Use 3\displaystyle 3 and 5,\displaystyle 5 , the x-coordinates of P and Q. The whole sum stays above the fraction bar.
  3. xM=82=4\displaystyle x_M=\frac82=4
    Why?Add first, then divide by 2\displaystyle 2.
  4. The x-coordinate is 4\displaystyle 4.
    Why?It lies halfway between 3\displaystyle 3 and 5\displaystyle 5. The question does not ask for the y-coordinate.

Think about it: Before moving on: why must the sum of the coordinates be halved?

03Slope of a line through two points

P(−2,2)\displaystyle P \left(- 2 , 2\right) and Q(1,−7)\displaystyle Q \left(1 , - 7\right) lie on a straight line. What is its slope?

Coordinates matching this question: P(-2, 2), Q(1, -7).

Why this method? Write the coordinates in the same point order. Decide whether we need a distance, a midpoint or a slope before substituting.

  1. (x1,y1)=(−2,2)\displaystyle (x_1,y_1)=(-2,2) and (x2,y2)=(1,−7)\displaystyle (x_2,y_2)=(1,-7).
    Why?Label the first point and second point. Keep the same order for both subtractions.
  2. m=−7−21−(−2)\displaystyle m=\frac{-7-2}{1-(-2)}
    Why?Slope is vertical change divided by horizontal change. Put the whole differences above and below the fraction bar.
  3. m=−93\displaystyle m=\frac{-9}{3}
    Why?Subtracting −2\displaystyle - 2 is adding 2,\displaystyle 2 , so the horizontal change is +3\displaystyle + 3.
  4. m=−3\displaystyle m=-3
    Why?Divide. A negative slope means the line falls as x increases.

Think about it: Before moving on: why does a falling line have a negative slope?

Common mistake

Reversing the point order in only half of the slope formula. For (1,2)\displaystyle (1,2) and (3,6)\displaystyle (3,6), use 6−23−1=2\displaystyle \frac{6-2}{3-1}=2, not 6−21−3=−2\displaystyle \frac{6-2}{1-3}=-2. Keep the same point order in both differences.

Exam technique

Sketch the two points to check the signs and approximate distance.

Show your method, use units where appropriate and check whether the question asks for an exact or rounded answer.

04 · Try it yourself

Self-check questions

Work on paper first, then open the answer. These are practice questions, not submitted homework.

Question 1

P(1,2)\displaystyle P \left(1 , 2\right) and Q(4,6)\displaystyle Q \left(4 , 6\right) are two points. Find the distance between them.

Coordinates matching this question: P(1, 2), Q(4, 6).
Show answer & check
5\displaystyle 5

Compare your result with the answer. If it differs, revisit a worked example and check each step.

Question 2

P(−2,3)\displaystyle P \left(- 2 , 3\right) and Q(6,9)\displaystyle Q \left(6 , 9\right) are two points. What is the x-coordinate of the midpoint of PQ?

Coordinates matching this question: P(-2, 3), Q(6, 9).
Show answer & check
2\displaystyle 2

Compare your result with the answer. If it differs, revisit a worked example and check each step.

Question 3

P(−1,4)\displaystyle P \left(- 1 , 4\right) and Q(2,−2)\displaystyle Q \left(2 , - 2\right) lie on a straight line. What is its slope?

Coordinates matching this question: P(-1, 4), Q(2, -2).
Show answer & check
−2\displaystyle - 2

Compare your result with the answer. If it differs, revisit a worked example and check each step.

Watch an explanation

Videos for this chapter

Choose one explanation, pause to work an example, then return to the notes. All Maths videos →

Corbettmaths · Start here

Linear graphs: length of a line

The YouTube player loads only when you choose this button.

Open on YouTube ↗

Classroom resources

Open slides & animated PowerPoint →
Open full-size image ↗
Enlarged maths diagram