Some functions use different formulas for different parts of their domain. These are called piecewise-defined functions. The absolute value, signum, and floor functions are classic examples that appear throughout mathematics, engineering, and computer science.
Quick Reference
| Function | Formula | Key property |
|---|---|---|
| Absolute value | Always nonnegative; V-shaped graph | |
| Signum | Extracts the sign of |
|
| Floor / Greatest integer | Rounds down to nearest integer |
Piecewise-Defined Functions
A piecewise-defined function is one that uses different formulas for different subsets of its domain.
For example, the function g: ℝ → ℝ defined by
is a piecewise-defined function.
The Absolute Value Function
The absolute value function
The absolute value gives the distance of
The Signum (Sign) Function
The signum function (or sign function), denoted
The signum function extracts the sign of a real number: positive inputs give
The Greatest Integer (Floor) Function
The greatest integer function (or floor function), denoted
Examples:
Note that for negative numbers, rounding down means rounding away from zero.
- The floor function maps
(all integers). - Other notations:
and .
Evaluating and Graphing Piecewise Functions
A function
Evaluate
Solution
Since