In mathematics, a function on the real numbers is called step function if it can be written as a finite linear combination of indicator functions of half-open intervals. Informally speaking, a step function is a piecewise constant function having only finitely many pieces.
Example of a step function with n=4.
Let the following quantities be given:
- a sequence of coefficients
- a sequence of interval margins

- a sequence of intervals

(for
)

Definition: Given the notations above, a function
is a step function if and only if it can be written as
for all
.
where
is the indicator function of
:

Note: for all
and
it holds:
Special step functions
See also