Mathwords logoMathwords

Staircase Function — Definition, Formula & Examples

A staircase function is a piecewise constant function whose graph looks like a series of flat steps, jumping from one constant value to another at specific points. The most common examples are the floor function and ceiling function.

A function f:R→Rf: \mathbb{R} \to \mathbb{R} is a staircase function (or step function) if there exists a partition of its domain into intervals on each of which ff takes a single constant value. At the boundaries between intervals, ff has jump discontinuities.

Key Formula

f(x)=cifor x∈[ai, ai+1)f(x) = c_i \quad \text{for } x \in [a_i,\, a_{i+1})
Where:
  • cic_i = The constant value on the $i$-th interval
  • aia_i = The left endpoint of the $i$-th interval
  • ai+1a_{i+1} = The right endpoint (excluded) of the $i$-th interval

How It Works

Each "step" of the staircase corresponds to an interval where the function outputs a constant value. At the endpoint of each interval, the function jumps instantaneously to a new constant value, creating a jump discontinuity. The floor function ⌊x⌋\lfloor x \rfloor is the most familiar staircase function: it rounds every real number down to the nearest integer, so on [0,1)[0,1) it equals 00, on [1,2)[1,2) it equals 11, and so on. To evaluate a staircase function at a point, you determine which interval contains that point and return the corresponding constant.

Worked Example

Problem: Evaluate the floor function (a staircase function) at x=3.7x = 3.7 and x=−1.2x = -1.2.
Step 1: Recall that the floor function ⌊x⌋\lfloor x \rfloor returns the greatest integer less than or equal to xx.
⌊x⌋=max⁡{n∈Z:n≤x}\lfloor x \rfloor = \max\{n \in \mathbb{Z} : n \le x\}
Step 2: For x=3.7x = 3.7, the greatest integer ≤3.7\le 3.7 is 33.
⌊3.7⌋=3\lfloor 3.7 \rfloor = 3
Step 3: For x=−1.2x = -1.2, the greatest integer ≤−1.2\le -1.2 is −2-2 (not −1-1, since −1>−1.2-1 > -1.2).
⌊−1.2⌋=−2\lfloor -1.2 \rfloor = -2
Answer: ⌊3.7⌋=3\lfloor 3.7 \rfloor = 3 and ⌊−1.2⌋=−2\lfloor -1.2 \rfloor = -2.

Why It Matters

Staircase functions appear in Riemann integration, where upper and lower sums approximate areas using step functions. They also model real-world situations like postal rates, tax brackets, and digital signals, where values change in discrete jumps rather than continuously.

Common Mistakes

Mistake: Assuming the floor function rounds toward zero for negative inputs (e.g., thinking ⌊−1.2⌋=−1\lfloor -1.2 \rfloor = -1).
Correction: The floor function always rounds down (toward −∞-\infty). For negative numbers, this means moving further from zero: ⌊−1.2⌋=−2\lfloor -1.2 \rfloor = -2.

Related Terms