The IMAGINARY function in Google Sheets is a useful tool for mathematical and engineering applications. It specifically extracts the imaginary coefficient from a given complex number, which is crucial in fields that utilize complex numbers for calculations. By isolating the imaginary part, users can analyze and manipulate complex data more effectively.
Syntax
IMAGINARY(value)
- value: A complex number for which the imaginary part is to be extracted. It can be in the form of a text string (e.g., “3 + 4i”) or a complex number result from another function.
Example #1
=IMAGINARY("3 + 4i")
This function call returns the imaginary part of the complex number “3 + 4i”, which is 4.
Example #2
=IMAGINARY(5i)
In this case, the function extracts the imaginary part of the complex number 5i, which results in 5.
Example #3
=IMAGINARY(1 + 2i)
Here, the function takes the complex number 1 + 2i and outputs the imaginary part, yielding 2.
Error handling
- VALUE!: This error occurs when the input is not a valid complex number. For instance,
will return this error as “Hello” is not a complex number.=IMAGINARY("Hello")
- N/A: This error indicates that the referenced data is not available or improperly formatted, which could happen if the input is an empty cell.