The IMABS function in Google Sheets is a powerful tool used for mathematical calculations involving complex numbers. It simplifies the process of obtaining the absolute or magnitude of a complex number, returning a real number that represents this magnitude. This function is particularly useful in fields such as engineering, physics, and finance, where complex numbers frequently appear in calculations.
Syntax
IMABS(complex_number)
- complex_number: This is the complex number for which you want to find the absolute value. It can be entered as a text string in the form “a+bi” or “a-bi”, where a is the real part and b is the imaginary part.
Example #1
IMABS("3+4i")
This function calculates the absolute value of the complex number 3+4i. The result would be 5, as the absolute value is determined through the formula √(a² + b²).
Example #2
IMABS("-1-1i")
In this case, the function determines the absolute value of the complex number -1-1i, which would result in approximately 1.4142, as calculated by √((-1)² + (-1)²).
Example #3
IMABS("0+5i")
Here, the absolute value of the complex number 0+5i is computed, yielding a result of 5, since the real part is 0 and only the imaginary part contributes to the magnitude.
Error handling
- VALUE!: This error indicates that the input provided is not a valid complex number format.
- NUM!: This error suggests that the function encountered an invalid numeric result, possibly due to improper input values.
- REF!: This error occurs when the referenced complex number is invalid or does not exist in the specified context.