Piecewise Functions - Complete Interactive Lesson
Part 1: Reading the Notation
🧩 Piecewise Functions
Part 1 of 5 — Reading the Notation
Topics in This Part
| Section |
|---|
| What Is a Piecewise Function? |
| The Big Curly Brace |
| Choosing the Right Piece |
🔑 Key Concept: A piecewise function is one function built from several rules — each rule applies only on its own stretch of the number line. The whole game is figuring out which rule to use for which input.
What Is a Piecewise Function?
Most functions you've met use a single formula for every input — like . A piecewise function uses different formulas on different intervals.
Think of a parking garage:
- The first hour costs a flat $5.
- After that it's $2 per additional hour.
That's two rules glued together. Mathematically we stack them under a single curly brace:
Each line is a piece: a formula on the left and the interval where it applies on the right.
💡 The function still passes the vertical line test — for any single input , exactly one piece gives the output. The intervals are designed so they never overlap.
The Anatomy of the Notation
Read a piecewise function right-to-left: first check the condition, then use the matching formula.
| To find... | Ask: which interval is in? | Then use... |
|---|---|---|
| ✓ | ||
| ✓ | ||
| ✓ |
⚠️ Don't plug a number into every formula. A piecewise function gives you a menu of formulas; you pick the one whose condition your input satisfies, and ignore the rest.
Concept Check 🎯
Match Input to Piece 🔽
Use . For each input, choose the formula you'd use.
From "Which Piece" to "What Value"
Choosing the right piece is half the job. The other half is just plugging in — substitute your input into that one formula and simplify.
To find : since , use .
💡 Slow down on the sign of the input. A negative input squared becomes positive, but a negative input in stays negative until you add. Substitution mistakes — not piece-selection mistakes — are where most lost points actually come from.
Pick the Piece, Then Evaluate 🧮
Use
1) 2) 3)
Recap
To work with any piecewise function:
- Read the conditions on the right of each piece.
- Locate your input on the number line — find the interval it belongs to.
- Use only that piece's formula.
You've got the reading skill down. In Part 2 we zoom in on the trickiest spot: the boundary point where two intervals meet, and what those , , , symbols really decide.
Part 2: Boundary Points & Evaluating Carefully
🧩 Piecewise Functions
Part 2 of 5 — Boundary Points & Evaluating Carefully
🔑 The Idea: Two pieces meet at a boundary. The inequality symbol ( vs ) decides which piece owns that exact boundary value. Getting this right is the #1 skill for evaluating and graphing piecewise functions.
Who Owns the Boundary?
Look at where the intervals "touch":
The boundary is . Which piece claims it?
- The first piece says . The includes . ✓
- The second piece says . The strict excludes .
So uses the first piece: .
🔑 Rule of thumb: The piece with the "or-equal-to" symbol ( or ) is the one that owns the boundary. A well-defined piecewise function gives exactly one piece the equality at each boundary.
Read the Inequalities 🔽
Use
Functions With Three (or More) Pieces
The same logic scales. Just walk the number line from left to right and find the one interval your input lives in.
| Input | Interval test | Output |
|---|---|---|
| ✓ | ||
| ✓ | (the middle piece) | |
| ✓ | ||
| ✓ |
💡 The middle piece here is a constant, . Constant pieces are perfectly legal — the function just flat-lines across that interval.
Concept Check 🎯
Mind the Boundary 🧮
Use
1) 2) 3)
Part 3: Graphing Piecewise Functions
🧩 Piecewise Functions
Part 3 of 5 — Graphing Piecewise Functions
🔑 Big Payoff: A piecewise graph is just each piece's graph, trimmed to its own interval. The only new skill is marking endpoints correctly: a closed dot ● for "included," an open dot ○ for "excluded."
Open vs. Closed Endpoints
At every boundary, the inequality tells you the dot:
| Symbol at the boundary | Endpoint dot | Meaning |
|---|---|---|
| or | ● closed (filled) | the point is on the graph |
| or | ○ open (hollow) | the point is not on the graph |
Example
- The first piece, , runs up to . Since , put a closed dot ● at its right end: because .
- The second piece, , starts just after . Since , put an open dot ○ at .
💡 At a boundary you often draw two dots stacked vertically — one closed, one open — because the two pieces disagree about the height there. That vertical gap is called a jump.
Concept Check 🎯
Reading Domain & Range From the Graph
Once a piecewise function is graphed, the domain is the set of -values it covers, and the range is the set of -values it reaches.
Example
- Domain: the pieces cover joined with , which together fill . In interval notation: .
- Range: the first piece is the single value . The second piece, for , sweeps from up to . So the outputs are together with .
⚠️ Don't assume the domain is "all real numbers." Piecewise functions are often defined only on a limited set of intervals — read the conditions to find where the function actually lives.
Endpoints & Domain 🔽
Use
Plot the Endpoints 🧮
Use . Find the -coordinate of each endpoint at the boundary .
1) Left piece's endpoint height: -value from at is (this dot is open ○) 2) Right piece's endpoint height: -value from at is (this dot is closed ●) 3) The size of the jump (closed height minus open height) is
Part 4: Absolute Value, Step Functions & Continuity
🧩 Piecewise Functions
Part 4 of 5 — Absolute Value, Step Functions & Continuity
🔑 The Reveal: Some "famous" functions are secretly piecewise. Absolute value is the classic example, and step functions model real costs. We'll also learn to spot whether a piecewise graph is continuous (no gaps) or has a jump.
Absolute Value Is Piecewise
The definition of absolute value is a piecewise rule:
When is negative, makes it positive; when is non-negative, you leave it alone. That's why the graph of is a V: a downward ray on the left, an upward ray on the right, meeting at the origin.
Rewriting a Shifted Absolute Value
becomes
The "corner" of the V sits where the inside equals zero: .
💡 To convert into pieces: find where the inside is (that's the boundary), keep the expression as-is where it's , and negate it where it's .
Concept Check 🎯
Step Functions
A step function is piecewise-constant: it's flat on each interval and "jumps" to a new height at the boundaries, producing a staircase.
The most famous is the greatest integer (floor) function, , which rounds down to the nearest integer:
⚠️ For negative inputs the floor goes more negative: , not , because is the greatest integer that is still .
Real-world steps: a parking meter charging by the started hour, or postage that jumps at each ounce — the price is constant within a band, then leaps at the edge.
Floor Function Practice 🧮
Evaluate the greatest-integer (floor) function — round down to the nearest integer.
1) 2) 3)
Continuous or a Jump?
A piecewise function is continuous at a boundary if the two pieces meet at the same height there — no gap, no jump. Test it by plugging the boundary into both neighboring formulas:
- Left piece at : .
- Right piece approaching : .
Both give , so the graph connects — it's continuous at . ✓
Compare with : now the left gives but the right approaches . The heights differ, so there's a jump of .
🔑 Continuity test at a boundary : evaluate both pieces at . Equal heights ⇒ continuous. Different heights ⇒ jump (discontinuity).
Continuous or Jump? 🔽
Part 5: Applications & Mastery Check
🧩 Piecewise Functions
Part 5 of 5 — Applications & Mastery Check
You can now read the notation, evaluate carefully across boundaries, graph the pieces with correct dots, recognize absolute-value and step functions, and test for continuity. Let's apply it to the real world — then finish with an Exit Quiz.
Real-World Models: Tiered Pricing
Piecewise functions are everywhere money is involved: tax brackets, shipping, phone plans, and utility bills all change rate at thresholds.
Example: Cell-Phone Data
A plan charges a flat $30 for up to GB, then $10 per extra GB beyond :
| Data used | Which piece | Cost |
|---|---|---|
| GB | $30 | |
| GB | $30 | |
| GB | , i.e. $60 |
💡 Notice the model is continuous at : the flat piece gives $30 and the second piece gives , i.e. $30. Good pricing models usually avoid surprise jumps right at the threshold.
Apply the Model 🧮
A ride-share charges a $4 base for the first miles, then $2 per additional mile:
1) Cost of a -mile ride: (dollars) 2) Cost of a -mile ride: (dollars) 3) Cost of an -mile ride: (dollars)
Building a Piecewise Function From Words
Translating a scenario into notation is a top exam skill. Work in three steps:
- Identify the thresholds — the inputs where the rule changes (these become your boundaries).
- Write a formula for each interval — often a constant or a "base + rate × extra" expression.
- Attach the correct inequalities so every input lands in exactly one piece.
Example: Movie-Theater Tickets
"Kids ( and under) pay $6; everyone else pays $11."
The threshold is age . Translating:
The on the first piece makes sure a -year-old gets the kids' price, and the strict keeps at the adult price — no overlap, no gap.
Mixed Practice 🎯
Exit Quiz ✅
Answer all three to finish the lesson.