Instructional videos are coming to Albert.Join the waitlist
Math
Practice
24.2

Piecewise Functions: Algebra 2 Review

✎ Study Mode — Highlight text and annotate as you read.

Income tax brackets, cell phone data plans, parking garage fees, and shipping charges all follow rules that change depending on the input. Earn more than a certain amount and a different tax rate applies; use more data than your plan allows and a new charge kicks in. Piecewise functions model these situations by using different formulas for different parts of the domain. In Algebra 2, you will evaluate, graph, and write piecewise functions, and analyze features like continuity and range.

This article covers Topic 24.2: Piecewise Functions in Unit 24, Algebra 2: Functions. The topic asks you to evaluate and graph piecewise-defined functions, including step and absolute value functions, write piecewise rules from graphs or descriptions, and analyze their domain, range, and continuity.

By the end, you should be able to:

  1. Evaluate a piecewise function at any input, including boundary values.
  2. Graph piecewise functions with correct endpoints.
  3. Write a piecewise function from a graph or real-world description.
  4. Determine domain, range, and whether a piecewise function is continuous.

Notation

A piecewise function lists each formula with its own condition:

\(f(x)=\begin{cases}-x+2&\text{if }x\lt 0\\x^{2}&\text{if }0\le x\le 3\\9&\text{if }x\gt 3\end{cases}\)

The conditions divide the domain into intervals that do not overlap, so each input uses exactly one formula.

Evaluating

Find which condition the input satisfies, then use only that formula.

Worked example 1: For the function above, find \(f(-4)\), \(f(0)\), \(f(3)\), and \(f(5)\).

  1. \(-4\lt 0\): use \(-x+2\). \(f(-4)=4+2=6\).
  2. \(0\) satisfies \(0\le x\le 3\): use \(x^{2}\). \(f(0)=0\).
  3. \(3\) satisfies \(0\le x\le 3\): \(f(3)=9\).
  4. \(5\gt 3\): \(f(5)=9\).

Graphing

Graph each piece only on its interval. Use a closed dot for an included endpoint (\(\le\) or \(\ge\)) and an open dot for an excluded endpoint (\(\lt\) or \(\gt\)).

A piecewise-defined function.
A piecewise-defined function.

For the function above: the line \(y=-x+2\) is drawn for \(x\lt 0\), approaching an open dot at \((0,2)\). The parabola \(y=x^{2}\) runs from a closed dot at \((0,0)\) to a closed dot at \((3,9)\). The horizontal line \(y=9\) continues to the right of \(x=3\).

Continuity

A function is continuous if its graph has no breaks, jumps, or holes. For a piecewise function, check each boundary: the pieces must meet at the same point.

In the example, at \(x=0\) the left piece approaches 2 but the middle piece starts at 0, so there is a jump. At \(x=3\), the middle piece ends at 9 and the right piece is also 9, so the graph is continuous there.

Worked example 2: Find \(c\) so that \(g(x)\) is continuous, where \(g(x)=2x+c\) for \(x\lt 1\) and \(g(x)=x^{2}+3\) for \(x\ge 1\).

  1. Right piece at \(x=1\): \(1+3=4\).
  2. Left piece at \(x=1\): \(2+c\).
  3. Set equal: \(2+c=4\), so \(c=2\).

Why does this matter? Continuity questions are common in Algebra 2 and preview a central idea of calculus. Evaluating both pieces at the boundary is the reliable method.

Absolute Value as a Piecewise Function

The function \(f(x)=|x-2|\) can be written as \(x-2\) for \(x\ge 2\) and \(-(x-2)=-x+2\) for \(x\lt 2\). Rewriting absolute value this way helps when solving absolute value equations and inequalities algebraically.

Absolute value as distance on a number line.
Absolute value as distance on a number line.

Step Functions

A step function is constant on each interval and jumps between them. The greatest integer function, \(f(x)=\lfloor x\rfloor\), gives the greatest integer less than or equal to \(x\). For example, \(\lfloor 3.7\rfloor=3\) and \(\lfloor{-}1.2\rfloor=-2\). Its graph looks like a staircase, with a closed dot on the left of each step and an open dot on the right.

Writing Piecewise Functions

Worked example 3: A parking garage charges 4 dollars for up to 1 hour, 7 dollars for more than 1 hour up to 3 hours, and a flat 12 dollars for more than 3 hours. Write a piecewise function for the cost \(C(t)\), where \(t\) is hours and \(t\gt 0\).

  1. \(C(t)=4\) if \(0\lt t\le 1\).
  2. \(C(t)=7\) if \(1\lt t\le 3\).
  3. \(C(t)=12\) if \(t\gt 3\).

Notice how “up to” includes the endpoint and “more than” excludes it.

Domain and Range

The domain is the union of all the intervals in the conditions. The range is the set of all outputs from all pieces. For the parking function, the domain is \(t\gt 0\) and the range is \(\{4,7,12\}\).

Reading domain and range from a graph.
Reading domain and range from a graph.

Why does this matter? Piecewise models describe many real systems. Reading the conditions carefully, especially at boundaries, prevents the most common errors.

Test-Taking Strategies

Mnemonic Devices and Memory Shortcuts

“Check the condition, then compute.” For continuity, “both pieces must land on the same point.”

Cross-Topic Connections

Common Question Formats

  • Evaluate a piecewise function at given inputs.
  • Match a piecewise function to its graph.
  • Find a constant that makes a function continuous.
  • Write a piecewise model from a description.

Frequent Student Mistakes

  • Using the wrong piece at a boundary value.
  • Drawing open and closed dots incorrectly.
  • Assuming every piecewise function is continuous.

Test-Day Shortcuts

Underline each inequality symbol in the conditions before evaluating. Boundary values decide many answers.

Time Management Tips

Piecewise skills appear on Algebra 2 unit tests and standardized tests such as the SAT and ACT. Evaluation questions are quick; spend extra time on continuity and modeling problems.

Highlight & Annotate
📝

Study Annotations

You just made your first highlight! You can highlight text and click images to add study notes as you read.

Your annotations are saved during this session, as long as you keep this browser tab open. When you’re done, use the Print button to save the article with all your notes in the margins.

Click any highlight to view or edit your note.

Click another word to finish highlighting, or press Esc to cancel
0 Notes
Study Mode
Print Preview — Article with Annotations

Ready to practice? Try Albert free.

Build real confidence with thousands of adaptive practice questions across AP®, SAT®, ACT®, and core subjects — aligned to what you’re studying right now.

Practice for Algebra 2