1. Core Relationships
- m = (y₂ − y₁)/(x₂ − x₁)
- Angle θ = atan(m); m = tan θ
- Gradient % = 100·m
- Distance between points: √(Δx² + Δy²) (reuse if needed)
2. Classification
m > 0 increasing • m < 0 decreasing • m = 0 horizontal • Δx = 0 vertical (undefined).
3. Equation Forms (fast)
- Slope‑intercept: y = mx + b ; b = y₁ − m x₁
- Point‑slope: y − y₁ = m(x − x₁)
- Vertical: x = constant (no slope value)
4. Quick Flow
- Compute Δx, Δy.
- If Δx = 0 → vertical (stop).
- m = Δy/Δx; derive angle / % only if needed.
- Need equation? Pick preferred form; compute intercept once.
5. Parallel / Perpendicular Guardrails
- Parallel: m₁ = m₂ (or both vertical).
- Perpendicular: m₂ = −1/m₁ (except when one vertical, other horizontal).
6. Shortcuts
- Use simplified fraction for rise/run (e.g., 8/12 → 2/3).
- Avoid atan if you only need gradient % (m·100).
- Batch lines: precompute Δx, store reciprocal for repeated perpendicular checks.
7. Pitfalls
- Dividing in wrong order (run / rise).
- Reporting 0 instead of undefined for vertical.
- Dropping the sign on Δy.
- Confusing gradient % with angle degrees.
8. Micro Examples
(2,3)→(6,7): Δx=4 Δy=4 → m=1 → θ=45° → % = 100%
(4,5)→(4,10): vertical line → slope undefined → equation x=4
9. Mini FAQ
- Negative gradient? Just means descending left→right.
- Angle for vertical? 90° (slope undefined, not ∞).
- Can slope be fraction? Yes—store as reduced rational for exact math.
10. Action Tip
When only comparing steepness, compare |Δy| vs |Δx| or use squared ratio before full floating division to avoid tiny rounding issues.