Skip to content

Modulus (Absolute Value)

13 lessons · 60 questions · 30 PYQs · ~60 s per question

The idea

∣x−a∣|x-a| is the distance between xx and aa on the number line. Most modulus questions become easy in this picture: sums of moduli are sums of distances, and ∣E∣<c|E|<c says EE lies within cc of 00. Algebraically, every modulus is removed by splitting the line at its zero.

Textbook vs exam method

Exam method

  1. Median rule. ∑∣x−pi∣\sum|x-p_i| is least at the median (weights = repeated points).
  2. Distance reading. ∣x−1∣+∣x−3∣=2|x-1|+|x-3|=2 has every x∈[1,3]x\in[1,3] as a solution.
  3. Betweenness. ∣a−b∣+∣b−c∣=∣a−c∣|a-b|+|b-c|=|a-c| means bb lies between aa and cc.
  4. Zero sum. a sum of moduli, squares and roots is 00 only when every term is 00.
  5. Count signs carefully. (∣x∣,∣y∣)(|x|,|y|) solutions, then ×2\times2 for each non-zero coordinate.

Worked examples

Example 1Sitter

∣x−4∣≤3|x-4|\le3

Example 2SitterIndore 2024

x2−10∣x∣−56=0x^2-10|x|-56=0

Example 3EasyIndore 2020 SA

∣3−x∣+∣2+x∣+∣5−x∣|3-x|+|2+x|+|5-x|

Example 4TypicalIndore 2022 SA

∣x∣+2∣x−1∣+∣x−2∣+∣x−4∣+∣x−6∣+2∣x−10∣|x|+2|x-1|+|x-2|+|x-4|+|x-6|+2|x-10|

Example 5TypicalIndore 2022

x2+∣x+4∣+∣x−4∣−35=0x^2+|x+4|+|x-4|-35=0

Traps

  • Negative values of a modulus kept; one branch of ∣E∣>c|E|>c dropped.
  • Mean instead of median; weights ignored; zero counted with two signs.

Formulas

Definition and distance meaning of the modulus

∣x∣={x,x≥0−x,x<0,∣x−a∣=distance from x to a|x|=\begin{cases}x,&x\ge0\\-x,&x<0\end{cases},\qquad |x-a|=\text{distance from }x\text{ to }a

Split at the zero of each modulus; read |x - a| + |x - b| as a sum of distances.
Modulus inequalities

∣E∣<c  ⟺  −c<E<c,∣E∣>c  ⟺  E<−c or E>c|E|<c\iff-c<E<c,\qquad |E|>c\iff E<-c\ \text{or}\ E>c

Peel nested moduli from the outside; a modulus can never equal a negative number.
Least value of a sum of distances

min⁡∑i∣x−pi∣ at the median of the pi\min\sum_{i}|x-p_i|\ \text{at the median of the }p_i

Odd number of points: the middle one; even number: any point between the two middle ones. Weights count as repeated points (Indore 2022 SA Q6).
Triangle inequality and its equality case

∣a+b∣≤∣a∣+∣b∣, equality  ⟺  ab≥0;∣a−b∣+∣b−c∣=∣a−c∣  ⟺  b between a and c|a+b|\le|a|+|b|,\ \text{equality}\iff ab\ge0;\quad |a-b|+|b-c|=|a-c|\iff b\text{ between }a\text{ and }c

Max b with |a - b| + |b - c| = |c - a| for distinct naturals below N is N - 2 (Indore 2025 SA).
Quadratic in the modulus

x2=∣x∣2:  x2+p∣x∣+q=0 is a quadratic in t=∣x∣≥0x^2=|x|^2:\ \ x^2+p|x|+q=0\ \text{is a quadratic in }t=|x|\ge0

Reject negative values of t; each positive t gives two values of x (Indore 2024 Q39).
Sum of non-negative terms equal to zero

∣u∣+v2+w=0  ⟺  u=v=w=0|u|+v^2+\sqrt{w}=0\iff u=v=w=0

Indore 2024 Q17: |x + 1| + (y + 2) squared = 0 forces x = -1, y = -2.
Lattice points on a diamond

#{(x,y)∈Z2:∣x−a∣+∣y−b∣=k}=4k\#\{(x,y)\in\mathbb{Z}^2:|x-a|+|y-b|=k\}=4k

|x| + |y| <= k (inside the diamond) has 2k^2 + 2k + 1 points instead.

In the exam

Shortcuts
  • ∣x−a∣+∣x−b∣=k|x-a|+|x-b|=k: no solution for k<∣a−b∣k<|a-b|, a whole interval for k=∣a−b∣k=|a-b|, two solutions for k>∣a−b∣k>|a-b|.
  • Between −a-a and aa, ∣x+a∣+∣x−a∣=2a|x+a|+|x-a|=2a; outside it equals 2∣x∣2|x| (Indore 2022 Q35).
  • Systems like ∣x∣+x+y=10|x|+x+y=10: try the sign cases and discard any solution that contradicts its own case.
  • Graph check: ∣x−a∣+∣x−b∣|x-a|+|x-b| is a flat-bottomed V; x∣x∣x|x| is increasing.
~60 s per question at exam speed
When to skip: Systems with two moduli and weighted sums of six terms take 90-120 s; everything else is under a minute with the distance picture.

Before this

What the exams ask here

  • min |x-a|+|x-b|+|x-c|
  • solve |x^2-5x|=6
  • integral n with (|n+6|-|n-3|)/(100-n^2) >= 0
  • max b when |a-b|+|b-c|=|c-a|
  • min of |3 - x| + |2 + x| + |5 - x| (Indore 2020 SA Q5)
  • weighted |x| + 2|x - 1| + ... + 2|x - 10| (Indore 2022 SA Q6)
  • x^2 + |x + 4| + |x - 4| - 35 = 0 sum of squares of roots (Indore 2022 Q35)
  • |x + 1| + (y + 2)^2 = 0 (Indore 2024 Q17); x^2 - 10|x| - 56 = 0 (Indore 2024 Q39)
  • x^2 - |x + 2| + x > 0 (Rohtak 2019)
  • max b with |a - b| + |b - c| = |c - a| (Indore 2025 SA)
  • (|n + 6| - |n - 3|)/sqrt(100 - n^3) >= 0 (Indore 2026 SA, memory-based)
  • |x| + x + y = 10 and x + |y| - y = 12 (sign cases)
  • (|r| + 5)(|s| - 3) = -24: integer pairs
  • |a + b| = |a| + |b| iff ab >= 0
Next sub-topicFloor and Fractional Part

Practise this free. Every mistake is saved and comes back until you fix it.

Start free