Why is the square root of a negative number impossible? What is the algorithm to get the square root of a number?
Why does it not accept / allow for negative numbers?

I've always been told that the square root of minus one does not exist by my maths teacher, but I don't really get why?
JChau asked in a separate question if it's ever possible for the square root of a number to be negative, and another user moved for that to be closed as a duplicate of this one. It has since been deleted, but here is my answer to that other question, which is also pertinent here.



We say $x$ is a "square root" of $y$ if $x^2=y$. Thus, both $+7$ and $-7$ are square roots of $49$.

However for positive reals $x$, by definition the square root function applied to $x$ yields the positive square root. Often one will abbreviate "the square root function applied to $x$" or equivalently "the positive square root of $x$" as simply "the square root of $x$," if no confusion should arise. Therefore we have $\sqrt{49}=+7$, despite $-7$ also being a square root. 

The square root function, like all bona fide functions, is single-valued rather than multi-valued, so if we were tasked with creating our own square root function from scratch we would have to make a choice between the two square roots of every positive number as the value the function takes; if we want to further impose continuity (and, subsequently, smoothness for $x&gt;0$), we would end up having to set $\sqrt{x}$ to either always be the positive square root or always the negative square root. At this point it's an understandable choice to make it always the positive one.

The same kind of "having to make a choice" situation arises if one wants to define a square root function for complex numbers. We can no long impose the same kind of continuity conditions and get a straight answer - instead we have to form a sort of "barricade" in which the value of the square root jumps dramatically when we cross over this barricade. This is known as a branch cut.

The standard branch in $\Bbb C$ is where we consider the negative real axis as part of the quadrant above it but not part of the quadrant below it. In this setting, complex numbers when written in polar coordinates will have a phase (angle) in the interval $(-\pi,\pi]$ (note if you cross over the negative real axis, the phase will jump from one side of this interval to the other).

The standard branch normally comes up in the discussion of the logarithm, but it is connected to taking powers with complex numbers because $z^w:=\exp(w\ln z)$ for complex $w,z\in\Bbb C$ ($z\ne0$). The logarithm will be defined by $\ln (re^{i\theta})=(\ln r)+i\theta$, so the imaginary part of a logarithm will depend on which branch we have chosen. The default choice, usually unspoken, is the standard branch.

Using the standard branch, we have $\sqrt{re^{i\theta}}=\exp(\frac{1}{2}(\ln r+i\theta))=e^{\frac{1}{2}\ln r}e^{i\theta/2}=\sqrt{r}e^{i\theta/2}$. Thus the phase of $\sqrt{z}$ will be in $(-\pi/2,\pi/2]$ for all $z\in\Bbb Z\setminus0$. This precludes $\sqrt{z}$ from ever being a negative real number, or even to the left of the imaginary axis. However, other nonstandard choices of branch cuts can lead to $z^{1/2}$ taking values on the negative real axis.

Another word for $\ln$ and $\sqrt{}$ with the standard branch is the principal value.

The idea of branch cuts leads into more advanced complex analysis topics of monodromy (which pertains to "running around" a singularity, like crossing over the branch mentioned earlier) and also Riemann surfaces, which can be thought of as what we get when we refuse to cut the plane into branches and instead consider a function multi-valued and look at its graph (I am probably butchering that description though).
It is impossible to find the square root of negative one, or the square root of any negative number, because no number times itself can equal a negative number. For instance, if I try to find the square root of negative one, I start by attempting to multiply -1*-1, but that would give a solution of one, since a negative times a negative equals a positive. The next step is to multiply 1*-1 or -1*1, but while those equations do come up with an answer of one, 1 and -1 are not the same number; they just have the same absolute value, but if you try to multiply the absolute values, you will get positive one because positive*positive=positive. Same goes for -2,-3,-4,-5,-6, and every negative number. However, the square root of negative numbers is used in scientific and advanced mathematical calculations as represented by the letter i, which basically means "imaginary number" because it does not exist, however, how scientists could use i in calculations pertaining to the real world is puzzling, because i does not exist.