What Is a Monotonic Transformation? Order Explained

A monotonic transformation changes a set of numbers without changing their ranking: whatever was larger stays larger.1University of Valencia. Microeconomics I. Antonio Zabalza What it is free to do is stretch or squeeze the distances between values, so the numbers can look very different afterward. That splits measurement into two camps: things that care only about who is ahead, and things that care about by how much.

Increasing, Decreasing, Strict and Non-Strict

A function is monotonically increasing, also called non-decreasing, if a larger input never gives a smaller output.2Wikipedia. Monotonic function It is monotonically decreasing, or non-increasing, if a larger input never gives a larger output, which reverses the order.2Wikipedia. Monotonic function A monotonic function is one that is entirely one or the other across its whole domain, never switching direction.3Wolfram MathWorld. Monotonic Function

Doubling every number or adding 10 keeps the order, so both are increasing transformations. Taking the logarithm of positive numbers also keeps the order, while shrinking large values more than small ones. Multiplying by minus one reverses the order completely, which makes it a decreasing transformation. Squaring fails on numbers that include negatives: minus 3 and 3 both become 9, and minus 3, which was smaller than 2, now ends up larger.

It helps to picture the graph. An increasing function only ever goes up or stays level as you move right, and a decreasing one only goes down or stays level. A hill or a valley means the function is not monotonic over that range.

That brings in the strict versus non-strict split. A strictly increasing function always gives a bigger output for a bigger input, with no flat stretches.3Wolfram MathWorld. Monotonic Function A non-decreasing function may stay flat, giving two different inputs the same output. In economics the phrase usually means the strict, increasing kind, because only that keeps every ranking exactly.1University of Valencia. Microeconomics I. Antonio Zabalza

Rounding to the nearest whole number keeps order without being strict. The numbers 2.4 and 2.6 land on different values, while 2.6 and 2.9 both become 3. Two items that were clearly separate now look tied. For a rough ranking that may be harmless, but for picking a single winner a tie can leave you unable to decide.

Monotonic does not mean straight-line. Curves like the log qualify; the only requirement is a consistent direction, not even spacing.

Monotonic is also always a claim about a stated range of inputs. A function can be monotonic on positive numbers and fail once negatives are allowed. Checking only a few sample points can mislead, because a dip between two samples would go unnoticed.

Why Order Survives but Distances Don’t

Take incomes of 10, 100 and 1,000 thousand. Their base-10 logs are 1, 2 and 3, now evenly spaced. The ranking is identical before and after, but the huge gap at the top has become the same size as the small one at the bottom.

The median survives an increasing transformation, because the middle value in the ranking is still the middle value afterward. The mean generally does not: the average of the logs of several numbers is not the log of their average. Differences and ratios shift too, so a statement like “twice as large” can be true before and false after. Rankings, minimums and maximums carry over unchanged. Before transforming data, ask whether your question is about order or about amounts.

Every strictly monotonic function can be undone, because each output comes from exactly one input.2Wikipedia. Monotonic function You can recover the original numbers by applying the inverse, as an exponential undoes a log. On an interval, that inverse is itself strictly monotonic and has no sudden jumps.4Texas A&M University. MATH 409 Advanced Calculus I Lecture 26

If a function turns both 2.6 and 2.9 into 3, seeing a 3 gives no way to know which one you started with. That’s why a log can safely be reversed with an exponential to report results in original units, while rounding cannot be reversed.

Monotonic Transformations in Economics and Utility

In ordinal utility, the numbers only rank bundles of goods from more to less preferred.5Wikipedia. Ordinal utility So any increasing transformation of a utility function gives exactly the same indifference curves and the same choices.5Wikipedia. Ordinal utility A utility function is unique only up to an increasing monotonic transformation.5Wikipedia. Ordinal utility The same holds in games: the familiar pure-strategy ideas such as best responses and equilibria stay the same when each player’s payoffs get an increasing transformation.6Journal of Mathematical Economics / Stanford University (Working Paper). Utility Invariance in Non-Cooperative Games

Suppose utility is x times y, for x apples and y oranges. Its square, or its logarithm, ranks every basket in the same order. A shopper choosing the best affordable basket picks the same one under all three.

A shopper facing a budget picks the affordable basket ranked highest, and a transformation leaves every basket’s position unchanged, so the purchase is the same. The indifference curves, which join baskets the shopper ranks equally, also stay in exactly the same places. Only the labels differ, such as a curve called 12 becoming one called 144 after squaring. Economists often take logs to turn products into sums, which simplifies the maths without changing behaviour.

Under utility as a ranking, a basket with utility 8 versus one with 4 only tells you the first is preferred, not that it is twice as good. The same preferences could be written with 8 and 4, or with 64 and 16, or with 8 and 7, so any claim about ratios rests on an arbitrary choice. Comparisons of gap size, such as “moving from A to B helps more than from B to C,” aren’t meaningful here either, which is why “twice as happy” says nothing.

The limits show up when you add utilities across people, since transformations change the totals. Questions about how much better, rather than which is better, need cardinal measures.

Monotonic Transformations in Statistics

Spearman’s rho, a correlation computed on ranks, gives the same value on raw data and on log-transformed data.7CASRAI. Monotonic Relationships in Statistics Pearson’s r, the ordinary correlation, can change, sometimes substantially, because spacing changes.7CASRAI. Monotonic Relationships in Statistics A common rank-based test for comparing two groups likewise gives the same result after a monotonic transformation.8PubMed. When is the Wilcoxon-Mann-Whitney procedure a test of location? Implications for effect-size measures

The reason is that rank correlation first replaces each value with its position in the sorted list, and an order-keeping transformation leaves those positions the same. Ordinary correlation uses the actual values, so squeezing the large ones changes how far each point sits from the average. A single extreme point can create a strong ordinary correlation by itself, and taking logs can pull that point in and weaken the result. The rank version is the steadier choice when a few extremes might be driving the picture.

If one measure always rises as the other rises, but along a curve that bends sharply upward, rank correlation would report a perfect relationship, since every rise in one comes with a rise in the other. Ordinary correlation would report something clearly below perfect, since the points don’t sit on a straight line. Plotting the data first shows which situation you’re in. Use rank correlation when you care whether two things rise together at all, and ordinary correlation when the straight-line relationship itself matters.

Transformations are also applied on purpose. A log transformation is commonly used to reduce skew in data with a long tail of large values.9MetricGate. Log Transformations for Skewed Data10GeeksforGeeks. Variance Stabilizing Transformation When spread grows in proportion to the average, the log is the transformation that evens the spread out.11Wikipedia. Variance-stabilizing transformation Power transforms, such as square roots, are a broader family of monotonic transformations used the same way.12Wikipedia. Power transform

In a histogram of incomes, a few huge values stretch the axis far to the right. After taking logs, those values sit closer to the rest and the bulk of the data spreads into a readable shape. Results must then be read on the log scale, where equal steps mean equal percentage changes rather than equal dollar amounts.

Signs that data might need a log include values spanning several orders of magnitude, like incomes or city sizes, and a few huge values dominating charts. The log only works on positive numbers, so zeros need handling first.

Monotonic Transformations in Machine Learning

Tree-based models are widely treated as unaffected by monotonic transformations, so practitioners often skip scaling features.13PubMed Central. Prediction of factors contributing to Pain Intensity among low back pain patients: A comparative machine learning frameworks (Random Forest versus XGBoost) A tree only asks whether a value is above or below a split point, which is a question of order.

Only the ordering of the training values decides which rows end up on each side of a split. The sorted order is identical after an increasing transformation, so the tree finds the same groupings and the same structure.

The exception is that predictions can differ for new values not seen in training that fall near a split point.14arXiv. Splitting matters: how monotone transformation of predictor variables may improve the predictions of decision tree models The split sits somewhere between two training values, and exactly where depends on the scale used. Suppose the training data has 10 and 100 next to each other and the tree splits between them. On the raw scale, halfway sits at 55, while after logging, halfway sits near 31.6 in original units. A new value of 40 would fall on the left side in one version and the right in the other. The effect is small when training data is dense, but it can matter when new data lands in sparse regions.

Other models do care. Linear regression and neural networks use distances and sums, so scaling changes them.

How to Check Whether a Function Is Monotonic

For a differentiable function, the derivative gives the slope at each point, and the sign of that slope tells you whether the function is rising or falling there. A differentiable function is non-decreasing on an interval exactly when its slope is never negative there.15Bhanzu. Monotonic Functions: Increasing And Decreasing A slope that is always positive guarantees strict increase.16Wikipedia. Derivative test Strict increase can also happen with a slope that touches zero at isolated points, as with x cubed at zero.15Bhanzu. Monotonic Functions: Increasing And Decreasing

Step by step: find the derivative, then see where it could be negative across your range. If it never is, the function is non-decreasing there. For x cubed, the slope is 3 times x squared, which is never negative, so the function is non-decreasing everywhere. If the slope is positive in some places and negative in others, the function changes direction. A slope of zero over a whole stretch means the function is flat there, which rules out strictness. For a plain list of numbers, just check that each value is no smaller than the one before. Composing two increasing functions gives another increasing one, a handy shortcut.

With noisy data, order can be forced instead. A method called isotonic regression fits the closest non-decreasing sequence of values to the data.17SciPy Documentation. isotonic_regression It’s useful when you know a relationship should only go up but measurements wobble. Its standard method merges neighbouring points that break the order, and the result has the smallest possible squared error.18PubMed Central. Isotonic Regression under Lipschitz Constraint