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 half-open intervals. Informally speaking, a step function is a piecewise constant function having only finitely many pieces.