2.3.5 · D2Coordinate Geometry

Visual walkthrough — Slope (gradient) — definition, formula, interpretation

2,110 words10 min readBack to topic

Step 1 — Put two dots on a line and name them

WHAT. Draw a straight line. Mark any two different spots on it. Call the first one and give it a name for its position: . Call the second one .

WHY. A line is made of infinitely many points, but to measure how it tilts we only need two. Two dots are the fewest that can show a direction — one dot has no direction at all.

The little subscripts are just labels, not multiplication:

  • ::: reads "x-one" — the horizontal position of point .
  • ::: reads "y-one" — the vertical position of point .
  • ::: the horizontal and vertical positions of point .

PICTURE. Two amber dots and sitting on a cyan line, each with its coordinates written beside it.

Figure — Slope (gradient) — definition, formula, interpretation

Step 2 — Measure the sideways gap (the "run")

WHAT. Ask: how far to the right did I travel going from to ? That horizontal gap we call the run, written .

Term by term:

  • ::: the Greek letter delta () means "change in". So = "change in " = the run.
  • ::: where you finished horizontally (at ).
  • ::: where you started horizontally (at ).
  • ::: finished minus started = how far right you moved.

WHY finished minus started? Because a displacement is always "where I ended up" take away "where I began". If I start at desk and end at desk , I moved desks. Same idea.

PICTURE. A horizontal amber arrow along the bottom, from directly under to directly under , labelled .

Figure — Slope (gradient) — definition, formula, interpretation

Step 3 — Measure the upward gap (the "rise")

WHAT. Now ask: how far up did I climb going from to ? That vertical gap is the rise, written .

Term by term:

  • ::: "change in " = the rise.
  • ::: where you finished vertically.
  • ::: where you started vertically.
  • ::: finished height minus start height = how far up you climbed.

WHY the same order as Step 2? We subtracted 's minus 's ; here we must subtract 's minus 's same order, before . If you flip only one of them you describe a journey that no longer goes from to , and the sign comes out wrong (Step 7 shows the damage).

PICTURE. A vertical cyan arrow rising from the end of the run-arrow up to , labelled . Together the run and rise form a right-angled triangle hanging under the line.

Figure — Slope (gradient) — definition, formula, interpretation

Step 4 — Divide rise by run: the slope is born

WHAT. We now have two numbers: how far up () and how far across (). Combine them into one number by dividing:

Term by term:

  • ::: the slope — the single number we're building.
  • ::: rise divided by run.
  • top ::: the climb.
  • bottom ::: the walk across.

WHY divide, not just keep the rise? A rise of tells you nothing until you know how far you walked to earn it. Dividing gives rise per one step of run — the true steepness. Climbing over a run of (steep) and over a run of (nearly flat) both have rise , but slopes and . The division is what separates them.

PICTURE. The same triangle, now with the fraction written across it and the result boxed in amber to one side.

Figure — Slope (gradient) — definition, formula, interpretation

Step 5 — Why any two points give the same answer

WHAT. Pick a different pair of points further along the same line. They make a bigger triangle. Yet the slope comes out identical.

WHY. Both triangles hug the same line, so they have the same tilt angle at their base and both have a square (right) corner. Two triangles that share two angles are similar — same shape, scaled. Similar triangles have matching side ratios:

So is the same fraction whether the triangle is tiny or huge. This is the whole reason "the slope of a line" is a single well-defined number — it doesn't depend on where you measured.

PICTURE. Two nested right triangles under one line — a small cyan one and a large amber one — with a tick showing their equal base angle and the ratios written equal.

Figure — Slope (gradient) — definition, formula, interpretation

Step 6 — The sign of decides uphill vs downhill

WHAT. The number's sign tells the direction:

  • : as you walk right, grows → uphill
  • : as you walk right, shrinks → downhill

WHY. Walking right always means (you moved in the positive direction). So the sign of is just the sign of : a positive climb gives positive , a negative climb (a drop) gives negative .

PICTURE. Two lines side by side over the same grid: one rising left-to-right (amber, ) with an up-arrow, one falling (cyan, ) with a down-arrow.

Figure — Slope (gradient) — definition, formula, interpretation

Step 7 — The trap: swapping the order in only one place

WHAT. Suppose you correctly compute the rise as -minus-, but sloppily do the run as -minus-:

WHY it goes wrong. The bottom is the negative of the correct . Flipping only the denominator flips the whole fraction's sign, so you get — an uphill line reported as downhill.

The safe rule: if you reverse both rows you're fine — both signs flip and cancel:

PICTURE. The same triangle drawn twice: left with consistent arrows (correct), right with one arrow flipped, showing the sign flipping to the opposite.

Figure — Slope (gradient) — definition, formula, interpretation

Step 8 — The two degenerate cases: flat and wall

WHAT. Two special lines break the ordinary picture:

Flat (horizontal) line. Both points at the same height, e.g. and : Rise is zero, so . The triangle has no vertical side — it collapsed flat.

Wall (vertical) line. Both points at the same , e.g. and : Run is zero. Dividing by zero has no answer, so vertical slope is undefined — not zero! The triangle has no horizontal side to walk along.

WHY they differ. Zero on top () is a real number, namely . Zero on the bottom () is a forbidden operation. That is the whole distinction between "flat = 0" and "wall = undefined".

PICTURE. Left: a horizontal line with a squashed triangle, . Right: a vertical line with marked in red and "÷0 = undefined".

Figure — Slope (gradient) — definition, formula, interpretation

Step 9 — Slope is the tangent of the tilt angle

WHAT. Let ("theta") be the angle the line makes with the horizontal (the positive -axis), measured at the triangle's base corner. In that right triangle:

  • the side opposite to is the rise ;
  • the side adjacent to is the run .

The tangent of an angle is defined as opposite over adjacent, so:

WHY the tangent and not sine or cosine? Sine uses the slanted long side (the hypotenuse); cosine does too. But steepness is exactly "rise compared to run" — the two legs of the triangle — and the only ratio using just those two legs is the tangent. That's why slope and nothing else. As climbs toward (a wall), shoots to infinity — matching the "undefined" of Step 8.

PICTURE. The triangle with the base angle marked, the opposite side () and adjacent side () labelled, and written alongside.

Figure — Slope (gradient) — definition, formula, interpretation

See Angle of Inclination for more on , and Derivative as a Slope for what happens when the two points slide together onto a curve.


The one-picture summary

Everything above compressed into one diagram: two points → run + rise triangle → divide → the number , with its sign meaning and the flat/wall edge cases in the corners.

Figure — Slope (gradient) — definition, formula, interpretation
Recall Feynman: tell the whole story in plain words

Put two dots on a straight line. Walk from the first dot to the second: notice how far you went across (that's the run) and how far you went up (that's the rise). Always measure "where I ended minus where I started", and do it the same way for across and up — mix them up and you'll say uphill when it's downhill. Now divide up by across: that single number is the slope. It's "how much you climb for each step forward". A big positive number is a steep hill going up; a negative number means you're heading down; zero means the floor is flat; and a wall straight up has no answer at all, because you'd be dividing by a zero-width step. It doesn't matter which two dots you chose — a bigger triangle further along the line is just a scaled copy of the small one, same shape, same ratio. And if you tilt your eyes to the line, that ratio is exactly the tangent of the angle it leans at.

Recall Quick self-test
  1. Why on top? ::: Because is the coordinate that rises; slope is rise over run.
  2. What must match between the two subtractions? ::: The order (both or both ).
  3. Flat line slope? ::: (rise is zero).
  4. Wall slope? ::: Undefined (run is zero → divide by zero).
  5. Why same slope from any pair? ::: The right triangles are similar, so their rise:run ratios are equal.
  6. Why tangent, not sine? ::: Tangent is the only ratio built from the two legs (rise and run), which is exactly what steepness means.

Connections