Mastering Piecewise Functions
Introduction to Piecewise Functions
When One Rule Isn't Enough
So far, you've likely worked with functions that follow a single, consistent rule. For example, in the function , you always square the input, no matter what is. But life isn't always so simple. Some situations require different rules for different circumstances.
Think about ticket prices at a movie theater. Children under 12 might pay $10, adults pay $15, and seniors over 65 pay $12. The price you pay depends on which category your age falls into. There isn't one single formula that calculates the price for everyone. Instead, there are multiple pieces that make up the complete pricing rule.
This is the core idea behind a piecewise function. It's a function built from different pieces, where each piece applies to a specific part of the input domain.
In mathematics, we use these functions to model scenarios that change based on certain conditions. A cell phone plan might have a flat rate for the first 10 gigabytes of data and then charge per gigabyte after that. A tax bracket system charges different rates depending on income levels. These are all real-world examples of piecewise functions at work.
Reading the Notation
Because piecewise functions have multiple rules, we need a special way to write them down. The notation looks a bit strange at first, but it's very logical. It uses a single large curly brace to group all the pieces together.
Reading this example aloud, you would say: " equals if is less than zero, and equals squared if is greater than or equal to zero."
The conditions are crucial. They divide the function's entire domain into separate, non-overlapping intervals. For any given input , only one of the conditions can be true, which is how you know which piece of the function to apply.
A Few More Examples
Piecewise functions can have more than two pieces. Let's look at the movie ticket example again. If is the age of a person, we could model the ticket price, , like this:
Notice how the conditions cover all possible customer ages, and no age falls into more than one category. This is a key feature of a well-defined piecewise function. The sub-domains must not overlap.
Understanding how to read and interpret this notation is the first step toward working with these versatile functions.
