Course contentsShow
← Mathematics
Lesson 590 of 3,12114. Functions in DepthFree lesson

Definition and Notation of Piecewise Functions

Learn how to read and write piecewise functions with different formulas on different intervals using proper notation.

Definition and Notation of Piecewise Functions

What you'll learn: You'll understand how to read and write piecewise functions that use different formulas depending on which interval your input falls into.

What Is a Piecewise Function?

A piecewise function is like a mathematical "choose-your-own-adventure." Instead of one formula that works everywhere, you have different rules for different parts of the domain. Think of it like parking rates: one price for the first hour, a different price after that—the formula changes based on how long you've parked.

The Notation

Piecewise functions use a special bracket notation that shows:

  1. Each formula (rule)
  2. The condition telling you when to use that formula

The general format looks like this:

f(x) = { formula₁,  if condition₁
       { formula₂,  if condition₂
       { formula₃,  if condition₃

A Concrete Example

Here's a real piecewise function:

f(x) = { x + 2,    if x < 0
       { x²,       if x ≥ 0

This says: "If your input is negative, use x + 2. If your input is zero or positive, use x² instead."

So f(-3) = -3 + 2 = -1 (we used the first rule), but f(5) = 5² = 25 (we used the second rule).

Reading the Conditions

The conditions after "if" tell you which part of the domain uses which formula. They must cover all possible inputs without leaving gaps, and they typically don't overlap (though at boundary points, either rule would give the same result for continuous functions).

Key Takeaway: Piecewise functions assign different formulas to different intervals of the domain, written using bracket notation with conditions that specify when each formula applies.