Year 11 Maths Advanced Module 1 ⏱ ~40 min Lesson 4 of 15

Piecewise & Absolute Value Functions

Ever noticed how a ride-share app charges one rate for the first few kilometres, then a different rate after that? The rule changes depending on how far you travel. That is exactly what a piecewise function does — and it is one of the most useful tools in applied mathematics.

🚗
Printable worksheet

Download this lesson's worksheet

Use the PDF for classwork, homework or revision. It includes key ideas, activities, questions, an extend task and success-criteria proof.

Think First

A delivery app charges $5 for any trip under 3 km, then adds $1.50 for every kilometre beyond 3 km. How much would a 2 km trip cost? How much would a 5 km trip cost? Why can't we describe both trips with a single simple formula like $C = 5 + 1.5d$?

Type your initial response below — you will revisit this at the end of the lesson.

Write your initial response in your book. You will revisit it at the end of the lesson.

Write your initial thinking in your book
Saved
📐

Formula Reference — This Lesson

Piecewise
Use the rule whose condition the input satisfies
$|x|$
$= x$ if $x \geq 0$ $= -x$ if $x < 0$
$|ax + b| = c$
Solve $ax + b = c$ and $ax + b = -c$
Key insight: The absolute value of a negative number is positive because the negative sign flips the sign. For example, $|-7| = -(-7) = 7$.
📖 Know

Key Facts

  • The definition of a piecewise function
  • The piecewise definition of absolute value
  • How to evaluate piecewise functions at given inputs
💡 Understand

Concepts

  • Why real-world pricing models often need piecewise rules
  • Why $|x|$ is always non-negative
  • How the graph of a piecewise function can change direction at a boundary point
✅ Can Do

Skills

  • Evaluate piecewise functions for numerical inputs
  • Write and interpret piecewise rules in context
  • Solve basic absolute value equations
  • Sketch piecewise linear functions

Misconceptions to Fix

Wrong: (a + b)² = a² + b².

Right: (a + b)² = a² + 2ab + b²; the middle term 2ab is essential and commonly forgotten.

Key Terms
piecewise functiona function defined by different rules for different parts of its domain
Thatexactly what a piecewise function does — and it is one of the most useful tools in applied mathematics
negative numberpositive because the negative sign flips the sign
whether the distanceless than or equal to $5$ km, or greater than $5$ km
numberits distance from zero on the number line
Distancealways non-negative, so absolute value always produces a positive result or zero
🔢

Piecewise Functions

A piecewise function is a function defined by different rules for different parts of its domain. Instead of one formula that works everywhere, we use multiple formulas, each with its own condition.

Surge pricing is piecewise. A ride-share app might charge $2$ per km for the first $5$ km, then $1.50$ per km after that. The rule for cost depends on whether the distance is less than or equal to $5$ km, or greater than $5$ km. One simple linear formula cannot capture both behaviours.

For example:

$$f(x) = \begin{cases} 2x + 1 & \text{if } x < 3 \\ 10 - x & \text{if } x \geq 3 \end{cases}$$

To evaluate this function, first check which condition the input satisfies, then apply the matching rule.

How to Evaluate a Piecewise Function

  1. Look at the input value.
  2. Find the condition that matches the input.
  3. Apply only that rule.
  4. Simplify.

For the function above:

  • $f(2)$: since $2 < 3$, use $2x + 1 \Rightarrow f(2) = 2(2) + 1 = 5$
  • $f(3)$: since $3 \geq 3$, use $10 - x \Rightarrow f(3) = 10 - 3 = 7$
  • $f(5)$: since $5 \geq 3$, use $10 - x \Rightarrow f(5) = 10 - 5 = 5$
⚖️

Absolute Value Functions

The absolute value of a number is its distance from zero on the number line. Distance is always non-negative, so absolute value always produces a positive result or zero.

We can define absolute value as a piecewise function:

$$|x| = \begin{cases} x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases}$$

This definition explains why $|-7| = 7$: because $-7 < 0$, we use the second piece and get $-(-7) = 7$.

Do not confuse $-x$ with a negative result. When $x$ is already negative, $-x$ becomes positive. The expression $-x$ means "the opposite of $x$," not "a negative number."

Solving Absolute Value Equations

If $|A| = B$ where $B \geq 0$, then there are two possibilities:

  • $A = B$
  • $A = -B$

For example, to solve $|2x - 4| = 6$:

  • Case 1: $2x - 4 = 6 \Rightarrow 2x = 10 \Rightarrow x = 5$
  • Case 2: $2x - 4 = -6 \Rightarrow 2x = -2 \Rightarrow x = -1$

Both solutions should be checked in the original equation.

GRAPH OF A PIECEWISE FUNCTION 0 3 −3 y x y = 2x + 1 y = 10 − x open dot closed dot

Worked Example 1 — Evaluating a Piecewise Function

Stepwise
Evaluate $f(-1)$, $f(2)$, and $f(4)$ for $\displaystyle f(x) = \begin{cases} x^2 + 1 & \text{if } x \leq 2 \\ 5x - 3 & \text{if } x > 2 \end{cases}$
  1. 1
    Evaluate $f(-1)$
    $-1 \leq 2$, so use the first rule.
    f(-1) = (-1)^2 + 1 = 1 + 1 = 2
  2. 2
    Evaluate $f(2)$
    $2 \leq 2$, so use the first rule.
    f(2) = (2)^2 + 1 = 4 + 1 = 5
  3. 3
    Evaluate $f(4)$
    $4 > 2$, so use the second rule.
    f(4) = 5(4) - 3 = 20 - 3 = 17
✓ Answer $f(-1) = 2$, $f(2) = 5$, $f(4) = 17$

Worked Example 2 — Solving an Absolute Value Equation

Stepwise
Solve $|3x - 6| = 9$.
  1. 1
    Set up the two cases
    3x - 6 = 9 \quad \text{or} \quad 3x - 6 = -9
  2. 2
    Solve Case 1
    3x = 15 \Rightarrow x = 5
  3. 3
    Solve Case 2
    3x = -3 \Rightarrow x = -1
  4. 4
    Check both solutions
    |3(5) - 6| = |9| = 9 \checkmark
    |3(-1) - 6| = |-9| = 9 \checkmark
✓ Answer $x = 5$ or $x = -1$

Worked Example 3 — Writing a Piecewise Rule from Context

Stepwise
A courier company charges $\\$5$ for deliveries up to and including $2$ km, and $\\$5$ plus $\\$1.50$ for each kilometre beyond $2$ km for longer deliveries. Write a piecewise function $C(d)$ for the cost in dollars of a delivery of $d$ km.
  1. 1
    Identify the conditions
    Up to 2 km: flat rate of $5. Beyond 2 km: $5 plus $1.50 per extra km.
  2. 2
    Write the first piece
    C(d) = 5 \quad \text{if } d \leq 2
  3. 3
    Write the second piece
    \text{Extra distance} = d - 2
    C(d) = 5 + 1.5(d - 2) \quad \text{if } d > 2
  4. 4
    Simplify the second piece (optional but tidy)
    C(d) = 5 + 1.5d - 3 = 2 + 1.5d \quad \text{if } d > 2
✓ Answer $C(d) = \begin{cases} 5 & \text{if } d \leq 2 \\ 2 + 1.5d & \text{if } d > 2 \end{cases}$
⚠️

Common Mistakes — Don't Lose Easy Marks

Using the wrong piece at the boundary
At the boundary value, always check whether the condition includes $\leq$, $\geq$, $<$, or $>$. If the condition says $x \leq 3$, then $x = 3$ belongs to that piece. If it says $x < 3$, then $x = 3$ does not.
✓ Fix: Before substituting, write the condition next to the input and tick the one that matches.
Thinking $|x|$ is always positive, so $|x| = x$ for all $x$
Many students incorrectly write $|-5| = -5$ because they forget the piecewise definition. The negative piece $|x| = -x$ is what turns negative inputs into positive outputs.
✓ Fix: Always ask: is the expression inside the absolute value positive or negative? If negative, multiply it by $-1$.
Forgetting the second case in absolute value equations
Equations like $|2x - 1| = 7$ almost always have two solutions. Students frequently stop after finding the first one.
✓ Fix: Every time you see $|A| = B$, immediately write $A = B$ and $A = -B$ side by side.
Writing the extra-distance piece incorrectly in context problems
In a ride-share problem, students sometimes write $1.5d$ for the entire trip when only the distance beyond the threshold should be charged at the higher or lower rate.
✓ Fix: Use $d - \text{threshold}$ for the variable part, not $d$ itself. The fixed fee covers the first part of the trip.

📓 Copy Into Your Books

📖 Piecewise Functions

  • Different rules apply to different parts of the domain
  • Always check the condition before choosing a rule
  • Boundary values belong to the piece with $\leq$ or $\geq$

🔢 Absolute Value

  • $|x| = x$ if $x \geq 0$
  • $|x| = -x$ if $x < 0$
  • $|x|$ is always $\geq 0$
  • $|A| = B$ gives two cases: $A = B$ and $A = -B$

⚠️ Evaluation Tip

  • Write the input value next to each condition
  • Tick the true condition before substituting
  • Use only the matching rule — ignore the others

💡 Context Tip

  • Fixed fee = constant piece
  • Variable fee = rate $\times$ (distance $-$ threshold)
  • Add the fixed fee to the variable part

📝 How are you completing this lesson?

🔍 Activity 1 — Calculate + Interpret

Evaluate the Piecewise Function

Consider the function $\displaystyle f(x) = \begin{cases} 2x + 3 & \text{if } x < 1 \\ x^2 & \text{if } 1 \leq x \leq 3 \\ 12 - x & \text{if } x > 3 \end{cases}$

  1. 1 Find $f(0)$.

    Type your answer:

    Answer in your workbook.

    Answer in your workbook
  2. 2 Find $f(1)$.

    Type your answer:

    Answer in your workbook.

    Answer in your workbook
  3. 3 Find $f(3)$.

    Type your answer:

    Answer in your workbook.

    Answer in your workbook
  4. 4 Find $f(5)$.

    Type your answer:

    Answer in your workbook.

    Answer in your workbook
🌍 Activity 2 — Piecewise in Context

Write the Rule

For each scenario, write a piecewise function using appropriate notation, then answer the question.

  1. 1 A parking garage charges $\\$10$ for the first 2 hours and $\\$4$ for each additional hour (or part thereof). Write $C(h)$ for the cost of parking $h$ hours where $h \leq 2$ and $h > 2$, then find $C(1.5)$ and $C(4)$.

    Type your answer:

    Answer in your workbook.

    Answer in your workbook
  2. 2 Solve $|x - 3| = 5$. Show both cases clearly.

    Type your answer:

    Answer in your workbook.

    Answer in your workbook
  3. 3 Explain why $|x|$ is never negative. Use the piecewise definition in your explanation.

    Type your answer:

    Answer in your workbook.

    Answer in your workbook
Revisit Your Thinking

Earlier you were asked: A delivery app charges $5 for any trip under 3 km, then adds $1.50 for every kilometre beyond 3 km. How much would a 2 km trip cost? How much would a 5 km trip cost? Why can't we describe both trips with a single simple formula?

A 2 km trip costs $5 because it falls under the flat-rate condition ($d < 3$). A 5 km trip costs $5 + 1.50(5-3) = \\$8$ because it exceeds the threshold. A single simple formula like $C = 5 + 1.5d$ would charge $5 + 1.5(2) = \\$8$ for the 2 km trip, which is wrong. The rule genuinely changes at the 3 km boundary, so a piecewise function is required to model the pricing accurately.

Now revisit your initial response. What did you get right? What has changed in your thinking?

Look back at your initial response in your book. Annotate it with what you now understand differently.

Annotate your initial response in your book
Saved
Revisit Your Initial Thinking

Look back at what you wrote in the Think First section. What has changed? What did you get right? What surprised you?

MC

Multiple Choice

5 random questions from a replayable lesson bank — feedback shown immediately

📝

Extended Questions

ApplyBand 3

8. Consider $\displaystyle f(x) = \begin{cases} 3x - 1 & \text{if } x < 2 \\ 5 & \text{if } x = 2 \\ x^2 - 1 & \text{if } x > 2 \end{cases}$. Find $f(0)$, $f(2)$, and $f(3)$. Show which piece you used for each. 3 MARKS

Type your answer below:

Answer in your workbook.

✏️ Answer in your workbook
ApplyBand 4

9. A theme park charges $\\$40$ for entry if you are under 16 years old, and $\\$60$ if you are 16 or older. Let $A(x)$ be the admission cost in dollars for a person of age $x$. (a) Write $A(x)$ as a piecewise function. (b) Find $A(15)$ and $A(16)$. (c) Explain why a single linear formula cannot model this pricing structure. 4 MARKS

Type your answer below:

Answer in your workbook.

✏️ Answer in your workbook
EvaluateBand 5

10. A student solves $|2x - 4| = 8$ and writes: "$2x - 4 = 8$, so $x = 6$." Evaluate whether this answer is complete. If it is not, find the missing solution and explain why it must be included. 3 MARKS

Type your answer below:

Answer in your workbook.

✏️ Answer in your workbook

✅ Comprehensive Answers

🔍 Activity 1 — Evaluate the Piecewise Function Model Answers

1. $f(0) = 2(0) + 3 = 3$ (first piece, since $0 < 1$)

2. $f(1) = (1)^2 = 1$ (second piece, since $1 \leq 1 \leq 3$)

3. $f(3) = (3)^2 = 9$ (second piece, since $1 \leq 3 \leq 3$)

4. $f(5) = 12 - 5 = 7$ (third piece, since $5 > 3$)

🌍 Activity 2 — Piecewise in Context Model Answers

1. $C(h) = \begin{cases} 10 & \text{if } h \leq 2 \\ 10 + 4(h - 2) & \text{if } h > 2 \end{cases}$ or simplified $C(h) = 2 + 4h$ for $h > 2$. $C(1.5) = \\$10$, $C(4) = 10 + 4(2) = \\$18$.

2. Case 1: $x - 3 = 5 \Rightarrow x = 8$. Case 2: $x - 3 = -5 \Rightarrow x = -2$. Solutions: $x = 8$ or $x = -2$.

3. When $x \geq 0$, $|x| = x$ which is non-negative. When $x < 0$, $|x| = -x$, and since $x$ is negative, $-x$ is positive. In both cases the result is $\geq 0$.

❓ Multiple Choice

1. B — $x = 2$ satisfies $x \leq 2$, so $f(2) = 3(2) + 1 = 7$.

2. B — $|-5| = 5$.

3. A — $|x| = x$ if $x \geq 0$, and $-x$ if $x < 0$.

4. B — $4 \geq 3$, so $f(4) = 2(4) + 1 = 9$.

5. B — $y = |x - 2|$ has vertex at $(2, 0)$.

📝 Short Answer Model Answers

Q8 (3 marks): $f(0) = 3(0) - 1 = -1$ using $3x - 1$ because $0 < 2$ [1]. $f(2) = 5$ using the middle piece because $x = 2$ [1]. $f(3) = (3)^2 - 1 = 8$ using $x^2 - 1$ because $3 > 2$ [1].

Q9 (4 marks):

(a) $A(x) = \begin{cases} 40 & \text{if } x < 16 \\ 60 & \text{if } x \geq 16 \end{cases}$

(b) $A(15) = \\$40$ and $A(16) = \\$60$ [1].

(c) A single linear formula would produce a gradual increase in cost as age increases, but the actual pricing jumps from $\\$40$ to $\\$60$ at exactly age 16 [1]. A piecewise function is needed because the rate of change is not constant across all ages.

Q10 (3 marks): The student's answer is incomplete [1]. They missed the second case: $2x - 4 = -8 \Rightarrow 2x = -4 \Rightarrow x = -2$ [1]. The missing solution must be included because absolute value represents distance from zero, so there are two values of $x$ that give an expression inside the absolute value with magnitude 8 [1].

Consolidation Game

Piecewise & Absolute Value Functions

Mark lesson as complete

Tick when you've finished all activities and checked your answers.