You already trust this picture
You’ve drawn it a hundred times without thinking: a straight line, a zero in the middle, numbers marching off in both directions.
We’re going to make it official, because this one picture is the whole foundation. Every number in this course is a position on a line, and a surprising amount of math turns out to be just two questions: which way, and how far.
The line has exactly three parts
A number line is three decisions. Where zero sits (the origin). Which way is positive (by convention, right). And how long one unit is. Fix those three things and every real number has exactly one home on the line.
Drag the marker. Queue up some steps and watch it walk.
There is no number you can name that doesn’t land somewhere on this line: negative, fraction, decimal, all of them. That’s the claim the rest of this module rests on.
A negative number is not a broken number
School taught you negatives as debt: “you owe me three.” Fine for money, terrible as a definition. It makes sound like a damaged , a quantity with something missing.
It isn’t. is a position, three units left of zero, every bit as real and as locatable as . The minus sign isn’t damage. It’s a direction.
Press . The point doesn’t shrink or break; it reflects across zero. Same distance out, opposite side.
Direction and magnitude are two separate facts
Once a number is a position, it carries two independent pieces of information:
- direction: which side of zero it’s on (that’s the sign)
- magnitude: how far from zero it is (a size, never negative)
and disagree on direction and agree on magnitude. Pulling those two apart is the move the rest of this lesson is about.
Magnitude has a name: absolute value
The magnitude of a number, its distance from zero with the sign thrown away, is its absolute value, written between two bars:
Read the second line slowly. When is negative, is positive: flipping a negative gives a positive. So . Absolute value never hands back a negative. It’s a distance, and a distance has no side.
Strip the sign
Absolute value answers exactly one question: how far from zero, ignoring which way?
What is ?
Distance between any two points
Distance from zero is the easy case. The real tool is the distance between any two positions and :
Subtract them, then take the absolute value. The subtraction might come out negative depending on which number you wrote first; the bars clean that up. Distance doesn’t care about order.
How far apart
A point sits at . A target sits at .
How far apart are they? Use .
Where this goes
Hold onto . In a few modules, numbers stop being single positions and become vectors, whole lists of positions at once. The tool that measures a vector’s size is the norm, written . It is absolute value with more dimensions: still “distance from the origin,” still never negative.
And when you train a neural network, the single number you drive toward zero (the loss) is a distance. You just met its one-dimensional ancestor.
Lesson complete