Integer Comparison: What It Means and Why It Matters
Imagine you have two piles of stones. One pile has 5 stones, the other has 3. Without counting, you can see the first pile is bigger. That's comparison in the real world — you're asking "which is larger?" or "are they equal?"
Integer comparison is just that same question, but asked about whole numbers (…, -3, -2, -1, 0, 1, 2, 3, …). The only twist is that integers include negative numbers, so the "bigger" pile might actually be a debt or a temperature below zero.
The Intuition: The Number Line
Picture a horizontal line. In the middle is 0. To the right are positive numbers (1, 2, 3, …), getting larger as you go right. To the left are negative numbers (-1, -2, -3, …), getting more negative (smaller) as you go left.
The golden rule of integer comparison
On a number line, the number farther to the right is always greater.
So:
- 5 is to the right of 3 → 5 > 3
- -2 is to the right of -5 → -2 > -5
- 0 is to the right of -1 → 0 > -1
The Precise Statement
For any two integers a and b:
- a>b (a is greater than b) if a lies to the right of b on the number line.
- a<b (a is less than b) if a lies to the left of b on the number line.
- a=b if a and b are the same point on the number line.
Equivalently, in terms of subtraction:
- a>b means a−b is positive.
- a<b means a−b is negative.
- a=b means a−b=0.
Common Pitfalls
The "bigger negative" trap
Many students think -5 is "bigger" than -2 because 5 is bigger than 2. But -5 is more negative — it's farther left on the number line. So -5 < -2. Always check the number line.
Another trap: comparing a negative and a positive. Any positive integer is always greater than any negative integer. For example, -100 < 1, even though 100 is a large number.
Quick Reference Table
| Comparison | True or False? | Why |
|---|
| 7>3 | True | 7 is right of 3 |
| −4<−1 | True | -4 is left of -1 |
| 0>−10 | True | 0 is right of -10 |
| −2>5 | False | -2 is left of 5 |
| 3=3 | True | Same point |
The Big Idea
Integer comparison is just "which way on the number line?" The number farther right wins. That's it. Once you internalize the number line, you never need to memorize rules — you just picture the line and see the answer.