Some things go up in jumps. 
Some things do not move in a smooth slide. 
Most things in math move in smooth lines. But some things move in jumps. These are called step functions. 
There are different kinds of step functions. One kind is the sign function. It is -1 for negative numbers. It is 1 for positive numbers. Another kind is the Heaviside function. It is 0 for negative numbers. It is 1 for positive numbers.
Most math looks like smooth curves or straight lines. However, some math works in sudden jumps instead. These are called step functions. 
To understand how they work, think about intervals. An interval is just a section of the number line. A step function assigns a specific value to each section. We call these sections disjoint intervals. This means the sections do not overlap each other. When you put all these sections together, they cover the whole number line. 
There are several famous types of step functions. One is the sign function. This function is -1 for negative numbers. It is 1 for positive numbers. Another is the Heaviside step function.
Step functions follow very strict math rules. You can add two step functions together. You can also multiply them together.
You can see these ideas in many places. A discrete random variable uses these ideas too. Its cumulative distribution function is often a step function.
In mathematics, a function on the real numbers can take many different forms. Most functions appear as smooth, flowing curves or steady, straight lines. However, some functions work through sudden, sharp jumps rather than gradual changes. These are known as step functions. 
To understand the mechanism of a step function, we must look at intervals. An interval is a specific section of the real number line. A step function is built by using indicator functions of these intervals. An indicator function simply tells you if a number belongs to a certain interval. To define a step function formally, we use a finite linear combination of these indicator functions. This means we multiply each indicator function by a real number, called a coefficient, and then add them all together. 
There are specific rules for how these intervals must behave. First, the intervals must be pairwise disjoint. This means the intervals cannot overlap one another. Second, the union of all these intervals must cover the entire real line. If the intervals do not cover the whole line, we can select a different set of intervals to make it work. Sometimes, mathematicians require the intervals to be right-open. Other times, they might allow for single points, known as singletons. While this article focuses on a finite number of pieces, some school mathematics allows for an infinite number of pieces. These are called piecewise constant functions.
Several distinct types of step functions are used in mathematics and science. A constant function is the simplest, trivial example. It has only one interval and one value. The sign function is another basic example. It returns a value of -1 for negative numbers and +1 for positive numbers. The Heaviside step function is a very common version of this.
Step functions possess unique mathematical properties that make them easy to manipulate. If you add two step functions together, the result is always another step function. The same is true if you multiply two step functions together. You can also multiply a step function by a real number to get a new step function. Because of these traits, step functions form what is called an algebra over the real numbers. Additionally, a step function can only take on a finite number of distinct values. It cannot represent every possible number on the y-axis.
These functions play a vital role in advanced calculus and probability. The definite integral of a step function results in a piecewise linear function. More importantly, step functions are used to help build the Lebesgue integral. In this context, the integral is calculated by multiplying the function value by the length of its interval. This equality serves as a fundamental first step in constructing the Lebesgue integral. This method is a powerful way to measure areas under curves that are not smooth.
We also see step functions in the study of probability. A discrete random variable is often defined using these concepts. Specifically, its cumulative distribution function is often piecewise constant. This means it looks like a step function locally. However, a global view might show an infinite number of steps. This occurs when a random variable has a countable number of possible values. In such cases, the intervals might accumulate in a finite region, changing the overall shape of the function.
🖼️ Images & Media (3)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.