<s>[INST] Square root of negative number I was reading my school's math textbooks for the next semester, and I found that when $a >0,$ $\sqrt{(-a)^2}=a$, but $\sqrt{(-a)^2}=\sqrt{a^2}i^2=-a$. So which one is right? 
 [/INST] 
$a >0,$ $\sqrt{(-a)^2}=a$

This is correct, because $(-a)^2 = (-1)^2 a^2 = a^2$ and $\sqrt{a^2} = a$.

$\sqrt{(-a)^2}=\sqrt{a^2}i^2=-a$

This is not correct, because $\sqrt{(-a)^2} = a$ different from $\sqrt{a^2} i^2 = a (-1) = -a$.
</s>