Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

formula for square of absolute value of difference of two variables $|a-b|^{2}$

Writer Matthew Barrera
$\begingroup$

Is there any formula for the expansion of $|a-b|^{2}$ ? Can I expand it in the same way as $(a-b)^{2}$?

$\endgroup$

2 Answers

$\begingroup$

We have $|a-b|^2=(a-b)^2$. No difference! For $|a-b|=a-b$ if $a\ge b$, and $|a-b|=-(a-b)$ if $a\lt b$. Now recall that in general $(-x)^2=x^2$.

Remark: In our answer, we assumed that $a$ and $b$ are real numbers, or variables that range over the reals. In the complex numbers, there is a notion of absolute value, usually called the norm of the complex number. In that setting, the answer becomes more complicated.

$\endgroup$ 2 $\begingroup$

Yes, $$ |a-b|^2=(a-b)^2. $$ The left hand side is just the number $x=|a-b|$ squared, while the right hand side is the number $y=(a-b)$ squared. But $x$ and $y$ differ at most by a sign, i.e. $x=y$ or $x=-y$ and hence if you square them, they are equal.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy