We seek \(c,d\in \R\) such that the complex number \(z=c+id\) satisfies \(z^2=a+0i\text{.}\) Since
\begin{equation*}
z^2=(c^2-d^2)+i(2cd)\text{,}
\end{equation*}
\begin{align*}
c^2-d^2 \amp = a \\
2cd \amp = 0\text{.}
\end{align*}
We now endeavor to solve the (quadratic) system of equations above. We proceed in cases with respect to whether \(a\) is zero, positive or negative. Note first that in all cases, the second equation is true if and only if \(c=0\) or \(d=0\text{.}\)
Case: \(a=0\text{.}\) In this case, it is clear that the only solution to the system above is \(c=d=0\text{.}\) Thus \(z=0=0+0i\) is the only complex square-root of \(0\text{.}\)
Case: \(a> 0\text{.}\) If \(c=0\) (to satisfy the second equation), then \(z^2=a\) if and only if \(-d^2=a\text{,}\) which is impossible since \(a> 0\) and \(-d^2\leq 0\text{.}\) Thus we must have \(d=0\text{,}\) in which case \(c^2=a\) implies \(c=\pm \sqrt{a}\text{.}\) (Note that \(\sqrt{a}\text{,}\) the positive square-root of \(a\text{,}\) exists, since \(a\) is positive.) It follows that \(a\) has exactly two square-roots in this case: \(\sqrt{a}=\sqrt{a}+0i\) and \(-\sqrt{a}=-\sqrt{a}+0i\text{.}\)
Case: \(a< 0\text{.}\) In this case we cannot have \(d=0\text{,}\) since the first equation would imply \(c^2=a\text{,}\) which is impossible since \(a\) is negative. Setting \(c=0\text{,}\) we then see that \(-d^2=a\) or \(d=\pm\sqrt{-a}\text{.}\) (Again, note that \(\sqrt{-a}\) is a well-defined real number since \(-a\) is positive.) We conclude in this case that \(a\) has exactly two square-roots: \(\sqrt{-a}\, i\) and \(-\sqrt{-a}\, i\text{.}\)
We can summarize our analysis above as follows: any \(a\in \R\) has a complex square-root \(z\text{,}\) and in fact we have
\begin{equation*}
z=\begin{cases}
\pm \sqrt{\abs{a}} \amp \text{if } a\geq 0 \\
\pm \sqrt{\abs{a}}\, i \amp \text{if } a< 0
\end{cases}\text{.}
\end{equation*}
Here we have used the fact that
\begin{equation*}
\abs{a}=\begin{cases}
a \amp a\geq 0\\
-a \amp a< 0
\end{cases}\text{.}
\end{equation*}