Signing Off Inequalities

Solving inequalities with twin-signed terms

Last updated 2025 June 27

Inequalities are quite a bit more finicky than plain equations to solve, and are one of the invisible-class S-I+G-N error’s favourite breeding grounds. The source of all this pain is their ability to invert when certain operations are applied to both sides.

You can see this very easily. This is true:

6<96 < 9

If this were an equation, like p=qp = q, we could multiply both sides by 1-1 and the equation would still hold. Do that with the inequality, and…

6<9-6 < -9

Uh oh. That’s not quite right. We need to reverse the relationship here:

6>9-6 extcolor{#4d9dcd}{>} -9

When Do We Invert?

Ah. That’s the question, isn’t it?

From above we can see multiplying by 1-1 is one such operation that reverses the inequality. More generally, multiplying by any negative value will invert an inequality. Doing this with variables, suppose we have a relationship

y>xy > x

If want to multiply through by a negative constant kk, then we’ve got to flip the greater than to a less than.

ky<kx(k<0,kR)ky < kx quad left( k < 0, k in mathbb{R} ight)

Number lines are basic, sure, but they’re actually extremely useful for visualising this intuitively:

Reflecting values in 0

Solving Inequalities Involving Logarithms

I use ln(x)\ln(x) here, but this applies to any base of log(x)\log(x).

It’s all fun and games until you get to ln()\ln(). Here’s a gnarly inequality:

1ln(0.1)<1ln(x) rac{1}{ln(0.1)} < rac{1}{ln(x)}
Try It Yourself

Before you read on, try solving this inequality yourself!

The issue with ln(x)\ln(x) is that it is decidely twin-signed. In fact, it can even be 00. If you’re not familiar, this is what the graph of ln(x)\ln(x) looks like:

y = lnleft(x\right)

Thus whether ln(x)\ln(x) is positive or negative depends on the value of xx. So if we have an inequality

1lnx<1 rac{1}{ln{x}} < 1

We don’t know with certainty the sign of ln(x)\ln(x) unless we know xx. But to solve for xx, we need to know the sign of ln(x)\ln(x). But we need xx for that. Uhh…

Luckily, this isn’t an actual catch 22. The solution is to just separately consider the 2 cases – solve for xx if ln(x)>0\ln(x) > 0, solve xx if ln(x)<0\ln(x) < 0, and then combine the solutions.

So, for the inequality above, consider the case where ln(x)<0\ln(x) < 0.

1ln(0.1)<1ln(x){ln(x)<0} rac{1}{ln(0.1)} < rac{1}{ln(x)} quad left{ ln(x) < 0 ight}

Then multiplying through by ln(x)\ln(x) does require flipping the inequality.

ln(x)ln(0.1)>1 rac{ln(x)}{ln(0.1)} > 1

ln(0.1)\ln(0.1) is also negative, so multiplying through by that flips the inequality again.

ln(x)<ln(0.1)ln(x) < ln(0.1)

Since ln(x)\ln(x) is increasing, ln(p)<ln(q)\ln(p) < \ln(q) if and only if p<qp < q. Hence we can remove the logs to obtain

x<0.1x < 0.1

But wait! Remember that the input to ln(x)\ln(x) should be positive.1 So we also have the added restriction that x>0x > 0. Hence the first half of our solution is

0<x<0.10 < x < 0.1

Then consider the other case where ln(x)>0\ln(x) > 0.

1ln(0.1)<1ln(x){ln(x)>0} rac{1}{ln(0.1)} < rac{1}{ln(x)} quad left{ ln(x) > 0 ight}

Now multiplying through by ln(x)\ln(x) no longer requires flipping the inequality, so the only flip happens from multiplying through by ln(0.1)\ln(0.1).

ln(x)ln(0.1)<1ln(x)>ln(0.1)x>0.1egin{align*} rac{ln(x)}{ln(0.1)} &< 1 \ ln(x) &> ln(0.1) \ x &> 0.1 end{align*}

x>0x > 0 so the input to ln(x)\ln(x) is certainly positive – no domain issues. But remember this half of the solution assumes ln(x)>0\ln(x) > 0, which means x>1x > 1. Hence we need to further restrict our solution space to x>1x > 1, not just x>0.1x > 0.1.

Whew. Overall, merging the 2 solutions we have

0<x<0.11<x0 < x < 0.1 quadcupquad 1 < x

Which, plotted on Desmos, certainly looks quite strange.

rac{1}{lnleft(0.1\right)} < rac{1}{lnleft(x\right)}

Continuous Distribution Functions

Where inequalities reach their worst is solving for mappings between continuous random variables. For instance, given a CRV XX with probability density function

cdfX(x)={ x 1<x<1 0 otherwise ext{cdf}_X (x) = egin{cases} egin{align*} & x & & -1 < x < 1 \ & 0 & & ext{otherwise} end{align*} end{cases}

If Y=X2Y = X^2, then

cdfY(y)=P(Y<y)=P(X2<y)egin{align*} ext{cdf}_Y (y) &= mathbb{P} left( Y lt y ight) \ &= mathbb{P} left( X^2 lt y ight) end{align*}

At this step we pause, because we now need to consider what happens to the direction of the inequality if we make any manipulations.

Closing Remarks

Can I just comment how elegant the name “inequality” is? Like, that’s literally what it is, it’s representing 2 things that are (potentially) unequal, because one’s greater than the other. It seems so obvious, but you kinda just accept “inequality” as yet another maths term.2


  1. JUST IGNORE COMPLEX-VALUED LOGARITHMS OK
  2. Maybe the programming languages using <> to mean != isn’t so crazy after all… nah who am I kidding, stop that deranged behaviour right now 💀