Why does $\sqrt{x^2}=|x|$? [duplicate]

By convention, we say that: $$\sqrt{x^2}=|x|$$ In fact, the above statement is how we define absolute value.

We would not write $\sqrt{4}=-2$. Although logically it is correct, by convention it is wrong. You have to say $\sqrt{4}=2$ unless the question specifically asks for negative numbers like this: $$-\sqrt{4}=-2$$ Why is this? I suspect it is because back then, square roots were used to calculate distances (e.g. with Pythagoras' theorem) and distances must be positive. Am I correct? Any other reasons why we only define square roots to be positive?

Edit: This entire topic is confusing for me because for example, when you are finding the roots of the function $f(x)=x^2-4$, you would set $f(x)=0$, so now the equation is $0=x^2-4$. This means that $x^2=4$, so $x=\pm\sqrt{4}=\pm 2$. Therefore the roots are $2, \ -2$. But normally we cannot say that $\sqrt{4}=\pm 2$. Hope this clarifies things a bit.

marked as duplicate by apnorton, user63181, vonbrand, Etienne, TZakrevskiyMar 18 '14 at 19:12

• $f(x) = \sqrt{x}$ is a function, but $f(x) = \pm \sqrt{x}$ is not – Jesse Madnick Mar 18 '14 at 7:18
• because $x^2$ is many one. we need to take either the positive or negative value to define an inverse function. The reason for positive is primarily that the positive value is the useful one for most "practical" cases. – Guy Mar 18 '14 at 7:20
• How would you define $\sqrt{4}$? It doesn't make sense to say it's equal to $2$ and also equal to $-2$ at the same time. You could try to define it to be equal to the set $\{2, -2 \}$, but then $\sqrt{4}$ is a set rather than a number, which seems weird. – littleO Mar 18 '14 at 7:20
• @IanColey: That's completely off-topic... – Najib Idrissi Mar 18 '14 at 10:35
• "In fact, the above statement is how we define absolute value." I'm suggesting that this type of thinking is going to lead to problems eventually. – Ian Coley Mar 18 '14 at 10:52

The equation $x^2 = n$ has solutions of $x$ and $-x$. But for convention, the reverse form $\sqrt{x}$ is taken only as the one nearest +1. This is because one needs to ensure that the same root of the first equation is being used throughout a structure. For example, if one wrote that a chord of an octagon is $1+\sqrt{2}$ then one typically does not want -0.414.. but +2.414..
There is a kind of conjucation that is used in geometry, that cycles through the roots of equations, and these rely on the solutions being a matched set. So for example, putting $a+b\sqrt 2$ by $a-b\sqrt 2$ will convert octagons into octagrams, and vice versa. This applies in the higher dimensions as well, as a kind of isomorph.