# Is $\sqrt{x^2} = (\sqrt x)^2$? [duplicate]

Take $x=4$ for example:

$\sqrt{(4)^2} = \sqrt{16} = \pm4$

However:
$(\sqrt{4})^2 = \sqrt{\pm2}$
Case 1: $(-2)^2 = 4$
Case 2: $(2)^2 = 4$
Solution : $+4$

How come the $\sqrt{(4)^2} = \pm4$; but $(\sqrt{4})^2 = 4$ ?
What is missing?

• $\sqrt{16}=\color{red}{+}4$. Apr 23 '15 at 19:02
• ...and $\sqrt{(-4)^2} = 4$. Apr 23 '15 at 19:03
• Except perhaps for the ill-format (not using LaTex), there is absolutely no reason to down-vote this question. If you know the answer, then please share your wisdom with the rest of us. If you don't... well... please refrain from taking out your frustration on others!!! Apr 23 '15 at 19:10
• @orangeorange: If $x\ge 0$, then $\sqrt{x^2}=x=|x|$. If $x\lt 0$, then $\sqrt{x^2}=\sqrt{(-x)^2}=-x=|x|$. Hence, $\sqrt{x^2}=|x|$ always holds. Then, $\sqrt{16}=\sqrt{4^2}=|4|=4$. Apr 23 '15 at 19:28
• It's very sad to me that three people downvoted this question. No one commented why. I can't be sure, but I have a feeling some of those downvotes were from people thinking this is a "dumb" question. Very sad. Apr 23 '15 at 20:38

Disclaimer: In the following we restrict ourselves to real numbers, not taking complex numbers and the like into consideration.

By convention, the square root of a positive number $t$, written as $\sqrt t$, has been defined to be the positive solution to the equation $x^2=t$. This gives meaning to the following way of specifying the two solutions (for positive $t$): $$x^2=t\iff x\in\{\sqrt t,-\sqrt t\}$$

With this your example becomes $\sqrt{4^2}=4$ and $(\sqrt 4)^2=4$, but on the other hand we have $\sqrt{(-4)^2}=4$ whereas $(\sqrt{-4})^2$ is undefined, because $\sqrt{-4}$ is undefined, since $x^2=-4$ has no solutions.

In general, $\sqrt{x^2}$ agrees with $(\sqrt x)^2$ for non-negative input $x$, whereas only the first is defined for negative values of $x$.

• That downvote would have been better invested as a comment or suggestions to improve my post. Apr 23 '15 at 19:44
• It is indeed, annoying. There is plenty of legit discussion occurring here. Agreed. Apr 23 '15 at 20:26

In general:

$$\sqrt{x^2}=|x|\implies \sqrt{x^2}=\left(\sqrt{|x|}\right)^2=|x|$$

For your example you miss that $x\mapsto \sqrt{x}$ is a function and thus have only one image, this image is nonnegative.

By the way: a huge difference between the functions $$f(x)=\sqrt{x^2}$$ and $$g(x)=(\sqrt{x})^2$$ is their domain of definiton. While $f$ id defined on $\Bbb R$, $g$ is only defined on $[0,\infty)$. In particular, $f$ is not bijective in opposition to $g$.

$\sqrt{x^2} = \sqrt{x \cdot x} = \sqrt{x} \cdot \sqrt{x} = \sqrt{x}^2$

• $\sqrt{x \cdot x} = \sqrt{x} \cdot \sqrt{x}$ only if $x > 0$, right? Since if $x = -9$, then $\sqrt{-9 \cdot -9} = 9$, but $\sqrt{-9} \cdot \sqrt{-9} = 3^{2}i^{2} = -9$. Apr 23 '15 at 20:34
• You are right, this is only true if x is positive. Apr 23 '15 at 20:43

This holds provided $x\ge 0$. What you see here is the specification of rules. To specify a function fully, you must specify its domain and codomain. $x\mapsto\sqrt{x^2}$ makes sense on $\mathbb{R}$. $x\mapsto\left(\sqrt{x}\right)$ makes sense only for $x\ge 0$. So unless you slice off domain, these functions are inequivalent.

• I am using the "natural domain" convention from mathematics. Apr 23 '15 at 19:07