Purpose
Return value
Syntax
=IMSQRT(complex_num)
- complex_num - The complex number in the form "x+yi".
How to use
The Excel IMSQRT function returns the square root of a complex number. For example, given "-1" the function returns "6.12323E-17 + i" as output.
=IMSQRT(COMPLEX(-1,0)) // returns 6.12323E-17 + i
Due to floating-point precision, the function returns a very small value for the real part of the output when, in reality, the output should just be "i".
Explanation
Taking a complex number's square root is the same as raising the complex number to 1/2 power.
In Excel, we can write a formula that is equivalent to the complex square root function like this, where z is a complex number.
=IMPOWER(z,COMPLEX(1/2,0)) // equivalent to IMSQRT(z)
The complex square root is defined by writing the complex number in its polar form and taking the square root of both sides.
After simplifying, we get the expression equal to this formula in Excel, where "z" is a complex number.
=IMPRODUCT(
COMPLEX(SQRT(IMABS(z)), 0),
IMEXP(COMPLEX(0, IMARGUMENT(z)/2)))
) // equivalent to IMSQRT(z)
The real part of the function's output plotted over the complex plane looks like this.
The imaginary part of the function's output plotted over the complex plane looks like this.