☰ Course contents
Mathematics 🌆 Grade 9 Absolute Value & Piecewise Functions
🌆 Grade 9 · Lesson 3 of 12

Absolute Value & Piecewise Functions

|x| just measures distance from zero — the V-shaped graph and its two-line definition are two views of that one idea.

Grade 9Algebra 1
Absolute Value & Piecewise Functions — illustration
💡
The big idea: Absolute value answers a single question: how far is a number from zero, ignoring direction? That distance is never negative, which is why |x| graphs as a V shape instead of a straight line. Writing |x| as a piecewise rule — x when x is already non-negative, −x when x is negative — is just the algebra that enforces “always non-negative,” and the same vertex-form thinking you used to slide and stretch a parabola slides and stretches this V exactly the same way.
🎯 By the end, you'll be able to
  • Define |x| as distance from zero and write its piecewise definition
  • Graph y = |x| and identify its vertex and axis of symmetry
  • Predict how y = a|x − h| + k transforms the basic V-graph
  • Solve |x| = c and read/sketch a general piecewise-defined function
📎 You should already know
  • Domain and range of a function
  • Transformations of y = a(x − h)² + k

Distance, not sign

|x| answers exactly one question: how far is x from zero on the number line? Distance has no direction, so it is never negative — |5| = 5 and |−5| = 5, because both 5 and −5 sit exactly 5 units from zero, one to the right and one to the left.

That single idea — strip away the direction, keep the size — is all absolute value ever does. Everything else in this lesson, the piecewise rule and the V-shaped graph, is just that idea written out in different notations.

🔑 The piecewise definition
|x| = x when x ≥ 0, and |x| = −x when x < 0. Both branches produce a non-negative result: if x is already non-negative, leave it alone; if x is negative, flip its sign to make it positive.
\[ |x| = \begin{cases} \phantom{-}x & \text{if } x \ge 0 \\ -x & \text{if } x < 0 \end{cases} \]
Absolute value written as a two-branch piecewise function of x.

The V-shaped graph

Plot y = |x| and the two piecewise branches show up as two straight rays: for x ≥ 0 the line y = x, and for x < 0 the line y = −x. They meet at the origin, forming a sharp V. The point where the two rays meet, (0, 0), is the vertex, and the vertical line x = 0 is the graph’s axis of symmetry — the left half is a mirror image of the right half.

🎮 Absolute Value Grapher LIVE
Drag the vertex and adjust the steepness to see y = a|x − h| + k reshape the V in real time.

Transformations: y = a|x − h| + k

This should look familiar — it is exactly the vertex-form pattern from transforming a parabola, applied to a V instead of a curve. The vertex sits at (h, k); h slides the V left or right, k slides it up or down. The number a controls the steepness — |a| > 1 makes the V narrower, |a| < 1 makes it wider — and if a is negative, the V flips upside down into a Λ shape, opening downward instead of upward.

📝 Worked example: Graph y = |x − 3| + 2 by identifying its vertex and sketching from y = |x|.
  1. Compare to y = a|x − h| + k: here a = 1, h = 3, k = 2.
  2. The vertex is at (h, k) = (3, 2).
  3. a = 1 means no stretch or flip, so the graph is the ordinary V, just slid 3 right and 2 up.
✓ Vertex at <strong>(3, 2)</strong>; the graph is y = |x| translated 3 units right and 2 units up.
📝 Worked example: Solve |x| = 7, then explain why |x| = −4 has no solution.
  1. |x| = 7 asks: which numbers are exactly 7 units from zero? Both +7 and −7 satisfy that.
  2. So x = 7 or x = −7.
  3. |x| = −4 asks for a distance of −4 units, but distance can never be negative, so no real number satisfies it.
✓ |x| = 7 gives <strong>x = 7 or x = −7</strong>; |x| = −4 has <strong>no solution</strong>.
⚠️ −x is not automatically negative
The most common misreading of the piecewise definition is assuming −x always means “a negative number.” It does not — it means “the opposite sign of x.” When x itself is negative (say x = −6), −x = −(−6) = 6, which is positive. That is exactly why the second branch, |x| = −x for x < 0, correctly produces a non-negative output: flipping the sign of a negative number makes it positive.
✨ Count the solutions before you solve
|x| = c has two solutions when c > 0, exactly one solution (x = 0) when c = 0, and no solutions when c < 0. Checking which case you are in before solving catches a no-solution equation immediately, instead of chasing an answer that does not exist.

Beyond the V: general piecewise functions

|x| is the simplest example of a piecewise-defined function — a function built from different rules on different parts of the domain, like a shipping rate that charges one formula under 5 kg and a different formula at or above 5 kg. Reading a piecewise graph means checking, at each x-value, which piece of the domain you are in and applying only that branch’s rule; sketching one means drawing each branch only over its own stated interval and marking clearly whether each boundary point is included.

Check your understanding

1. What does |x| measure?
Absolute value strips away direction and reports only size — the distance from x to zero on the number line, which is never negative.
2. According to the piecewise definition, what is |x| when x < 0?
When x is negative, |x| = −x. Since x itself is negative, −x flips the sign and produces a positive result.
3. What is the vertex of y = |x + 4| − 1?
Writing x + 4 as x − (−4) shows h = −4, and k = −1, so the vertex (h, k) is (−4, −1).
4. How many solutions does |x| = 0 have?
|x| = c has two solutions when c > 0, but exactly one (x = 0 itself) when c = 0, since 0 is the only number at distance 0 from zero.
5. Which equation has no real solution?
|x| = c has no solution whenever c < 0, because a distance can never be negative. |x| = −5 asks for an impossible distance.
✅ Key takeaways
  • |x| measures distance from zero, so it is always non-negative regardless of the sign of x.
  • Piecewise definition: |x| = x when x ≥ 0, and |x| = −x when x < 0.
  • y = |x| graphs as a V with vertex (0, 0) and axis of symmetry x = 0; y = a|x − h| + k moves the vertex to (h, k), a flips it when negative.
  • |x| = c has two solutions when c > 0, one when c = 0, and none when c < 0.
  • −x is not automatically negative — it means 'the opposite sign of x,' which is exactly why the x < 0 branch produces a positive output.