Absolute Value - Definition: The Piecewise Distance Rule

By Vegard Gjerde Based on Masterful Learning 11 min read
absoluteValueDefinition math algebra absolute-value learning-strategies

Absolute Value - Definition gives the piecewise rule for x|x|: the output is xx when x0x \ge 0 and x-x when x<0x < 0, measuring the distance of xx from zero on the number line. Because distance is always non-negative, x0|x| \ge 0 for every real xx. In the Unisium Study System, understanding both cases of the definition—not just memorizing the symbol—is what makes absolute value reliable in harder problems.

This guide sits inside the Algebra study map, where you can see the neighboring moves, models, and next-step guides that connect this principle to the rest of algebra.

Unisium hero image titled Absolute Value showing the piecewise definition equation and a conditions card.
The absolute value piecewise definition: x=x|x| = x when x0x \ge 0 and x=x|x| = -x when x<0x < 0.

On this page: The Principle · Conditions · Misconceptions · EE Questions · Retrieval Practice · Worked Example · Solve a Problem · FAQ


The Principle

Statement

The absolute value of xx, written x|x| (or x\lvert x \rvert), is the distance between xx and zero on the number line. Distance is always non-negative, so x0|x| \ge 0 for every real number xx, including 0=0|0| = 0. For non-negative inputs the output is unchanged; for negative inputs the sign is negated, producing the correct positive distance.

Mathematical Form

x={xx0xx<0\lvert x \rvert = \begin{cases} x & x \ge 0 \\ -x & x < 0 \end{cases}

Where:

  • xx = any real number (input)
  • x\lvert x \rvert = distance of xx from zero; always 0\ge 0

The second case, x=x\lvert x \rvert = -x when x<0x < 0, does not return a negative result. Because xx is negative in that branch, x-x is positive — it is the negation of a negative number.

Alternative Form

  • Square-root form: x=x2|x| = \sqrt{x^2} — convenient when squaring is easier than case analysis

Conditions of Applicability

Condition: xRx \in \mathbb{R}

The piecewise rule is defined for all real numbers. This condition marks the domain: extending to complex inputs requires a different formula (see the modulus below). For any xRx \in \mathbb{R}, the correct branch is determined entirely by the sign of xx.

Practical modeling notes

  • Determine where the argument equals zero, then use sign regions on either side of that boundary to choose the branch.
  • The two-case structure is essential: collapsing to ”x=x|x| = x for all xx” produces wrong answers for negative inputs.

When It Doesn’t Apply

The piecewise formula above applies only to real numbers.

  • Complex numbers z=a+biz = a + bi: absolute value (modulus) is z=a2+b2|z| = \sqrt{a^2 + b^2}; the real-number piecewise formula does not generalize.
  • Vectors v\vec{v}: the analogous concept is the Euclidean norm v=v12++vn2\|\vec{v}\| = \sqrt{v_1^2 + \cdots + v_n^2}.

Want the complete framework behind this guide? Read Masterful Learning.

Compare this with Radical Definition when deciding whether a symbol means distance or principal square root. From there, Absolute Value Cases Equations is the next algebra guide once the definition has to be turned into solvable cases.


Common Misconceptions

Misconception 1: ”x-x in the second case is a negative number”

The truth: The second case activates only when x<0x < 0. Negating a negative number gives a positive result: (3)=3-(-3) = 3, so 3=3>0|-3| = 3 > 0.

Why this matters: Students read "x=x|x| = -x" and conclude absolute value can produce a negative output. The notation x-x means “negate xx”, not “return a negative value.”

Misconception 2: "x=x|-x| = -|x|"

The truth: x=x|-x| = |x| for all real xx. Negating the input does not negate the output because absolute value strips sign information entirely: 5=5=5|-5| = |5| = 5.

Why this matters: This error surfaces when substituting signed variables — students flip the output sign after applying absolute value, arriving at an incorrect negative answer.

Misconception 3: "x+y=x+y|x + y| = |x| + |y|"

The truth: The triangle inequality guarantees only x+yx+y|x + y| \le |x| + |y|. Equality holds when xx and yy share the same sign (or one is zero), but not in general: 3+(5)=23+5=8|3 + (-5)| = 2 \ne 3 + 5 = 8.

Why this matters: Treating absolute value as linear over addition leads to incorrect simplifications when working with expressions like ab|a - b|.


Elaborative Encoding

Use these questions to build deep understanding. (See Elaborative Encoding for the full method.)

Within the Principle

  • In the second case of the definition, x=x\lvert x \rvert = -x when x<0x < 0: if x=7x = -7, compute x-x. Why is the result positive even though the formula shows a minus sign?
  • What value does 0|0| produce? Which branch handles it, and why is the boundary condition x0x \ge 0 (rather than x>0x > 0)?

For the Principle

  • Before applying the piecewise rule to 2t6|2t - 6|, what must you determine first, and how?
  • What goes wrong if you drop the second case and always write x=x|x| = x? Construct a numerical example of the resulting error.

Between Principles

  • The Absolute Value — Cases rule solves u=a|u| = a by splitting into u=au = a or u=au = -a. How does that rule follow directly from this piecewise definition?

Generate an Example

  • Construct a real number xx such that applying the first branch (x=x|x| = x) gives the correct answer, and a different xx where only the second branch gives the correct answer. What property of xx determines which branch applies?

Retrieval Practice

Answer from memory, then click to reveal and check. (See Retrieval Practice for the full method.)

State the absolute value definition in words: _____The absolute value of x is x when x is non-negative, and the negation of x when x is negative. It equals the distance from zero on the number line.
Write the canonical equation: _____x={xx0xx<0\lvert x\rvert=\begin{cases}x & x\ge 0 \cr -x & x<0\end{cases}
State the canonical condition: _____xRx \in \mathbb{R}

Worked Example

Use this worked example to practice Self-Explanation.

Problem

Write 2t6|2t - 6| as a piecewise function of tt.

Step 1: Verbal Decoding

Target: piecewise form of 2t6|2t - 6|
Given: tt
Constraints: tRt \in \mathbb{R}; apply the piecewise definition to the argument 2t62t - 6

Step 2: Visual Decoding

Draw a number line for tt. Mark t=3t = 3 (where 2t6=02t - 6 = 0), with 2t602t - 6 \ge 0 to the right and 2t6<02t - 6 < 0 to the left.

(So: first branch for t3t \ge 3, second branch for t<3t < 3.)

Step 3: Mathematical Modeling

  1. 2t6={2t62t60(2t6)2t6<0|2t - 6| = \begin{cases} 2t - 6 & 2t - 6 \ge 0 \\ -(2t - 6) & 2t - 6 < 0 \end{cases}

Step 4: Mathematical Procedures

  1. 2t60t32t - 6 \ge 0 \Leftrightarrow t \ge 3
  2. 2t6<0t<32t - 6 < 0 \Leftrightarrow t < 3
  3. (2t6)=2t+6-(2t - 6) = -2t + 6
  4. 2t6={2t6t32t+6t<3\underline{|2t - 6| = \begin{cases} 2t - 6 & t \ge 3 \\ -2t + 6 & t < 3 \end{cases}}

Step 5: Reflection

  • Verification: at t=4t = 4 (first branch): 2(4)6=2=2(4)62(4)-6 = 2 = |2(4)-6| ✓; at t=1t = 1 (second branch): 2(1)+6=4=2(1)6-2(1)+6 = 4 = |2(1)-6|
  • Graphical meaning: the result is a V-shaped graph with vertex at (3,0)(3,\,0), rising linearly on both sides.

Before moving on: self-explain the model

Explain Step 3 in your own words: why is the argument 2t62t - 6 substituted for xx? How does setting 2t6=02t - 6 = 0 determine the branch boundary?

Mathematical model with explanation

Principle: Absolute Value — Definition applied to the composite argument 2t62t - 6.

Conditions: tRt \in \mathbb{R}; the argument 2t62t - 6 is real for every real tt.

Relevance: Setting 2t6=02t - 6 = 0 at t=3t = 3 identifies the sign boundary. Below t=3t = 3 the argument is negative; at and above it is non-negative.

Description: Substituting 2t62t - 6 for xx in the definition and resolving the branch inequalities in terms of tt eliminates the absolute value bars. The two output expressions, 2t62t - 6 and 2t+6-2t + 6, are linear and equal each other at t=3t = 3.

Goal: Express 2t6|2t - 6| without absolute value bars by writing the explicit linear formula in each sign region of the argument.


Solve a Problem

Apply what you’ve learned with Problem Solving.

Problem

Solve x4=3|x - 4| = 3.

Hint (if needed): Use the piecewise definition to write separate equations for each branch, then solve each.

Show Solution

Step 1: Verbal Decoding

Target: all real xx satisfying x4=3|x - 4| = 3
Given: xx
Constraints: xRx \in \mathbb{R}; apply the piecewise definition to the argument x4x - 4

Step 2: Visual Decoding

Draw a number line. Mark x=4x = 4 (where x4=0x - 4 = 0). For x4x \ge 4 the argument is non-negative (first branch); for x<4x < 4 it is negative (second branch).

(So: two cases, one on each side of x=4x = 4.)

Step 3: Mathematical Modeling

  1. x4={x4x4(x4)x<4=3|x - 4| = \begin{cases} x - 4 & x \ge 4 \\ -(x - 4) & x < 4 \end{cases} = 3

Step 4: Mathematical Procedures

  1. x4:x4=3x \ge 4:\quad x - 4 = 3
  2. x=7x = 7
  3. x<4:(x4)=3x < 4:\quad -(x - 4) = 3
  4. x4=3x - 4 = -3
  5. x=1x = 1
  6. x=1 or x=7\underline{x = 1 \text{ or } x = 7}

Step 5: Reflection

  • Verification: 74=3|7-4| = 3 ✓ and 14=3|1-4| = 3 ✓ — both solutions satisfy the original equation.
  • Interpretation: the two solutions are symmetric about x=4x = 4; absolute value equations xa=r|x-a|=r with r>0r > 0 always yield two solutions equidistant from aa.

PrincipleRelationship to Absolute Value — Definition
Absolute Value — Cases for EquationsSplits u=a\lvert u \rvert = a into u=au = a or u=au = -a; derived directly from this definition
Triangle InequalityBounds x+yx+y\lvert x + y \rvert \le \lvert x \rvert + \lvert y \rvert; built on the distance interpretation
Pythagorean TheoremDistance in 2D via x2+y2\sqrt{x^2+y^2}; absolute value is its 1D special case

See Principle Structures for how to organize these relationships visually.


FAQ

What is the absolute value of a number?

The absolute value of a real number xx, written x|x|, is its distance from zero on the number line. It equals xx when x0x \ge 0 and x-x (flipping the sign) when x<0x < 0. The result is always 0\ge 0.

Why is absolute value defined in two cases?

Distance must be non-negative. For positive inputs the number itself already represents the distance. For negative inputs, the formula x-x negates the sign to produce a positive distance. A single-branch formula cannot handle both situations correctly.

Is 5|-5| equal to 5-5?

No. Since 5<0-5 < 0, the second branch applies: 5=(5)=5|-5| = -(-5) = 5. Absolute value always returns a non-negative result.

What is 0|0|?

0=0|0| = 0. Zero satisfies the first branch condition (000 \ge 0), so 0=0|0| = 0 directly. This is consistent with the distance interpretation: zero is zero units from itself.

How does absolute value differ from negation?

Negation x-x flips the sign of xx (positive becomes negative and vice versa). Absolute value x|x| always returns a non-negative result, regardless of the sign of xx. For x<0x < 0 the two operations agree (both yield x-x which is positive), but for x>0x > 0 they differ: x-x is negative while x=x|x| = x is positive.

Where does absolute value appear outside of basic algebra?

Absolute value measures distance in geometry (xy|x - y| is the distance between xx and yy), speed vs. velocity in physics (v|v| is speed), error magnitude in statistics, and modulus of complex numbers. Each context generalizes the distance-from-zero idea in this definition.


  • Principle Structures — Organize absolute value in a hierarchy of algebra definitions and rules
  • Self-Explanation — Use the worked example above to practice explaining each step
  • Retrieval Practice — Make the piecewise rule immediately accessible under exam pressure
  • Problem Solving — Apply the Five-Step Strategy systematically to absolute value problems

How This Fits in Unisium

Unisium pairs each principle—including this definition—with elaborative-encoding questions, retrieval cloze prompts, and graded problem sets so you build both recall and flexible application. Linking the piecewise rule to the distance interpretation, then immediately applying it in problems, shortens the path from “I’ve seen this” to “I can use it reliably.”

Ready to master absolute value? Start practicing with Unisium or explore the full learning framework in Masterful Learning.

Masterful Learning book cover

Masterful Learning

The study system for physics, math, & programming that works: retrieval, connection, explanation, problem solving, and more.

Read the book (opens in new tab) ISBN 979-8-2652-9642-9

Ready to apply this strategy?

Join Unisium and start implementing these evidence-based learning techniques.

Start Learning with Unisium Read More Guides

Want the complete framework? This guide is from Masterful Learning.

Learn about the book →