Revision GuideEduninja4 min read2026-08-05

Piecewise Functions Explained | IB Maths AA

Revise IB Maths AA piecewise functions with interval rules, endpoint notation, graphs, evaluation steps, common mistakes and practice.

Piecewise Functions Explained | IB Maths AA

Piecewise functions can feel confusing because the function has more than one rule. The key is simple: first identify the interval containing the input, then use only the rule attached to that interval. This guide is written for IB Maths AA students and focuses on notation, graphs, evaluation and exam mistakes.

Quick Answer

  • A piecewise function uses different formulas on different intervals.
  • The condition beside each formula tells you when to use it.
  • Check the endpoint carefully: < means open, while means included.
  • To evaluate a value, choose the correct branch before substituting.
  • To graph the function, draw each rule only on its stated interval.

Piecewise function definition

What Is a Piecewise Function?

A piecewise function is defined by two or more rules. For example:

f(x) = x + 2 when x < 0, and f(x) = x^2 when x ≥ 0.

The first rule applies only when x < 0. The second rule applies when x ≥ 0. The formulas are not interchangeable: the condition is part of the definition.

How to Read the Conditions

Symbol Meaning Graph cue
x < a values below a open endpoint at a
x ≤ a values below or equal to a closed endpoint at a
x > a values above a open endpoint at a
x ≥ a values above or equal to a closed endpoint at a

The endpoint belongs to a branch only when the inequality includes equality.

How to Evaluate a Piecewise Function

  1. Write down the input value.
  2. Compare it with every condition and select the correct branch.
  3. Substitute into that formula and simplify.

For example, if f(x) = 2x + 1 for x < 3 and f(x) = x^2 - 4 for x ≥ 3, then f(4) uses the second rule because 4 ≥ 3.

f(4) = 4^2 - 4 = 12

Do not choose a rule because it looks easier. Choose it because the input satisfies its condition.

Evaluating a piecewise function

How to Graph Piecewise Functions

Graph each formula as if it were a normal function, but stop it at the boundaries given by the conditions. Then mark the endpoint correctly.

  • Use an open circle when the boundary is excluded.
  • Use a closed circle when the boundary is included.
  • Draw no values outside the branch's interval.
  • Check whether the two branches meet, jump or leave a hole.

Continuity at a Boundary

At a boundary such as x = a, compare the left-hand value, the right-hand value and the defined value f(a). The function is continuous there only when the approaching values and the actual value agree.

Common Exam Mistakes

Mistake Why it loses marks Better habit
Using the first formula for every input The conditions are ignored Check the interval before substitution
Treating < as The endpoint is assigned to the wrong branch Look for equality in the condition
Drawing both rules across the whole graph The graph no longer represents the domain Restrict each rule to its interval
Forgetting open or closed circles Endpoint inclusion is part of the graph Mark the boundary after plotting
Giving only a number The method may be unclear State the chosen condition and substitution

Mini Practice

For g(x) = 3x - 2 when x < 1 and g(x) = x^2 + 1 when x ≥ 1, find g(0), g(2), and g(1).

Answer guide: g(0) = -2; g(2) = 5; and g(1) uses the second rule because the condition is x ≥ 1, giving g(1) = 2.

Practice This Topic

Try this exam-style question: Given a two-branch piecewise function, evaluate a value on each side of the boundary and explain whether the endpoint is open or closed.

Answer guide:

  • Compare the input with the branch conditions.
  • Choose the matching formula before substituting.
  • Use an open circle for an excluded endpoint and a closed circle for an included endpoint.
  • Show the substitution so the branch choice is visible.

Practise IB Maths AA SL functions and graph questions.

FAQ

What is the easiest way to evaluate a piecewise function?

Check the input against the conditions first, choose the matching rule, and only then substitute. Most errors happen when students substitute before deciding which interval applies.

What do open and closed circles mean?

An open circle means the endpoint is not included in that branch. A closed circle means the endpoint is included. The inequality tells you which symbol to use.

Can a piecewise function be continuous?

Yes. It is continuous at a boundary when the left-hand value, right-hand value and defined function value all agree. If they do not agree, the graph has a jump or a hole.

Related Study Links

Final Takeaway

Piecewise functions become manageable when you separate the decision from the calculation: identify the interval, choose the rule, substitute, and check the endpoint.

Revision GuideIB Maths AAPiecewise Functions
IB Mathematics AA SL

Practise IB Mathematics AA SL IB maths AA exam questions.

Open the matching EduNinja workspace, question bank and syllabus-linked study tools.

Related articles

More course notes, updates and study resources from the EduNinja blog.

View all
EduNinja

EduNinja is an independent platform and is not affiliated with any examination board. Materials are user-contributed, and copyrights remain with their respective owners.

EduNinja began as an education project in 2021 and is now operated by Eduninja Limited, incorporated in Hong Kong in 2025.
RM.1801, EASEY COMM. BIDG., 253-261 HENNESSY ROAD, WANCHAI, HONG KONG

© 2021 - 2026 Eduninja Limited