Step function

From Wikipedia, the free encyclopedia

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.

Example of a step function with n=4.
Example of a step function with n=4.

Let the following quantities be given:

  • a sequence of coefficients
    \{\alpha_0, \dots, \alpha_n\}\subset \mathbb{R},\; n \in \mathbb{N}  \setminus \{0\}
  • a sequence of interval margins
    \{x_1 < \dots < x_{n-1}\} \subset \mathbb{R}
  • a sequence of intervals
    A_0 := (-\infty, x_1)
    A_i := [x_i, x_{i+1})\, (for i=1,\cdots,n-2)
    A_n := [x_{n-1},\infty)
    (Although the intervals are shown as being closed below and open above, this is not necessary to the definition; all that is required is that the intervals An do not intersect, and that their union is the set of real numbers.)

Definition: Given the notations above, a function f: \mathbb{R} \rightarrow \mathbb{R} is a step function if and only if it can be written as

f(x) = \sum\limits_{i=0}^n \alpha_i \cdot 1_{A_i}(x) for all x \in \mathbb{R} where 1_A\, is the indicator function of A\,:
1_A(x) = \left\{   \begin{matrix}     1, & \mathrm{if} \; x \in A \\      0, & \mathrm{otherwise}.    \end{matrix} \right.

Note: for all i=0,\cdots,n and x \in A_i it holds: f(x)=\alpha_i\,.

[edit] Special step functions

A particular step function, the unit step function or Heaviside step function H(x), is obtained by setting n=1, α0=0, α1=1, and x1=0 in the general expression above. It is the mathematical concept behind some test signals, as those used to determine the step response of a dynamical system.

[edit] See also

In other languages