In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having only finitely many pieces.

An example of step functions (the red graph). In this function, each constant subfunction with a function value
αi (
i = 0, 1, 2, ...) is defined by an interval
Ai and intervals are distinguished by points
xj (
j = 1, 2, ...). This particular step function is
right-continuous.
- n≥0, χAi is the indicator function of Ai can be assumed to have the following two properties:
- The intervals are pairwise disjoint: ⋃i=0nAi=ℝ.
Indeed, if that is not the case to start with, a different set of intervals can be picked for which these assumptions hold. For example, the step function
- A0=ℝ.
- The sign function sgn(x), which is −1 for negative numbers and +1 for positive numbers, and is the simplest non-constant step function.
- The Heaviside function Ai, for x∈Ai.
- The definite integral of a step function is a piecewise linear function.
- The Lebesgue integral of a step function ℓ(A) is the length of the interval
- ↑ "Step Function".
- ↑ "Archived copy". Archived from the original on 2015-09-12. Retrieved 2024-12-16.{{cite web}}: CS1 maint: archived copy as title (link)
- ↑ Weir, Alan J (10 May 1973). "3". Lebesgue integration and measure. Cambridge University Press, 1973. ISBN 0-521-09751-7.
- ↑