Piecewise Functions - Complete Interactive Lesson
Part 1: Anatomy & Notation
🧩 Piecewise Functions
Part 1 of 7 — Anatomy & Notation
Topics in This Part
| Section |
|---|
| What Is a Piecewise Function? |
| Reading the Brace Notation |
| Which Rule Applies Where |
🔑 Key Concept: A piecewise function is one function defined by different rules on different parts of its domain. Think of it as a recipe with conditions: "if the input is over here, use this rule; if it's over there, use that rule."
What Is a Piecewise Function?
Most functions you've met use one rule for every input — like . A piecewise function switches rules depending on where lands.
A classic real-world example is a parking garage:
| Input ( = hours parked) | Rule (cost) |
|---|---|
| First 2 hours | flat $5 |
| After 2 hours | $5 plus $3 per extra hour |
The cost is still a function of hours — every input has exactly one output — but the formula you use depends on the input. That's the whole idea.
We collect the rules under a single brace:
💡 The function is still one function. The brace is just shorthand for "here are all my rules and the conditions that select them."
Reading the Brace Notation
Every row of a piecewise definition has two parts:
To use the function, you ask one question: which condition does my input satisfy? That tells you which rule to apply.
For
- An input like satisfies , so use the top rule: .
- An input like satisfies , so use the bottom rule: .
⚠️ The conditions must not overlap — every input belongs to exactly one piece. If two conditions claimed the same , you'd get two outputs, and it wouldn't be a function. Notice and together cover all real numbers with no overlap.
Concept Check 🎯
Mind the Boundary 🎯
Match Input to Rule 🔽
For , pick the rule each input triggers.
Recap
You now know how to read a piecewise function:
- Each row is a rule paired with a condition.
- To evaluate, find the one condition your input satisfies, then apply that row's rule.
- The conditions tile the domain — no gaps, no overlaps — and the boundary value belongs to whichever piece uses or (the one with the "equals" line).
In Part 2 we put this into action: plugging numbers in carefully, especially right at the boundaries where mistakes love to hide.
Part 2: Evaluating Piecewise Functions
🧩 Piecewise Functions
Part 2 of 7 — Evaluating Piecewise Functions
🔑 The One-Step Method: To find , ignore the rules at first. Ask only: which condition does satisfy? Then plug into that — and only that — rule.
Evaluating, Step by Step
Use this function throughout:
Find
Step 1 — pick the piece. Is ? Yes. Use the top rule . Step 2 — substitute. .
Find
Step 1 — pick the piece. Is ? Yes. Use the middle rule . Step 2 — substitute. .
Find
Step 1 — pick the piece. Is ? Yes. Use the bottom rule, the constant . Step 2 — substitute. .
💡 The bottom piece is a constant: for every . The input doesn't appear in the rule, so the output never changes there.
The Boundary Is Where Points Are Lost
The danger zone is the boundary between pieces. Check the inequality signs carefully.
For the same , evaluate at the boundary :
- Top condition : is ? No (strict).
- Middle condition : is ? Yes (the includes ).
So belongs to the middle piece, and .
⚠️ Don't grab the first rule whose number "looks close." Read the inequality: and exclude the endpoint; and include it.
Evaluate It 🧮
Use
1) 2) 3)
Which Piece? 🔽
For , choose the piece each input uses.
Concept Check 🎯
Part 3: Graphing & Open/Closed Dots
🧩 Piecewise Functions
Part 3 of 7 — Graphing & Open/Closed Dots
🔑 The Plan: Graph each piece as if it were a normal function, but only draw it over its own interval. The open and closed dots at the boundaries tell the whole story of what happens at the edges.
How to Graph a Piecewise Function
For each piece:
- Graph the rule as usual (line, parabola, constant, etc.).
- Keep only the part over that piece's interval — erase everything outside it.
- Mark the endpoints:
- or (endpoint included) → a closed (filled) dot ●
- or (endpoint excluded) → an open (hollow) dot ○
The Endpoint Test
At a boundary , evaluate the rule on each side at :
- The piece whose condition includes gets the closed dot (that's the actual function value).
- The piece whose condition excludes gets an open dot.
💡 A vertical line at any should cross your graph exactly once (the vertical line test) — that's the visual version of "one output per input."
Worked Example
Left piece , drawn for . Plugging the boundary into this rule gives . Since excludes , put an open dot ○ at .
Right piece , drawn for . At , . Since includes , put a closed dot ● at .
Here both dots land at — the open one is "filled in" by the closed one, so the two pieces meet and the graph has no gap.
| At | Left rule | Right rule |
|---|---|---|
| Value | (open ○) | (closed ●) |
⚠️ Always plug the boundary into both rules. If the two values differ, the graph jumps there, leaving a visible gap.
Concept Check 🎯
Find the Endpoints 🧮
For , the boundary is .
1) Plug into the left rule : the open dot is at height 2) Plug into the right rule : the closed dot is at height 3) The -intercept of the graph is (use the correct piece)
When the Graph Jumps
Not every piecewise graph connects. Consider:
At the boundary :
- Left rule: → open dot ○ at .
- Right rule: → closed dot ● at .
The two endpoints are at different heights ( vs. ), so the graph jumps down by at . There's a visible break — a hole at and a solid point at .
💡 A jump is perfectly legal: it's still a function (one output per input — , the closed dot). The two pieces simply don't meet at .
Dots at the Jump 🔽
For , describe the endpoints at .
Part 4: Building Piecewise Models
🧩 Piecewise Functions
Part 4 of 7 — Building Piecewise Models
🔑 Why piecewise? A piecewise-defined function is a set of functions defined over non-overlapping intervals of the domain. It is the right model when a data set or a real situation behaves differently on different intervals: a flat fee and then a per-unit charge, a tank that fills and then drains, a speed that changes partway through a trip.
From Words to a Piecewise Rule
Scenario: A phone plan costs $30 per month and includes up to GB of data. Each GB over costs $10.
Step 1 — Find the intervals. The rule changes at GB. "Up to GB" includes , so the first interval is and the second is .
Step 2 — Write a rule for each interval.
- For : the cost is the flat $30.
- For : $30 plus $10 for each GB over , which is .
Step 3 — Check. Using GB is GB over, so , or $60.
Boundary Words → Inequality Signs
| Wording | Sign | Boundary value is… |
|---|---|---|
| "at most", "up to and including", "no more than" | included | |
| "less than", "under", "below" | excluded | |
| "at least", "or more" | included | |
| "more than", "over", "above" | excluded |
⚠️ Writing instead of matters: the $10 charge applies only to the GB beyond the threshold.
Concept Check 🎯
From Data to a Piecewise Model
A tank's volume , in liters, is recorded every minutes:
| (min) | |||||
|---|---|---|---|---|---|
The data change behavior at : the volume rises liters every minutes, then falls liters every minutes. Model each interval separately.
Piece 1, : rate L/min, starting at : .
Piece 2, : rate L/min, starting from at : .
Assumptions and Restrictions
- Domain from context: the data cover , so the model is restricted to that interval.
- Agreement at the switch: a tank's volume cannot change instantly, so both rules should give at . They do: .
- Other function types: a piece does not have to be linear. Each piece can be built with whatever technique fits its interval: a line, a quadratic, a constant, or a regression.
Use the Tank Model 🧮
1) 2) 3) The rate of change of on the second piece, in L/min:
Words to Conditions 🔽
Turn each phrase into the condition for its piece.
Part 5: Domain & Range
🧩 Piecewise Functions
Part 5 of 7 — Domain & Range
🔑 Domain = all valid inputs; Range = all possible outputs. For piecewise functions, you find each by examining the pieces together, paying special attention to the boundaries and which dots are open vs. closed.
Finding the Domain
The domain is every for which some piece is defined. Just take the union of all the condition-intervals.
- Piece 1 covers .
- Piece 2 covers .
Union: . There's no rule for , so negatives are not in the domain.
💡 If the conditions leave a gap (say nothing is defined on ), that gap is excluded from the domain. Read the conditions as the menu of allowed inputs.
Finding the Range
The range is every the graph actually reaches. Find the output set of each piece over its own interval, then take the union.
Piece 1, on : As runs from up to (but not including) , runs from down toward . At (included) we get ; for inputs just left of (which is excluded), gets close to but never reaches it. Outputs: .
Piece 2, on : Linear and increasing, from to . Outputs: .
Union: . So the range is .
⚠️ The range comes from the outputs, not the inputs. Always plug each interval's endpoints into that piece's rule, and watch which -values are actually attained.
Domain & Range 🔽
Use
Concept Check 🎯
Range Endpoints 🧮
For the piece defined on :
1) Smallest output (at ): 2) Largest output (at ):
For the piece defined on :
3) Largest output (at ):
Part 6: Absolute Value & Step Functions
🧩 Piecewise Functions
Part 6 of 7 — Absolute Value & Step Functions
🔑 Hidden Pieces: Two famous functions are secretly piecewise — the absolute value function and the greatest-integer (step) function. Recognizing them as piecewise unlocks how to evaluate and graph them.
Absolute Value Is Piecewise
The absolute value keeps positives the same and flips negatives positive. As a piecewise rule:
For a negative input like , the rule gives . That's why .
A shifted absolute value
The "corner" (vertex) sits where the inside equals zero: . The graph is a V with its point at .
💡 To split any into pieces, find where stuff . Left of that, the inside is negative (so you negate it); right of that, it's positive (so you keep it).
Concept Check 🎯
The Greatest-Integer (Step) Function
The greatest-integer function rounds down to the nearest integer — it returns the largest integer less than or equal to .
| Why | ||
|---|---|---|
| largest integer | ||
| itself | ||
| largest integer is , not ! | ||
| itself |
Its graph is a series of flat steps, each one unit wide, with a closed dot on the left (included) and an open dot on the right (excluded) — a piecewise function with infinitely many constant pieces.
⚠️ The trap is negatives. , because but . "Round down" always moves toward , not toward zero.
Step Function Values 🧮
Evaluate the greatest-integer function (round down to the nearest integer).
1) 2) 3)
Special Functions 🔽
Part 7: Modeling, Mixed Practice & Exit Quiz
🧩 Piecewise Functions
Part 7 of 7 — Modeling, Mixed Practice & Exit Quiz
You can read brace notation, evaluate carefully at boundaries, graph with open/closed dots, build piecewise models from words and data, find domain and range, and decode absolute-value and step functions. Now let's use it on a real model — then prove your mastery.
Real-World Modeling: A Tax Bracket
Piecewise functions are how the world handles "the rate changes after a threshold." Suppose a simplified tax on income (in dollars) is:
- The first $10,000 is taxed at : that's at most , i.e. $1000.
- Every dollar above $10,000 is taxed at , and the constant carries over the tax already owed on the first bracket.
Tax on $25,000
Since , use the bottom rule:
So the tax is $4000.
💡 The brackets agree at the boundary. At : top gives ; bottom gives . They match, so earning one more dollar never causes a sudden leap in tax — exactly how real brackets are designed.
Use the Model 🧮
Use
1) Tax on an income of $8000: 2) Tax on an income of $10000: 3) Tax on an income of $30000:
Mixed Practice 🎯
Quick Reference
| Task | What to do |
|---|---|
| Evaluate | Find the one condition satisfies; plug into that rule |
| Boundary value | include the endpoint; exclude it |
| Graph a piece | Draw the rule, keep it over its interval, ● if included / ○ if excluded |
| Build a model | One rule per interval; "at most" → , "more than" → ; restrict the domain to the context |
| Domain | Union of all condition-intervals (allowed inputs) |
| Range | Union of each piece's output set over its interval |
| Round down toward (watch negatives!) |
🔑 The whole topic reduces to one habit: always read the inequality at the boundary, then plug into the right rule.
Exit Quiz ✅
Answer all three to finish the lesson.