How to Use IMARGUMENT Function in Google Sheets

You can use the IMARGUMENT function in Google Sheets when you need to know the angle or theta of a given complex number.

The angle of a complex number is also known as the argument or theta and is measured in radians. Knowing the theta of complex numbers is essential when using complex numbers in polar form.

The rules for using the IMARGUMENT function in Google Sheets are as follows:

  • The function requires a complex number as an argument.
  • This function then outputs the angle of the complex number.
  • IMARGUMENT outputs an error if the provided number is not a valid complex number or is equal to 0.

Let’s begin with a quick example of when we can use this function.

In mathematics, complex numbers can be represented as a point in a plane. The form a+bi is called the rectangular coordinate form of a complex number. These points can alternatively be written out in a polar form: r(cosθ+isinθ).

As seen in the image below, the polar form can be derived from the rectangular form by using trigonometric functions. Luckily, Google Sheets already provides us with an easy way to compute these values.
A diagram of how we base the theta of a complex number

With the IMARGUMENT function, we can easily get the angle or θ of a certain complex number, and later use it for computations involving polar coordinates.

Let’s learn how to write the IMARGUMENT function ourselves in Google Sheets and later test out the function with actual date values.

 

 

The Anatomy of the IMARGUMENT Function

So the syntax (the way we write) the IMARGUMENT function is as follows:

=IMARGUMENT(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.
  • IMARGUMENT() is our IMARGUMENT function. It computes the angle of the complex number.
  • number refers to the complex number. It can be represented as a real number (e.g., “5”) or as an equation in the form a+bi (e.g., “2+3i”). 
  • Additionally, we can also use the result of the COMPLEX function which returns a complex number string from its arguments. For example, IMARGUMENT(=COMPLEX(2,4,"i")) is a valid formula.

 

 

A Real Example of Using IMARGUMENT Function

Let’s look into an example of the IMARGUMENT function being used in a Google Sheet spreadsheet.

As seen in the sample worksheet below, we have a table that converts complex numbers from their rectangular coordinate form to their polar coordinate form.
Using the IMARGUMENT function in Google Sheets to get the argument of a complex number

In Column B, we use IMARGUMENT to find the theta of the complex numbers found in Column A. Column C uses another function called IMABS to get the absolute value of r of the given complex number. Afterward, we format the results of column B and C with the CONCATENATE function to get the actual polar form.

You can explore the formulas used by making a copy of the spreadsheet above using the link below.

If you’re ready to try out the IMARGUMENT function in Google Sheets, let’s try writing it on your own.

 

 

How to Use IMARGUMENT Function in Google Sheets

  1. In order to begin using the IMARGUMENT function, select the cell that we will first put our function’s output.
    For this particular example, we’ll start with cell B2 and later reuse our formula to fill out the rest of Column B.
    Let's use the IMARGUMENT function in Google Sheets to fill out Column B

  2. In the Formula Bar, we just simply type the equal sign ‘=‘ to begin the function, followed by ‘IMARGUMENT(‘. 
  3. As seen below, a tooltip box may appear with info on the IMARGUMENT function. We can click on the arrow on the top-right-hand corner of the box to minimize it if necessary.
    Add the IMARGUMENT function into our Formula Bar
     
     
  4. Next, we need to select cell A2 as our argument since that is where our first complex number is placed. Afterward, simply hit Enter on your keyboard to let the function evaluate.
    Now we know that the angle of 5+2i is 0.38 radians.
    The IMARGUMENT function outputs the result in cell B2
     
  5. Finally, we can drag down the formula to fill out the rest of the column. Now we have converted all our complex numbers into their polar forms!
    Drag down the IMARGUMENT function in Google Sheets to fill up the rest of the column

This step-by-step guide shows how easy it is to use the IMARGUMENT function in Google Sheets. Now you know how useful it is when we need to work with complex numbers in the polar form.

You can now use the IMARGUMENT functions in Google Sheets together with the many other Google Sheets functions available to make great spreadsheets that are easy to use.

Stay notified of new Google Sheets guides like this by subscribing to our newsletter!

Get emails from us about Google Sheets.

Our goal this year is to create lots of rich, bite-sized tutorials for Google Sheets users like you. If you liked this one, you'll love what we are working on! Readers receive ✨ early access ✨ to new content.

 

0 Shares:
Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like