Why Absolute Value Rules Split into Cases
An absolute value measures distance from zero, so its output is never negative. The formula \(|x-4|\), for example, measures the distance between \(x\) and \(4\). When \(x\) is at least \(4\), the quantity \(x-4\) is nonnegative. When \(x\) is less than \(4\), it is negative, and taking its absolute value reverses its sign.
This sign change is why an absolute value formula can be rewritten as a piecewise rule. The formula inside the bars determines where the pieces change; the absolute value definition determines what each piece is.
The two cases cover every real input: a number is either nonnegative or negative. At \(u=0\), the first case gives \(0\). Using the other expression there would also give \(-0=0\), so the value at the boundary is unambiguous.
Rewriting \(|x-a|\)
For \(|x-a|\), the expression inside the bars is \(x-a\). It is negative when \(x<a\), zero when \(x=a\), and positive when \(x>a\). Applying the definition therefore gives the following rule.
For \(x<a\), \(x-a<0\), so the absolute value is the negative of the inside expression: \(-(x-a)=a-x\). For \(x\ge a\), \(x-a\ge0\), so the absolute value leaves it unchanged. The breakpoint is \(x=a\), the input at which the inside expression is zero.
The choice of which piece includes the breakpoint is flexible only when both formulas give the same value there. Here, at \(x=a\), the left formula gives \(a-a=0\), and the right formula gives \(a-a=0\). Thus one could place equality with either branch. The convention above assigns it to the second branch.
Worked Example: Rewriting \(|x-3|\)
Find a piecewise rule for \(f(x)=|x-3|\). First find where the inside expression is zero:
If \(x<3\), then \(x-3<0\), so negate the inside expression. If \(x\ge3\), it is nonnegative and remains unchanged. Therefore,
Check one input from each side and the boundary. At \(x=1\), the original rule gives \(|1-3|=|-2|=2\), and the first branch gives \(3-1=2\). At \(x=5\), the original rule gives \(|5-3|=|2|=2\), and the second branch gives \(5-3=2\). At \(x=3\), the original rule gives \(|3-3|=0\), and the second branch gives \(3-3=0\). The pieces agree with the original expression at all three checks.
A Sign Check Explains the Rule
The rewrite is not a memorized pattern that should be applied without checking. It follows directly from the definition of absolute value. To justify it completely, consider the sign of \(x-a\) in each possible case.
The inside expression \(x-a\) equals zero exactly when \(x=a\).
If \(x<a\), subtracting \(a\) gives \(x-a<0\). The definition says \(|x-a|=-(x-a)=a-x\).
If \(x\ge a\), then \(x-a\ge0\). The definition says \(|x-a|=x-a\).
At \(x=a\), both expressions give zero, as does the original absolute value.
Every real \(x\) belongs to exactly one of the two stated intervals, and the formula used on that interval is precisely the one required by the sign of \(x-a\). This proves the rule for all real \(x\), not only for a selection of test values.
Coefficients and Shifts Outside the Bars
A constant multiplier outside the absolute value does not change where the expression inside the bars changes sign. Likewise, adding a constant outside the bars changes the output values but not the breakpoint. First rewrite the absolute value; then apply the outside operations to each branch.
Worked Example: A Scaled and Shifted Absolute Value
Rewrite \(g(x)=2|x+1|-4\) as a piecewise rule. The inside expression is \(x+1\), which is zero at
For \(x<-1\), \(x+1<0\), so \(|x+1|=-(x+1)=-x-1\). For \(x\ge-1\), \(x+1\ge0\), so \(|x+1|=x+1\). Apply the multiplier \(2\) and then subtract \(4\) in each case:
Check \(x=-2\), which is in the first interval. The original formula gives \(2|-2+1|-4=2|-1|-4=2-4=-2\); the first branch gives \(-2(-2)-6=4-6=-2\). Check \(x=2\), which is in the second interval. The original gives \(2|2+1|-4=6-4=2\); the second branch gives \(2(2)-2=2\). At the breakpoint, the original gives \(2|0|-4=-4\), and the second branch gives \(2(-1)-2=-4\).
Absolute Values of Other Linear Expressions
The same sign-based method works when the expression inside the bars is \(mx+b\), where \(m\) and \(b\) are real numbers and \(m\ne0\). Its zero, and hence its breakpoint, is \(r=-b/m\). The sign on either side depends on whether the coefficient \(m\) is positive or negative.
Solving \(mx+b=0\) identifies the breakpoint, but it is important not to assume that the inside expression increases as \(x\) increases. It increases when \(m>0\) and decreases when \(m<0\). Checking the sign on each side avoids reversing the pieces.
Worked Example: A Negative Coefficient Inside the Bars
Rewrite \(h(x)=|6-2x|+x\) as a piecewise rule. Find the zero of the expression inside the bars:
Because the coefficient of \(x\) is negative, the inside expression is positive to the left of \(3\) and negative to its right. For example, \(6-2(0)=6>0\), while \(6-2(4)=-2<0\). Thus, for \(x\le3\), the absolute value leaves \(6-2x\) unchanged; for \(x>3\), it changes its sign:
Check \(x=1\): the original gives \(|6-2|+1=4+1=5\), and the first branch gives \(6-1=5\). Check \(x=4\): the original gives \(|6-8|+4=2+4=6\), and the second branch gives \(3(4)-6=12-6=6\). At \(x=3\), the original gives \(|6-6|+3=3\); the first branch gives \(6-3=3\), and the second expression would also give \(3(3)-6=3\). The boundary value is consistent.
A Common Mistake: Choosing a Branch Before Checking the Sign
A frequent error is to replace \(|x-a|\) by \(x-a\) for every \(x\), as if absolute value always leaves its inside expression unchanged. That is true only where the inside expression is nonnegative. For instance, the incorrect calculation
would give \(|0-2|=0-2=-2\). But the definition gives \(|0-2|=|-2|=2\), so the claimed rule fails. Since \(0<2\), the correct branch is \(2-x\), and \(2-0=2\). The correction is to find where \(x-2\) is negative before removing the bars:
The check is simple and reliable: choose a test input in each interval and compare the piecewise rule with the original absolute value. Also evaluate at the breakpoint, where the absolute value is zero.
Why Piecewise Rewrites Are Useful
A piecewise rewrite makes the linear behavior on each side of a breakpoint explicit. It can clarify which formula applies at a given input, support direct evaluation, and make it easier to compare an absolute value rule with other piecewise rules. It also prevents a common misunderstanding: the expression inside the bars is not always the output. Its sign determines whether it is kept or negated.
For a basic \(|x-a|\), the two pieces meet at \(x=a\), and both give zero there. If an expression has additional terms outside the bars, as in \(2|x+1|-4\) or \(|6-2x|+x\), the breakpoint still comes from setting the inside expression equal to zero. The outside terms are then included in each branch.
Check Your Understanding
For each question, identify the breakpoint and use the sign of the inside expression to justify the pieces.
- Write \(|x-5|\) as a piecewise rule, and check the result at \(x=2\), \(x=5\), and \(x=7\).
- Rewrite \(3|x+2|+1\) as a piecewise rule. Which interval uses the negated inside expression?
- Find a piecewise rule for \(|4-2x|\). Explain why its left and right pieces are assigned as they are.
- A student claims \(|x+3|=x+3\) for all real \(x\). Give an input that disproves the claim and state the correct branch for that input.
- Why do the two branch formulas for \(|x-a|\) give the same value at \(x=a\)?