# Absolute value

This English edition is an AI candidate and does not yet have an OCME Atlas (GPT-6) Twin closure receipt.

The absolute value of a real number x is its nonnegative distance from 0, taking x or -x according to the sign of x.

mko-absolute-value · definition · v0.10.0



## Mathematical statement

Define A:R→R by A(x)=x when x≥0 and A(x)=-x when x<0. Its customary notation is |x|, and |x|≥0.





## Representative formula (exact TeX)

A(x)





## Assumptions


- x is a real number with the standard linear order and additive inverse.





## Symbol scope


- A — representative absolute-value function
- x — real-number input
- |x| — customary absolute-value notation for x





## Intuition, definition, and misconceptions

When x≥0, absolute value keeps x; when x<0, it takes the additive inverse -x. Therefore |x| is always nonnegative, and |x|=0 exactly when x=0.

On the real number line, |x| is the distance from x to 0. The distance between two real numbers a and b can be written |a-b| and does not change when the endpoints are exchanged.

The triangle inequality |x+y|≤|x|+|y|, general absolute-value inequalities, complex modulus, and norms require separate statements and proofs; they are not the piecewise definition itself.

Common mistakes include writing |x|=x without checking the sign, treating absolute value as textual deletion of a minus sign, or allowing an absolute value to be negative.





## Adopted derivation guide

[Absolute value: nonnegativity, the zero case and |a−b|=|b−a| from the piecewise definition](https://ocme.evemisslab.com/en/derivations/derivation-mko-absolute-value-01/)The original MKO is retained. The guide has its own append-only revision and verification boundaries, not a new Lean proof.





## Prerequisites


- [Real number](https://ocme.evemisslab.com/en/mko/mko-real-number/) — This entry defines absolute value on the real number line with its standard linear order.
- [Arithmetic operations](https://ocme.evemisslab.com/en/mko/mko-arithmetic-operations/) — The negative branch uses the additive inverse -x, and distance examples use subtraction.





## Verification boundary

Integer instances can be recomputed exactly from the piecewise rule, but finite cases do not prove all real-number properties, the triangle inequality, or abstract absolute-value axioms.

not_formalized

This does not mean the content is false; it means no replayable computational or formal evidence is registered yet.





## Next obligation

Bind Mathlib abs, abs_cases, abs_nonneg, abs_eq_zero, and the precise real-line distance statement |a-b|.





## Same-source structured data

This page and the interactive view use the same object and existing language edition; this adds no proof or human review.

[Canonical MKO JSON](https://ocme.evemisslab.com/data/mko/absolute-value.json) · [Plain Markdown](https://ocme.evemisslab.com/en/mko/mko-absolute-value/index.md)


