Piecewise, Step & Absolute Value Functions
A piecewise function uses different rules on different parts of its domain. To evaluate it you first decide which piece your input falls into, then apply that piece's rule.
Step functions and absolute value functions are famous piecewise examples — absolute value is just two lines meeting at a V. The whole skill is choosing the right piece.
Evaluating a piecewise function
Each piece comes with a condition, like or . Match your input to the condition it satisfies, then plug into that piece only.
The conditions never overlap, so exactly one piece applies to any input. Read the boundaries carefully — versus decides which piece owns the boundary value.
Absolute value and step functions
Absolute value is piecewise: it equals when and when , producing the V-shaped graph shown below — the right arm is the line , the left arm the line .
A step function like the greatest-integer function jumps from one flat level to the next, staying constant on each piece — the source of its staircase look.
Worked examples
Example 1: choosing the right piece
For if and if , find .
Answer:
Example 2: absolute value as pieces
Evaluate using the piecewise definition.
Answer:
Example 3: an input right on the boundary
For if and if , find .
Answer:
Try one yourself
Common questions
How do I pick which piece to use?
Check which condition your input satisfies. The conditions partition the domain, so exactly one piece applies to any given x.
Why is absolute value considered piecewise?
Because it is defined by two rules: for non-negative inputs and for negative ones. Those two lines form the V.
What makes a step function 'step'?
It stays constant over each interval and jumps to a new constant at the boundaries, tracing a staircase rather than a smooth curve.
Want the video version?
Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.