# Square divided by absolute value

First time posting on Math SE, with kind of a basic algebra question.

Question
Does the relation:

$$\dfrac{(ab)^2}{|ab|} = \left|ab\right|$$

with $a,b \in \mathbb{R_{\ne 0}}$ always hold?

It seems trivial to me, but Wolfram Alpha gives me a strange answer because it specifies that this is True assuming $a,b$ are positive.

Reasoning
No matter what sign $a,b$ have, we have that $(ab)^2 > 0$ and $\left|ab\right| > 0$. Thus their ratio is greater than zero, and the magnitude of that ratio is exactly $ab$ with a positive sign, so $\left|ab\right|$.

Is what I said correct? If so, is this question a completely useless one? Sorry for the occasionally bad English!

Edit: formatted equations as suggested by Frentos

• Hmmn, wlog for $a, b \in \mathbb{C}$ one could argue that $a^{2}b^{2} < 0$ – Kevin Jan 20 '16 at 11:28
• Welcome to math.SE! See this guide for how to write equations on this site. \dfrac makes larger, easier to read fractions and \left| \right| gives nicer absolute values. – Frentos Jan 20 '16 at 11:32
• @Bacon No, try $a=b=i$ (or any case when $a^2b^2$ is not even real). – Did Jan 21 '16 at 1:45
• @Did - fair point, my comment meant to reflect that in some cases this could be true – Kevin Jan 21 '16 at 9:20

Your statement about Wolfram is not quite correct. It gives various alternate forms for this expression, two of which are:

1. $ab$ assuming $a$ and $b$ are positive

2. $ab\,sgn(a)\,sgn(b)$

(2) is equivalent to $|ab|$

See here

• Indeed, I overlooked the $ab \; sgn(a) \; sgn(b)$ answer! I'll accept this one because it points out that Wolfram was right. – UJIN Jan 20 '16 at 14:30

For real numbers this is always true because the square of a real number equals the square of its absolute value, and in particular $(ab)^2=|ab|^2.$ Perhaps Wolfram has reservations because it considers the possibility of complex numbers?

Notice:

• If $a,b\in\mathbb{R^+}$, so $a,b>0$, then:

$$|ab|=|a||b|=ab$$

• If $a,b\in\mathbb{R^+}$, so $a,b>0$, so:

$$(ab)^2=a^2b^2$$

• If $a,b\in\mathbb{R^-}$, than $a,b<0$, so:

$$((-a)(-b))^2=(ab)^2=a^2b^2$$