A gentle introduction to the properties of inequalities.

The goal is to give a basic understanding of the basic properties of inequalities. For more in depth treatment, see the references. We will only consider mathematical integers and reals and not their computer equivalent (integer and floating-point) to not need to consider issues related to overflow and underflow. I’m also going to toss in how these are related to geometric operations. (A change of coordinates doesn’t change the problem). The Wikipedia article was the base template for this. I wanted to say some of the same things but in a different way. This route allow for comparing the two, which might be helpful for some.

For visualization purposes we can think of the values as being points on a number line and the inequality states how they are ordered on that line.

We start with the basic inequalities:

- a < b

- b > a

- a <= b

- b >= a

The first two are called strict inequalities and the second two are non-strict. Note that the values ‘a’ and ‘b’ represent arbitrary expressions. The first says that ‘a’ is to the left of ‘b’ on the line. The second says that ‘b’ is to the right of ‘a’. The second pair allow for touching on the line.

By reading the inequalities above from right-to-left we get the converse property:

- b > a

- a < b

- b >= a

- a <= b

So each pair strict/non-strict are really the same. Where there is no difference in behavior between strict and non-strict, then the non-strict equivalent will be used. Differences will be explicitly stated.

addition/subtraction

If we add or subtract a value from both sides, it’s equivalent to translating the pair and it does not effect the relation. Given: a >= b, then:

- a+c >= b+c

comparing against zero

Since we can subtract a value from both sides, we can convert the inequality into a comparison against zero. Given: a >= b, we can subtract both sides by ‘b’ or subtract both by ‘a’, which respectively yield:

- a-b >= 0

- 0 >= b-a

multiplication/division

The comparing against zero form converts the relation such that its result only depends on the sign of the expression. So if we were to multiply by a positive non-zero value c, then the relation doesn’t change since the sign does not change. Likewise for division by non-zero positive c. Given: a >= 0 and c >= 0, then:

- ac >= 0

- a/c >= 0

If c is negative then the sign flips and requires inverting the inequality. Given: a >= 0 and c < 0, then:

- ac <= 0

- a/c <= 0

Combined with the addition-subtraction property we have:

[tr][td]Given[/td][td][/td][td]multiply[/td][td]divide[/td][/tr]

[tr][td]a >= b[/td][td]c>0[/td][td]ac >= bc[/td][td]a/c >= b/c[/td][/tr]

[tr][td]a >= b[/td][td]c<0[/td][td]ac <= bc[/td][td]a/c <= b/c[/td][/tr]

Note this is equivalent to a scaling of the system.

additive inverse

Given: a >= b, Subtracting by both by the LHS and then by the RHS or by multiplying by -1 we get:

- -a <= -b

This is equivalent to point inversion.

Taking the above results we could list the multiplicative inverse properties, but the main interest here is to reduce the computational complexity of a comparison. These are listed on Wikipedia.

Applying a function to both sides

This is where shit starts to get Real, baby. Using the above properties allow eliminating redundant computations and nuking divisions.

We gotta use a little bit of math-speak, here are some informal definitions:

Interval: we’re going to talk real numbers, so the legal range of values in the inequality. [min,max]

A Monotonic function f(x) is a function that preserves order (Wikipedia, MathWorld).

This implies that the slope (first derivative) of f(x) never changes sign. (wait for it)

If f(x) has the properties: given a<=b then f(a)<=f(b) for all ‘a’ and ‘b’ on the interval, then f(x) preserves order and is monotonically increasing on the interval.

This means that the slope is always positive or zero across the interval. If you scan the graph of f(x) from the low end of the interval (min) to the high end (max) then the ‘y’ value is always greater than or equal all points below the current ‘x’. Or if we were to think of this function as being how some point moves up and down in time (where x represents time), then as time increases the point is either moving up or not moving. It never moves down.

If f(x) has the properties: given a<=b then f(a)>=f(b) for all ‘a’ and ‘b’ on the interval, then f(x) preserves order (reverses it) and is monotonically decreasing on the interval.

So the slope is always negative or zero across the interval. Scanning the graph from low to high…y is always smaller or the same than all to the left. The point in time is always moving down or stationary.

We can apply a monotonically increasing function (on the interval) to both sides of a non-strict inequality without changing the result.

We can apply a monotonically decreasing function (on the interval) to both sides of a non-strict inequality without changing the result if we change to the opposite comparison.

If f(x) has the properties: given a<b then f(a)<f(b) for all ‘a’ and ‘b’ on the interval, then f(x) preserves order and is strictly monotonically increasing on the interval.

If f(x) has the properties: given a<b then f(a)>f(b) for all ‘a’ and ‘b’ on the interval, then f(x) preserves order (reverses it) and is strictly monotonically decreasing on the interval.

These are simply more strict versions of the increasing/decreasing above. They disallow the slope to ever be zero (expect at the end-points of the interval). A strictly increasing function (on the interval) can be applied to both sides of either a strict or non-strict inequality. And likewise for a strictly decreasing function when you change to the opposite comparison.

We can take the properties above and express them as applying a function to both sides:

[tr][td]Property [/td][td]Function[/td][td]Constraints[/td][td]Slope[/td][td]Type[/td][/tr]

[tr][td]addition/subtraction [/td][td]f(x)=x+K[/td][td]none [/td][td]f’(x)= 1 [/td][td]strictly increasing[/td][/tr]

[tr][td]additive inverse [/td][td]f(x)=-x [/td][td]none [/td][td]f’(x)=-1 [/td][td]strictly decreasing[/td][/tr]

[tr][td]multiplication [/td][td]f(x)=Kx [/td][td]K>0 [/td][td]f’(x)=K [/td][td]strictly increasing[/td][/tr]

[tr][td]multiplication [/td][td]f(x)=Kx [/td][td]K<0 [/td][td]f’(x)=K [/td][td]strictly decreasing[/td][/tr]

[tr][td]division [/td][td]f(x)=x/K[/td][td]K>0 [/td][td]f’(x)=1/K[/td][td]strictly increasing[/td][/tr]

[tr][td]division [/td][td]f(x)=x/K[/td][td]K<0 [/td][td]f’(x)=1/K[/td][td]strictly decreasing[/td][/tr]

NOTE: that the properties from the first part of this (including the multiplicative inverse that I blew off) can also be use to transform an expression into a form where we apply a function to both sides. Specifically by changing the interval of the function to where it has one of the properties listed above.

Some example named inequalities

References