I stumbled across this thread and just wanted to post some additional info for students who are still scratching their heads wondering why sqrt(x^2)=|x| It's not just some random convention, in fact there is a very simple and logical explanation for why it's this way! So instead of simply memorizing that "formula" sqrt(x^2)=|x|, try to understand the reasoning behind it, then you will remember it always!
Let's consider our square root function f(x)=sqrt(x) and for a specific example we'll consider f(16)=sqrt(16)
So what are we looking for? The key word in the above sentence is "function". Let's quickly review the details of functions. As we all know, if you give an "input" to a function, it can give you only one output. So whatever value we plug in for x, the value that goes under the square root sign, we are looking for its output. So what is the output for this function? Ponder this question for a moment and you will see where the confusion typically arises. The typical student sees f(x)=sqrt(16) and they think "This is telling me to find the numbers so that when I square them it will give me 16! Oh, ok, both 4 and -4 do that!" While it's true that both 4 and -4 when squared give us 16 (these are called the roots of 16), the issue is that's not what the function f(x)=sqrt(x) is asking for. Remember: for a function, one input means one single output. Because of this, the output for the square root function is defined as the principle root, or the "positive root". If we got all the roots (4, -4) for that one input (16) it would no longer be considered a function so we have to "pick" one to define the square root function, and the simplest most obvious pick is the principle root, or positive root.
So I hope that makes sense and hopefully someone might read that far and now understand why it is the way it is. Remember, there's always a logical explanation when it comes to mathematics! (that's what makes it such a lovely subject). If you ever find yourself scratching your head in confusion, just dig a little deeper!