In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of order theory.
In calculus, a function defined on a subset of the real numbers with real values is called monotonic if and only if it is either entirely non-(increasing or decreasing). That is, as per Fig. 1, a function that increases monotonically does not exclusively have to increase, it simply must not decrease.
A function is called monotonically increasing (also increasing or nondecreasing), if for all and such that one has , so preserves the order (see Figure 1). Likewise, a function is called monotonically decreasing (also decreasing or nonincreasing) if, whenever , then , so it reverses the order (see Figure 2).