# Modulus and square root

How is this statement true? "For any real number $x$ we have $\sqrt{x^2} = |x|$"? Because putting $x=2$ $\sqrt{x^2}$ gives BOTH $2$ and $-2$ But $|x|$ only gives $2$

• Indeed $\sqrt{x^2}=|x|$,can be confuse as you said.... As convention, the square root function is only the positive part, so the statement is true. – Brethlosze Sep 18 '17 at 10:21
• Do you mean that by convention, √4 is only 2 and not -2? – user167573 Sep 18 '17 at 10:27
• Square root a number always gives a positive answer. – abc... Sep 18 '17 at 10:27
• By convention, the square root function always gives a positive number, though both signs are valid. Hence $\sqrt{x}>0$ always. – Brethlosze Sep 18 '17 at 10:31
• Your assertion that $\sqrt{4} = \pm 2$ is false. If $x$ is a real number, the notation $\sqrt{x}$ means the principal (nonnegative) square root of $x$. Also, see this related question. – N. F. Taussig Sep 18 '17 at 12:09

Remember that by definition and for $x \in \mathbb{R}$ $$|x| = \begin{cases} x, & \mbox{if } x \ge 0 \\ -x, & \mbox{if } x < 0. \end{cases}$$
Let a number $n \in \mathbb{R}$, Then
$$\sqrt{n} \geq 0.$$
• What if $n \in \mathbb{C}$? – Kevin Sep 18 '17 at 10:39
• Type \geq in math mode to obtain $\geq$. For $\leq$, type \leq in math mode. Here is a tutorial on how to typeset mathematics on this site. – N. F. Taussig Sep 18 '17 at 12:04
• Adding to what @N.F.Taussig said, you can also type \ge or \le to generate the same, respectively. Or, for a more traditional approach, type \geqslant or \leqslant to generate $\geqslant$ or $\leqslant$. – Mr Pie May 10 '18 at 2:25