Math AAHL
Math AASL
Terms of Service
Login
Sign Up
erplex
LoginJoin
IB Math AASL
/
2: Functions
/
Cartesian plane & lines

Cartesian plane & lines

erplex

© 2025 Perplex Learning Incorporated. All rights reserved.

All content on this website has been developed independently from and is not endorsed by the International Baccalaureate Organization. International Baccalaureate and IB are registered trademarks owned by the International Baccalaureate Organization.

TeamContactTerms of ServicePrivacy Policy

Distance, Midpoint, & Gradient

The picture below shows a zip line route over a river. The zip line starts from a cliff on one side of the river and ends at a lower cliff on the other side. Unfortunately, on the day an adventure tour is supposed to use the zip line, the river is filled with hungry crocodiles. The tour guide needs to know how close the zip line will get to the river: if it's fewer than 20 meters, they will have to cancel the tour and reschedule for a later date when the crocodiles leave.


The tour guide can't exactly measure the distance between the lowest point of the zip line over the water and the river itself -- she'd rather not risk getting eaten -- but she does know that the leftmost cliff is 28 meters above the river and the rightmost cliff is 20 meters above the river. The water ends 30 meters to the right of the first cliff, and the zip line ends 20 meters to the right of that (i.e.,50 meters directly right from where it begins).

Powered by Desmos

How close (vertically) will the zip line get to the river? Can the tour be held, or will they have to postpone it for later, when the crocodiles are out of town?


This is obviously a silly, made-up scenario, but the core knowledge necessary to answer it is crucial to any understanding of mathematics. Given that this section is about the distinctly un-flashy straight lines, this might surprise you, but straight lines are just as fundamental to the study of math as they are to our experience of the real world: if, as Galileo famously claimed, math is the language of the universe, then lines might be the alphabet. Studying geometric concepts like we'll do in this unit brings a new way of experiencing the world we live in every day. In order to get to the flashy stuff, we first need to go over the basics of the Cartesian plane and straight lines. But don't write off these concepts so quick. They're the backbone of any real understanding of geometry, and some of the most powerful and useful mathematical tools we have.

To begin our exploration of lines, we'll discuss how to find the distance between two points. To begin that discussion, we need a quick refresher on how we define a "point" mathematically.


"Plotting a point" is a mathematical way to say "giving a location." Points aren't like physical objects: they don't have a side length or an area, so when a math problem "defines" a point, it's really just giving you directions.


We plot points on the Cartesian plane. (The word "Cartesian" doesn't have a specific mathematical meaning, but modern-day graphing conventions still use the same system that French philosopher/mathematician/smart guy René Descartes came up with hundreds of years ago, which means it's important enough that they named it after him.)


The Cartesian plane has two "axes," which are just lines that we use as a reference for everything else on the plane, kind of like the scale on a map. The "x-axis" gives information about the horizontal position of a coordinate, and the "y-axis" gives information about the vertical position of a coordinate. When we plot a point on the plane, we describe its position using an ordered pair (x,y), where we replace x and y with the specific location of a given point, like so:

Powered by Desmos

Moving to the right on the x axis increases the value of the x coordinate, and moving to the left decreases it. Similarly, moving up on the y axis increases the value of the y coordinate, and moving down decreases it. We call the point (0,0) the origin, which is where the x- and y-axes meet. Crossing from one side of the origin to the other changes the sign (positive or negative) of the x- or y-coordinate, depending on whether it was crossed horizontally or vertically.


The Cartesian plane has four "quadrants," numbered with Roman numerals I−IV. The first quadrant is the one where both x and y are positive, and we move in a counterclockwise rotation (like drawing the letter "C"!) to count up and label the rest of the quadrants. These are indicated on the example diagram above.

Checkpoint

Drag the point A to the coordinates (4,1).

Powered by Desmos

Now that we know how to define a point's location, let's discuss how to find the distance between two points.

Discussion

To start, consider the diagram below. You can click and drag the red highlighted points to move them. The blue point will always move around with the other points so that it maintains a right angle. Its coordinates, as well as the lengths of the dashed blue lines, are labeled.

Powered by Desmos

The distance between the two red points is the length of the red line between them. Try placing the points in several different places and calculating the length. Can you come up with general equation that describes the distance between the two points, regardless of their precise locations on the plane?

Let A=(x1​,y1​) and B=(x2​,y2​). The horizontal and vertical legs of the right-angled triangle joining A and B have lengths

∣∣​x2​−x1​∣∣​and∣∣​y2​−y1​∣∣​

respectively. By the Pythagorean theorem, the distance d between A and B is

d=√(x2​−x1​)2+(y2​−y1​)2​

For example, when A=(−5,−1.1) and B=(−1,2.9),

x2​−x1​=−1−(−5)=4,y2​−y1​=2.9−(−1.1)=4,

so

d=√42+42​=√32=4√2

In all cases, we can use the Pythagorean theorem formula above.

The formula that computes the distance between any two points is called the distance formula, and is crucial to our study of lines.

Distance between 2 points

The distance between two points (x1​,y1​) and (x2​,y2​) is given by

d=√(x1​−x2​)2+(y1​−y2​)2​📖

Powered by Desmos

Checkpoint

Two points are situated on the coordinate plane. Point A is located at (3,8), and Point B is located at (k,0).

For which two values of k will the distance between the two points be 10?

Select the correct option

Once we know the distance between two points, we can describe the location of the point located exactly halfway between them, called the midpoint. Finding the midpoint is incredibly useful in many different geometric settings, and straightforward enough that understanding how to locate it now helps us to conceptualize what A natural next concept to define is the midpoint between two given points. This is simply the point halfway between two others. Finding the midpoint will be useful later when we're asked about perpendicular bisectors and other geometric concepts. For now, we just need to know how to find them.


The formula is fairly straightforward: we add both x coordinates and divide by two to "average" the two x-values, and do the same for y-values:

Midpoint of 2 points

The coordinates of the midpoint of two points is

(2x1​+x2​​,2y1​+y2​​)📖


Powered by Desmos

Checkpoint

The points P and Q are located on the coordinate plane with midpoint R between them. The point P is located at (1,3), and the point R is located at (25​,5).

Find the coordinates of the point Q.

Select the correct option

Although we haven't formally defined any lines yet, in our discussion of distances and midpoints thus far, we have been relying on lines between two points: distance is the length of the shortest segment between any two lines, and the midpoint between these two points lies halfway down this shortest segment.

Powered by Desmos

So far, we've just been sketching this line, since we haven't needed to specifically define it in order to calculate its length or find a point halfway between them. But it's natural to wonder how we might describe the characteristics of our sketch of a "shortest line."

Discussion

One way to talk about the shortest line between any two points is to describe how "steep" it is.

How might we calculate the "steepness" of a given line? Try coming up with an idea for a formula that describes steepness, instead of trying to calculate it outright, by thinking about what we're asking when we're asking how "steep" a line really is. Can you write an equation?

One natural way to measure “steepness” is to ask how much y changes for a given change in x. If a line passes through two points (x1​,y1​) and (x2​,y2​), then its steepness (often called the slope m) is

m=ΔxΔy​=x2​−x1​y2​−y1​​

This tells you the “rise” over the “run.” Equivalently, if θ is the angle the line makes with the positive x-axis, then

m=tanθ

We call the value that determines a line's "steepness" its gradient, or slope, and typically denote it m. We calculate the value of any line's gradient as

m=change inxchange iny​=‘‘run’’‘‘rise’’​=x2​−x1​y2​−y1​​

where (x1​,y1​) and (x2​,y2​) are any two points on the line.

Powered by Desmos

Finding gradient using 2 points

The gradient of the line is a measure of its steepness. It is calculated by measuring the rise (change in y) in the line over a certain run (change in x).


The gradient of the line passing through the points (x1​,y1​) and (x2​,y2​) is

m=x2​−x1​y2​−y1​​📖


Powered by Desmos

Discussion

Is it important that we subtract the coordinates of the "first" point from the second in the equation for the gradient, instead of the other way around? Could we write x1​−x2​y1​−y2​​ instead?


How about putting the change in x on top of the fraction instead, like y2​−y1​x2​−x1​​? Why wouldn't this work?

We always write the gradient of the line through P1​(x1​,y1​) and P2​(x2​,y2​) as

m=ΔxΔy​=x2​−x1​y2​−y1​​,

because “rise” is the change in y and “run” is the change in x, and both must be measured in the same direction (from one point to the other).

  1. Could we instead write

    x1​−x2​y1​−y2​​?

    Yes—note that

    y1​−y2​=−(y2​−y1​),x1​−x2​=−(x2​−x1​),
    so
    x1​−x2​y1​−y2​​=−(x2​−x1​)−(y2​−y1​)​=x2​−x1​y2​−y1​​=m.
    In other words, as long as you reverse both numerator and denominator, the two negatives cancel and you recover the same slope.


  2. What about swapping rise and run, writing

    y2​−y1​x2​−x1​​?

    That gives

    y2​−y1​x2​−x1​​=x2​−x1​y2​−y1​​1​=m1​,
    which is the reciprocal of the slope, not the slope itself. Thus it does not measure “rise over run” and so is generally wrong for the gradient.


Conclusion: the two differences Δy and Δx must be taken in the same order to keep the sign correct, and rise must be over run—if you only reverse one difference you get −m, and if you swap numerator and denominator you get 1/m, neither of which is the correct gradient.

Checkpoint

A line passes through the points (−2,3) and (4,0).

Find the gradient of the line.

Select the correct option

Now that we're prepared to answer it, let's return to our friendly tour guide and not-so-friendly crocodiles from earlier. Here's a reminder of what we were asking:

0 / 3

0 / 7

Chat

Ask questions about the content or request clarifications