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.
I'm suggesting that this type of thinking is going to lead to problems eventually.
– Ian Coley Mar 18 '14 at 10:52