Back to Pre-Calculus and Trig

Piecewise functions and absolute value functions

Lesson 2 of 4 in this unit

Unit 1: Functions and Their Graphs
~3 min read
Advanced

Explanation

A piecewise function uses different rules for different parts of its domain — each piece is defined over a specific interval. To evaluate, identify which interval the input falls in, then apply that rule. Absolute value functions can be written as piecewise: |x| = x if x ≥ 0, and −x if x < 0. Their graphs form a V-shape with vertex at the point where the expression inside equals zero.

Piecewise functions model real-world situations with changing rules — tax brackets, shipping rates that change with weight, and electricity pricing tiers are all piecewise functions.

Educational Video

▶️ Piecewise functions – Khan Academy

Created by Khan Academy (free educational content)

Watch videos on this topic

Practice Problems

1.Evaluate f(x) = {x + 3 if x < 2; x² if x ≥ 2} at x = −1 and x = 3.
2.Write |x − 5| as a piecewise function.
3.What is the vertex of f(x) = |2x − 6|?
4.Graph (describe): f(x) = {2 if x ≤ 0; x + 2 if x > 0}

Answer Key

1.
2.
3.
4.

Practice Quiz

Test your understanding of this lesson with a short AI-generated quiz.

Practice Bot

Ask for practice questions on any topic in Pre-Calculus and Trig — then reveal the answers when you're ready.

Online Science InstituteOnline Science Institute

A free study-resource hub for middle school and high school students, providing organized math and science materials.

Disclaimer: OSI is a student-created educational resource. We are not an accredited institution and do not offer certification.

Some materials link to third-party resources which are not owned or controlled by OSI. We recommend verifying information with official educational sources.

© 2026 Online Science Institute. All rights reserved.