The main rule is:
if we divide left and right sides of an inequality by a positive number, the sign of the inequality remains the same one.
if we divide left and right sides of an inequality by a negative number, the sign of the inequality changes.
Therefore, when we divide an inequality by x than can be both positive and negative, we have to consider two possibilities and also be careful with x=0.
Consider an example:
x^2>x
for x>0: x^2/x > x/x --> x>1. Therefore, x e (1,+∞)
for x<0: x^2/x < x/x --> x<1. Therefore, x e (-∞,0)
for x=0: x does not satisfy the inequality.
Join three findings: x e (-∞,0)&(1,+∞)
Consider other example:
x^2<x
for x>0: x^2/x < x/x --> x<1. Therefore, x e (0,1)
for x<0: x^2/x > x/x --> x>1. There is no x that satisfies the inequality.
for x=0: x does not satisfy the inequality.
Join three findings: x e (0,1)