Some situations genuinely cannot be described by one formula. A parking meter charges by the started hour, a tax system applies different rates to different bands, and a delivery firm has one price up to 2 kg and another beyond it. Piecewise notation is how you write those down.
Reading the Notation
The large brace groups the branches. Each line has two parts: the rule on the left and the condition on the right, and the condition tells you when that rule applies.
Read it as a sentence: ”
Two things a valid definition must do. The conditions must not overlap, or an input could match two rules and produce two outputs — which would break the one-output rule. And any input the conditions do not cover is simply outside the domain.
Evaluating: Condition First, Then Substitute
The single most common mistake is substituting into the wrong branch. Get into the habit of checking the condition before you touch the algebra.
For
: is ? Yes → use → . : is ? No → use → . : is ? No, so the second branch applies → .
That last one is the boundary, and it is where marks get lost. The condition
Graphing Piece by Piece
Treat each branch as its own small graphing problem, restricted to its interval.
- Take one branch. Ignore the others entirely.
- Graph it only on its interval. Draw nothing outside.
- Mark the endpoints — filled if included, open if not.
- Repeat for each branch.
- Never join across a break.
The endpoint convention is worth stating precisely:
| Condition | Endpoint | Symbol |
|---|---|---|
| not included | open circle | |
| included | filled dot | |
| not included | open circle | |
| included | filled dot |
At a boundary that belongs to the domain, exactly one dot is filled. Two filled dots at the same
Jumps and Continuity
Piecewise functions may or may not join up at their boundaries.
If the two branches happen to give the same value at the boundary, the graph is continuous — you can draw it without lifting the pen. For
If they give different values there is a jump discontinuity, a visible step. That is not an error — most real piecewise models jump, because prices and rates change abruptly.
Step Functions
A step function is a piecewise function whose branches are all constants. The graph is a staircase.
Car parks work exactly this way: any part of an hour costs a full hour. The filled dot on the left of each step and the open circle on the right say that at exactly 2 hours you pay the 2-hour rate, not the 3-hour rate.
Absolute Value Is Piecewise
The
Domain and Range
Domain: the union of the intervals the pieces are defined on. If the conditions cover everything, the domain is all real numbers. A value no condition covers is excluded.
Range: work out the outputs each branch produces on its own interval, then take the union. This is where the endpoint dots matter — an open circle at a boundary may mean a value is missing from the range.
For the function graphed at the top of this lesson: the first branch
Worked Example A: Evaluating
For
: , so → . : is true, so → . : , so → .
Worked Example B: A Boundary Value
For
The condition
Note the first branch gives 5 as
Worked Example C: Graphing
Graph
- Left branch: the line
, drawn only for , ending at with a filled dot. - Right branch: the parabola
, drawn only for , starting at with an open circle.
Both approach the same point, so the graph looks continuous even though one dot is open — the filled dot from the left branch supplies the value.
Worked Example D: Domain and Range
Find the domain and range of
Domain:
Range: the first branch gives only
Worked Example E: A Real Model
A courier charges £4 for parcels up to 2 kg and £4 plus £1.50 per extra kilogram beyond that.
A 5 kg parcel costs
Common Mistakes to Avoid
- Substituting before checking the condition. Decide the branch first.
- Getting the boundary branch wrong.
owns 3; does not. - Filling both dots at a boundary. That gives one input two outputs.
- Drawing a branch outside its interval. Each rule stops where its condition stops.
- Joining across a jump. A discontinuity is a real feature, not a gap to bridge.
- Reading
as negative. For a negative , is positive. - Forgetting uncovered values. If no condition includes
, it is not in the domain.
Where Piecewise Functions Show Up
- Tax bands and tiered pricing, where a rate changes at a threshold.
- Postage and shipping, priced by weight band.
- Parking and phone charges, as step functions.
- Absolute value equations and inequalities, solved by splitting into cases.
- Calculus, where continuity and differentiability at the boundaries are checked directly.
- Programming, where an
if / else if / elsechain is a piecewise function written as code.
Practice Problems
Work each one before opening the answer.
Use
Problem 1. Find
Show answer
Problem 2. Find
Show answer
Problem 3. Find
Show answer
Problem 4. Write
Show answer
Problem 5. At
Show answer
The left branch gives
Problem 6. For the function in Problem 5, which dot is filled at
Show answer
The filled dot is at
Problem 7. Find the domain of
Show answer
Problem 8. Find the range of
Show answer
Only two outputs ever occur:
Problem 9. A gym charges £20 a month for up to 8 visits, then £2 per extra visit. Write the cost function.
Show answer
Problem 10. Why can a piecewise definition not have the conditions
Show answer
They overlap at
Quick Reference
| Task | Method |
|---|---|
| Evaluate | Check the condition first, then substitute |
| Boundary value | |
| Graph | Draw each rule only on its interval |
| Filled dot | Endpoint included ( |
| Open circle | Endpoint excluded ( |
| Domain | Union of the intervals |
| Range | Union of each branch’s outputs |
| Conditions must | Not overlap |
| Step function | All branches constant |
Piecewise rules are graphed with the technique in Graphing Functions, evaluated using function notation, and still obey the one-output rule. Their domain and range come from the branches. More Algebra lessons are available.