Special Functions: Piecewise, Floor and Absolute Value

Three functions that break the single-rule pattern: the piecewise function, the floor function that always rounds down, and absolute value with its V-shaped graph.

--

Most functions follow a single rule everywhere. These three do not. Each one either changes its rule partway along, chops a number downward, or strips away a minus sign — and each leaves a distinctive shape on the graph.

Concept The piecewise function

A piecewise function uses a different rule depending on which interval x falls into.

Read the conditions carefully. Here belongs to the second rule, because that condition uses "greater than or equal to". Every input must match exactly one case.

Example Evaluating a piecewise function

Using the function above, find and .

−3 is less than 0, so use .
0 satisfies , so use .
⟹ f(−3) = −1 and f(0) = 0
Concept The floor function
a staircase of steps
The floor function gives the largest integer that is less than or equal to x. It always moves down — it never rounds to the nearest whole number.
— note that rounding would give 2.

Think of a teacher who simply discards the fractional part of a mark. Each step begins with a filled circle and ends with a hollow one, because the next whole number belongs to the following step.

Concept The absolute value function
f(x) = −x f(x) = x vertex at the origin
The absolute value turns any negative input positive and leaves positive inputs untouched. The two halves meet at the origin, producing a sharp V.
and .

Notice that absolute value is itself a piecewise function — the first idea in this lesson, applied to a particular pair of rules.

Summary
  1. A piecewise function changes its rule from one interval to the next.
  2. Check which case a boundary value like x = 0 belongs to.
  3. The floor function ⌊x⌋ takes the greatest integer not above x — always downward.
  4. Absolute value |x| makes negatives positive and leaves positives alone.
  5. Their graphs are separate pieces, a staircase, and a V.