<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Step_function</id>
	<title>Step function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Step_function"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Step_function&amp;action=history"/>
	<updated>2026-06-23T00:24:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Step_function&amp;diff=122604&amp;oldid=prev</id>
		<title>192.70.171.11: /* Definition and first consequences */ Clarified indicator function definition.</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Step_function&amp;diff=122604&amp;oldid=prev"/>
		<updated>2025-09-23T14:41:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Definition and first consequences: &lt;/span&gt; Clarified indicator function definition.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Linear combination of indicator functions of real intervals}}&lt;br /&gt;
{{About|a piecewise constant function|the unit step function|Heaviside step function}}&lt;br /&gt;
&lt;br /&gt;
In mathematics, a [[function (mathematics)|function]] on the [[real number]]s is called a &amp;#039;&amp;#039;&amp;#039;step function&amp;#039;&amp;#039;&amp;#039; if it can be written as a [[finite set|finite]] [[linear combination]] of [[indicator function]]s of [[interval (mathematics)|interval]]s. Informally speaking, a step function is a [[piecewise]] [[constant function]] having only finitely many pieces.&lt;br /&gt;
[[Image:StepFunctionExample.png|thumb|right|250px|An example of step functions (the red graph). In this function, each constant subfunction with a function value &amp;#039;&amp;#039;α&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;i&amp;#039;&amp;#039; = 0, 1, 2, ...) is defined by an interval &amp;#039;&amp;#039;A&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; and intervals are distinguished by points &amp;#039;&amp;#039;x&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;j&amp;#039;&amp;#039; = 1, 2, ...). This particular step function is [[Continuous function#Directional and semi-continuity|right-continuous]].]]&lt;br /&gt;
&lt;br /&gt;
==Definition and first consequences==&lt;br /&gt;
A function &amp;lt;math&amp;gt;f\colon \mathbb{R} \rightarrow \mathbb{R}&amp;lt;/math&amp;gt; is called a &amp;#039;&amp;#039;&amp;#039;step function&amp;#039;&amp;#039;&amp;#039; if it can be written as {{Citation needed|date=September 2009}}&lt;br /&gt;
:&amp;lt;math&amp;gt;f(x) = \sum\limits_{i=0}^n \alpha_i \chi_{A_i}(x)&amp;lt;/math&amp;gt;, for all real numbers &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;math&amp;gt;n\ge 0&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\alpha_i&amp;lt;/math&amp;gt; are real numbers, &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; are intervals, and &amp;lt;math&amp;gt;\chi_{A_{i}}&amp;lt;/math&amp;gt; is the [[indicator function]] of &amp;lt;math&amp;gt;A_{i}&amp;lt;/math&amp;gt;:&lt;br /&gt;
:&amp;lt;math&amp;gt;\chi_{A_{i}}(x) = \begin{cases}&lt;br /&gt;
  1 &amp;amp; \text{if } x \in A_{i} \\&lt;br /&gt;
  0 &amp;amp; \text{if } x \notin A_{i} \\&lt;br /&gt;
 \end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this definition, the intervals &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; can be assumed to have the following two properties: &lt;br /&gt;
# The intervals are [[disjoint sets|pairwise disjoint]]: &amp;lt;math&amp;gt;A_i \cap A_j = \emptyset&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;i \neq j&amp;lt;/math&amp;gt;&lt;br /&gt;
# The [[union (set theory)|union]] of the intervals is the entire real line: &amp;lt;math&amp;gt;\bigcup_{i=0}^n A_i = \mathbb R.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
:&amp;lt;math&amp;gt;f = 4 \chi_{[-5, 1)} + 3 \chi_{(0, 6)}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
can be written as&lt;br /&gt;
:&amp;lt;math&amp;gt;f = 0\chi_{(-\infty, -5)} +4 \chi_{[-5, 0]} +7 \chi_{(0, 1)} + 3 \chi_{[1, 6)}+0\chi_{[6, \infty)}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Variations in the definition===&lt;br /&gt;
Sometimes, the intervals are required to be right-open&amp;lt;ref&amp;gt;{{Cite web|url=http://mathworld.wolfram.com/StepFunction.html|title = Step Function}}&amp;lt;/ref&amp;gt; or allowed to be singleton.&amp;lt;ref&amp;gt;{{Cite web|url=http://mathonline.wikidot.com/step-functions|title = Step Functions - Mathonline}}&amp;lt;/ref&amp;gt; The condition that the collection of intervals must be finite is often dropped, especially in school mathematics,&amp;lt;ref&amp;gt;{{Cite web|url=https://www.mathwords.com/s/step_function.htm|title=Mathwords: Step Function}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web | title=Archived copy | url=https://study.com/academy/lesson/step-function-definition-equation-examples.html | archive-url=https://web.archive.org/web/20150912010951/http://study.com:80/academy/lesson/step-function-definition-equation-examples.html | access-date=2024-12-16 | archive-date=2015-09-12}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=https://www.varsitytutors.com/hotmath/hotmath_help/topics/step-function|title = Step Function}}&amp;lt;/ref&amp;gt; though it must still be [[Locally finite collection|locally finite]], resulting in the definition of piecewise constant functions.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
[[Image:Dirac distribution CDF.svg|325px|thumb|The [[Heaviside step function]] is an often-used step function.]]&lt;br /&gt;
* A [[constant function]] is a trivial example of a step function. Then there is only one interval, &amp;lt;math&amp;gt;A_0=\mathbb R.&amp;lt;/math&amp;gt;&lt;br /&gt;
* The [[sign function]] {{math|sgn(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}}, which is −1 for negative numbers and +1 for positive numbers, and is the simplest non-constant step function.&lt;br /&gt;
* The [[Heaviside step function|Heaviside function]] {{math|&amp;#039;&amp;#039;H&amp;#039;&amp;#039;(&amp;#039;&amp;#039;x&amp;#039;&amp;#039;)}}, which is 0 for negative numbers and 1 for positive numbers, is equivalent to the sign function, up to a shift and scale of range (&amp;lt;math&amp;gt;H = (\sgn + 1)/2&amp;lt;/math&amp;gt;). It is the mathematical concept behind some test [[Signal (electronics)|signals]], such as those used to determine the [[step response]] of a [[dynamical system (definition)|dynamical system]].&lt;br /&gt;
[[File:Rectangular function.svg|thumb|The [[rectangular function]], the next simplest step function.]]&lt;br /&gt;
* The [[rectangular function]], the normalized [[boxcar function]], is used to model a unit pulse.&lt;br /&gt;
&lt;br /&gt;
===Non-examples===&lt;br /&gt;
* The [[integer part]] function is not a step function according to the definition of this article, since it has an infinite number of intervals. However, some authors&amp;lt;ref name=bachman_narici_beckenstein&amp;gt;{{Cite book | author=Bachman, Narici, Beckenstein | title=Fourier and Wavelet Analysis | publisher=Springer, New York, 2000 | isbn=0-387-98899-8 | chapter =Example 7.2.2| date=5 April 2002 }}&amp;lt;/ref&amp;gt; also define step functions with an infinite number of intervals.&amp;lt;ref name=bachman_narici_beckenstein /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
* The sum and product of two step functions is again a step function. The product of a step function with a number is also a step function. As such, the step functions form an [[algebra over a field|algebra]] over the real numbers.&lt;br /&gt;
* A step function takes only a finite number of values. If the intervals &amp;lt;math&amp;gt;A_i,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;i=0, 1, \dots, n&amp;lt;/math&amp;gt; in the above definition of the step function are disjoint and their union is the real line, then &amp;lt;math&amp;gt;f(x)=\alpha_i&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;x\in A_i.&amp;lt;/math&amp;gt;&lt;br /&gt;
* The [[definite integral]] of a step function is a [[piecewise linear function]].&lt;br /&gt;
* The [[Lebesgue integral]] of a step function &amp;lt;math&amp;gt;\textstyle f = \sum_{i=0}^n \alpha_i \chi_{A_i}&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\textstyle \int f\,dx = \sum_{i=0}^n \alpha_i \ell(A_i),&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;\ell(A)&amp;lt;/math&amp;gt; is the length of the interval &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and it is assumed here that all intervals &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; have finite length. In fact, this equality (viewed as a definition) can be the first step in constructing the Lebesgue integral.&amp;lt;ref&amp;gt;{{Cite book | author=Weir, Alan J | title=Lebesgue integration and measure | date= 10 May 1973| publisher=Cambridge University Press, 1973 | isbn=0-521-09751-7 |chapter= 3}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* A [[discrete random variable]] is sometimes defined as a [[random variable]] whose [[cumulative distribution function]] is piecewise constant.&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;{{Cite book|title=Introduction to Probability|last=Bertsekas|author-link=Dimitri Bertsekas|first=Dimitri P.|date=2002|publisher=Athena Scientific|others=[[John Tsitsiklis|Tsitsiklis, John N.]], Τσιτσικλής, Γιάννης Ν.|isbn=188652940X|location=Belmont, Mass.|oclc=51441829}}&amp;lt;/ref&amp;gt; In this case, it is locally a step function (globally, it may have an infinite number of steps). Usually however, any random variable with only countably many possible values is called a discrete random variable, in this case their cumulative distribution function is not necessarily locally a step function, as infinitely many intervals can accumulate in a finite region.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Crenel function]]&lt;br /&gt;
* [[Piecewise]]&lt;br /&gt;
* [[Sigmoid function]]&lt;br /&gt;
* [[Simple function]]&lt;br /&gt;
* [[Step detection]]&lt;br /&gt;
* [[Heaviside step function]]&lt;br /&gt;
* [[Piecewise-constant valuation]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Step Function}}&lt;br /&gt;
[[Category:Special functions]]&lt;/div&gt;</summary>
		<author><name>192.70.171.11</name></author>
	</entry>
</feed>