Why does $\sqrt{x^2}=|x|$? 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.
 A: This convention makes the square root of non-negative numbers a well-defined single valued function.
This is the one and only reason behind this convention.
A: 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.
A similar process exists in the heptagon, where the chords of the heptagon, when cycled through the solutions, give the two stars {7/2} and {7/3}.  
