Rearranging inequalities: when the sign flips
Why this matters
Many questions ask "at least" or "at most", not "exactly": how many steps until the learning rate is small enough, or how many test examples keep an error bar under 2 points. Each is a formula set against a target. You rearrange it like an equation, with one extra job: keep track of which way the sign points. Most moves keep it. A few flip it, and this lesson names every one.
- Rearrange an inequality with the four moves, flipping the sign whenever you multiply or divide by a negative
- Handle a letter of unknown sign by splitting into cases, or by using a known sign such as t > 0
- Track the direction through reciprocals, squares, roots and logs, with the condition each one needs
- Turn |x − a| < k into the range a − k < x < a + k, and round a boundary the right way to a whole number
- Solve formula targets in training: steps until a decayed rate is small, a test-set size, clipping and a safe step size
The math: rearrange, and track the direction
Purpose. Make a letter the subject of an inequality, and know at every step whether the sign stays or flips.
An inequality compares two sides with <, ≤, > or ≥. Transposing it, making a letter its subject, uses the same opposites as an equation. The four moves are adding, taking away, multiplying and dividing both sides by the same number:
| Move on both sides | The sign |
|---|---|
| add or take away any number | stays |
| multiply or divide by a positive number | stays |
| multiply or divide by a negative number | flips |
| multiply by 0 | not allowed: both sides become 0 |
Why the flip? Multiplying by −1 mirrors the number line around 0. So 3 < 5, but −3 > −5.
Take 7 − 2x ≥ 1. Take 7 from both sides: −2x ≥ −6. Divide by −2, a negative, so the sign flips: x ≤ 3.
Check it twice. Swap the sign for = to get the boundary, x = 3. Then test a number on each side. With x = 0: 7 ≥ 1 is true, and 0 ≤ 3. With x = 4: 7 − 8 = −1, and −1 ≥ 1 is false.