Absolute value

Level FundamentalDifficulty ★★★★★Concept⌖ Open in the map

What is it?

∣x∣|x| is the distance from xx to 00, and ∣x−y∣|x - y| the distance between two numbers. "Close to" in every definition of calculus means a small absolute value.

Formulas

∣x∣={xx≥0−xx<0,∣x+y∣≤∣x∣+∣y∣|x| = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}, \qquad |x + y| \le |x| + |y|
definition and triangle inequality

Where it shows up in AI

  • Loss function★★★★★frequentAI and machine learning

    The L1 / mean absolute error loss 1n∑∣yi−y^i∣\frac1n\sum|y_i - \hat y_i| is robust to outliers but not differentiable at 0.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

Exercises

1Computation

Solve ∣2x−3∣<5|2x - 3| < 5.

Solution

−5<2x−3<5  ⟺  −1<x<4-5 < 2x - 3 < 5 \iff -1 < x < 4, i.e. x∈(−1,4)x \in (-1, 4).

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc