Mathovore, everything you need to succeed in math: Common Core lessons, worksheets, tests and quizzes
Skip to content

Piecewise Function

Piecewise Function – definition and example, Algebra 1 math glossary – Mathovore

Key takeaway: A piecewise function is a single function defined by two or more different rules, each one applying only on its own interval of input values.

Grade 9 – Algebra 1F-IF.C.7bFunctions and Graphs

Definition of Piecewise Function

Definition

A piecewise function uses a different formula for different parts of its domain. To evaluate it, first decide which interval the input belongs to, then use only the matching rule. Real life has many such situations: a parking garage charges a flat fee for the first hour and a different rate afterward, and income tax uses different rates for different bands of income.

The graph is built from several pieces, each a segment or ray of a simple graph, placed side by side. At the boundary value, watch the endpoints. A closed circle shows the point that belongs to the function, and an open circle shows a point that is excluded. The pieces may meet, or the graph may jump.

Formula and notation

A piecewise function lists its rules with their conditions. For example:

\[f(x) = x + 2 \ \text{ if } x \le 1, \qquad f(x) = 6 – 2x \ \text{ if } x > 1\]

Each input uses exactly one rule, so the conditions must not overlap. The symbols \(\le\) and \(<\) decide which rule owns the boundary.

y = x + 2 (x ≤ 1)y = 6 − 2x (x > 1)(1, 3) closed(1, 4) open
The blue piece ends with a closed circle at (1, 3); the orange piece starts with an open circle at (1, 4).

Key facts

  • To evaluate a piecewise function, check the condition first, then substitute into the one rule that applies.
  • Every input in the domain must belong to exactly one piece.
  • Closed and open circles mark which piece owns each boundary point.
  • A jump happens when the pieces do not meet at the boundary.

Piecewise Function example

Problem

Let \(f(x) = x + 2\) when \(x \le 1\) and \(f(x) = 6 – 2x\) when \(x > 1\). Find \(f(-3)\), \(f(1)\) and \(f(3)\).

  1. \(-3 \le 1\), so use the first rule: \(f(-3) = -3 + 2 = -1\).

  2. \(1 \le 1\) is true, so the first rule owns the boundary: \(f(1) = 1 + 2 = 3\).

  3. \(3 > 1\), so use the second rule: \(f(3) = 6 – 2(3) = 0\).

\(f(-3) = \) \(-1\), \(f(1) = \) 3, \(f(3) = \) 0.

Common mistake

Watch out

For \(f(1)\), Stella uses the second rule and gets \(6 – 2(1) = 4\), because the second rule gives the larger answer.

Why it is wrong

The condition decides, not the size of the output. The second rule applies only when \(x > 1\), and 1 is not greater than 1. The first rule, with \(x \le 1\), includes 1, so \(f(1) = 3\). The value 4 is only the open circle’s height.

Related terms and lessons

Browse the glossary: A–Z list · Algebra 1 vocabulary · Functions and Graphs

Rate this page