Algebra 1 · Grades 9, 10
Piecewise, Absolute Value and Step Functions
Quick answer
A piecewise function uses different rules on different intervals of its domain, the way overtime pay switches rates after 40 hours. To evaluate one, find the interval the input falls in and use that rule. Each input may get only one output, so at a boundary exactly one rule applies, and the graph marks which with a filled dot and an open one. Absolute value and step functions are piecewise functions too.
What you'll learn
- Evaluate a piecewise function by choosing the right rule
- Graph piecewise, absolute value and step functions with correct endpoints
- Write a piecewise function from a description
One function, several rules
A job pays dollars an hour. Hours past in a week are overtime, paid at time and a half, which is dollars an hour.
A single formula cannot describe that pay, because the rate changes at hours. Two rules can, each with the interval where it applies.
The second rule starts from , the pay for the first hours, and adds for each hour beyond them. This is a piecewise function.
- P(h), dollars
The graph bends at and gets steeper there. The corner is where the rule changes.
Evaluating
To evaluate, find which interval holds the input, then use that rule and no other.
| Interval | Rule | ||
|---|---|---|---|
Why the endpoints need open and closed dots
A function gives exactly one output for each input. So at a boundary, only one rule may apply, and the inequality signs decide which.
Take a function whose two pieces do not meet:
At the first rule does not apply, because is false. The second rule does, so .
The first piece still runs up to — it gets as close as it likes — but it never includes it. Its line would end at , and that point is not on the graph.
- g(x)
| Dot | Means |
|---|---|
| filled | the point is on the graph |
| open | the piece stops here without including it |
If both pieces claimed , the input would have two outputs, and . That would not be a function at all, which is why the dots are information and not decoration.
When the two pieces meet at the same point, as the overtime pay does at , one filled dot covers both and the graph has no gap.
Absolute value
Absolute value is a piecewise function in disguise.
Each rule is a straight line, and they meet at the origin, which gives the graph its V shape. The point of the V is the vertex.
Shifting works as it does for any function. The graph of is the V moved so its vertex sits at .
- y = |x − 2| − 3
The vertex is the minimum, . The zeros sit units either side of it, because each arm climbs unit per unit across.
Step functions
A step function is a piecewise function whose pieces are all constant, so its graph looks like a staircase.
A parking garage charges dollars for the first hour or any part of it, and dollars for each additional hour or part of one.
- C(t), dollars
Exactly one hour costs , the closed dot at . One minute more jumps to , which is why the next step starts with an open dot.
Worked examples
Common mistakes
Practice problems
-
Using the overtime pay , find and .
Answer
and
Full solution
, so .
, so .
-
For , find , and .
Answer
, and
Full solution
, so .
, so .
, so .
-
For , where are the open and closed dots at ?
Answer
An open dot at and a closed dot at .
Full solution
The first piece runs toward without including it, so it ends at with an open dot.
The second piece includes , so is on the graph with a closed dot.
-
Find the vertex and the zeros of .
Answer
Vertex ; zeros and .
Full solution
is , so the vertex sits at , and the puts it at height .
Each arm rises per unit across, so it takes units either side to climb to : and .
Check: ✓ and ✓
-
Using the parking cost , find the cost of hours and of exactly hours.
Answer
dollars and dollars.
Full solution
is in , so it costs .
is in , so it costs . The closed dot at shows that exactly two hours stays on the lower step.
-
Write as a piecewise function.
Answer
when , and when .
Full solution
The inside, , is zero or positive when , so it stays as it is.
When the inside is negative, and absolute value flips its sign: .
-
Is a function?
Hint
Which rules apply at ?
Answer
No. At both rules apply and give different outputs.
Full solution
Both intervals include . The first rule gives and the second gives .
One input with two outputs breaks the definition of a function. Changing either or to a strict inequality would repair it.
-
Using the phone plan , find the cost of GB and of GB.
Answer
dollars and dollars.
Full solution
, so .
, so .
-
Find , and .
Answer
, and
Full solution
The floor is the greatest integer at or below the number.
Below that is . Below it is , not , since is above . And is already an integer, so its floor is itself.
-
Asked for the pay for a -hour week, Carlos computes dollars. Find his error.
Hint
Which hours are paid at the overtime rate?
Answer
He paid every hour at the overtime rate. The correct pay is dollars.
Full solution
Only the hours past earn dollars. The first earn each.
.
Carlos’s answer treats the second rule as if it applied from hour zero. A piecewise rule applies only on its own interval, and the overtime interval starts at .
Frequently asked questions
What is a piecewise function?
A function defined by different rules on different parts of its domain. Each rule comes with an interval that says where it applies.
How do I evaluate a piecewise function?
Find the interval that contains the input, then use only that interval's rule. The other rules do not apply to that input.
What do open and closed dots mean?
A closed dot is a point on the graph. An open dot marks where a piece stops without including its endpoint, so the function does not take that value there.
Is absolute value a piecewise function?
Yes. |x| is x when x is zero or positive, and −x when x is negative. The two rules meet at the vertex of the V.
What is a step function?
A piecewise function whose pieces are all constant, so the graph looks like stairs. Parking fees charged per started hour are a common example.
Standards alignment
This lesson covers the following Common Core State Standards for Mathematics.
- CCSS.MATH.CONTENT.HSF.IF.C.7Interpreting FunctionsGraph functions expressed symbolically and show key features of the graph, by hand in simple cases and using technology for more complicated cases.
- CCSS.MATH.CONTENT.HSF.IF.C.7bInterpreting FunctionsGraph square root, cube root, and piecewise-defined functions, including step functions and absolute value functions.