<s>[INST] What are the differences between: $\sqrt{(-3)^2}$, $\sqrt{-3^2}$ and $(\sqrt{-3})^2$. First, is $\sqrt{-3}$ is equal to $-3$ or is it imaginary?
What is the difference between:


*

*$\sqrt{(-3)^2}$

*$\sqrt{-3^2}$

*$(\sqrt{-3})^2$


Can I write $(\sqrt{-3})^2  = -3$?
And, given the rule that $\sqrt{a^n}$ is equal to ($\sqrt{a})^n$, can I say that $\sqrt{-3^2}=-3$?
 [/INST] $\sqrt{(-3)^2}=\sqrt{9}=3$,
$\sqrt{-3^2}=\sqrt{-9}=\pm 3i$,
$(\sqrt{-3})^2=(\sqrt{-1}\sqrt{3})^2=(\pm i\sqrt{3})^2=-3$,
$\sqrt{a^n}=(\sqrt{a})^n $ iff $ a\geq 0$,
</s>