The IMAGINARY function in Google Sheets is **a mathematical function that returns the imaginary coefficient of a given complex number.**

Complex numbers are composed of real and imaginary coefficients in the form a+bi. With the IMAGINARY function, we’ll be able to find out the value of b.

##### Table of Contents

The rules for using the `IMAGINARY`

function in Google Sheets are as follows:

- The function requires a complex number in the a+bi or a+bj format
- The function then returns the imaginary coefficient of the given complex number

Let’s take a look at a quick example of when we can use this function.

In this quick example, we have a list of complex numbers that we would like to plot. In mathematics, the real and imaginary coefficients can be used to graph points on a complex plane. The real coefficient corresponds to a position in the x-axis, and the imaginary coefficient represents the y-axis.

To perform computations on these complex numbers is difficult since these values are treated as text by Google Sheets. With the `IMAGINARY`

function, we can easily retrieve the imaginary coefficient, which can now be used for computation or plotting purposes. Later, we’ll show an example of this in action.

The `IMAGINARY`

function has a complementary function `IMREAL`

, which returns the real coefficient of a complex number. Together, we can later find the x and y coordinates of all our points.

Now that we know when to use the `IMAGINARY`

function, let’s dive into how to actually write the formula and later work on actual complex numbers in a worksheet.

**The Anatomy of the IMAGINARY Function**

So the syntax (the way we write) the `IMAGINARY`

function is as follows:

=IMAGINARY(complex_number)

Let’s dissect this thing and understand what each of these terms means:

**=**the equal sign is how we start any function in Google Sheets.**IMAGINARY()**is our`IMAGINARY`

function. It returns the imaginary coefficient of a given complex number.**complex_number**is the complex number we would like to retrieve the imaginary coefficient from. It comes in the a+bi or a+bj format.- It is possible for complex numbers to not have an imaginary coefficient. For example,
`=IMAGINARY(“9”)`

will return a 0.

**A Real Example of Using IMAGINARY Function**

This section will look at an example of the `IMAGINARY`

function being used in a Google Sheet spreadsheet.

In the table below, we have a table of complex numbers and their coefficients.

To get the values in cell **C2**, we just need to use the following formula:

=IMAGINARY(A2)

Using this mathematical function allows us to get useful data from our list of complex numbers.

You can make a copy of the spreadsheet above using the link I have attached below.

Below we have another example of how we can use the `IMAGINARY`

function.

In column B, we use the IMAGINARY function to double the imaginary coefficient of the complex numbers in column A. The formula also uses the IMREAL and COMPLEX functions as well to achieve the final result.

If you’re ready to try out the IMAGINARY function in Google Sheets, let’s begin writing it ourselves!

**How to Use IMAGINARY Function in Google Sheets**

- In this example, we have a table where the complex number and real coefficient are already provided. We just need to fill out the imaginary coefficients in Column C.

To start using the`IMAGINARY`

function, select the cell we will first put our function’s output in. In this example, we’ll start with cell**C2.**

- Next, we just simply type the equal sign ‘
**=**‘ to begin the function, followed by ‘**IMAGINARY(**‘. - As seen below, a tooltip box appears with info on the
`IMAGINARY`

function. We can click on the arrow on the top-right-hand corner of the box to minimize it if necessary.

- The next step is to type in our complex number, which we can do by referencing cell
**A2.**

Afterward, simply hit**Enter**on your keyboard to let the function evaluate. - We can see that the formula works as intended! Drag down the formula to fill out the rest of the table.

That’s all you need to know about the `IMAGINARY`

function in Google Sheets. This step-by-step guide shows how simple it is to work with complex numbers in Google Sheets.

You can now use the `IMAGINARY`

function in Google Sheets together with the various other Google Sheets formulas available to build more complex and useful formulas for your worksheet.

Make sure to subscribe to our newsletter to be the first to know about the latest guides and tutorials from us!