How to Use IMLN Function in Google Sheets

This guide will discuss how to use the IMLN function in Google Sheets.

When we need to return the natural logarithm of a complex number, we can easily do this using the IMLN function in Google Sheets.

The rules for using the IMLN function in Google Sheets are the following:

  • The natural logarithm of a complex number is defined as ln(x+yi) = √(x2+y2) + i tan-1(y/x).
  • The IMLN function only returns natural logarithms with base e, Euler’s number which has a base of 2.71828. 
  • The value in the number argument can be written as plain numbers to be interpreted as real numbers.
  • The value in the number argument can be written as quoted text in order to specify both the real and complex coefficients. 
  • The IMLN function is equivalent to the LN function for all non-complex values that are greater than zero.
  • Additionally, the IMLN function is equivalent to the LOG function given base of e, or EXP(1), for all non-complex values that are greater than zero. 

Google Sheets provides several built-in functions that let us accurately perform difficult tasks. Some of the functions we can use to easily work with complex numbers are the IMTANH function, the IMTAN function, and the COMPLEX function.

Adding to that is the IMLN function, which is a powerful tool that allows us to calculate the natural logarithm with base e (Euler’s number) of a complex number.

The natural logarithm of a complex number is defined as the logarithm of its magnitude (absolute value) plus the angle of its complex argument, expressed in radians. 

In this guide, we will provide a step-by-step tutorial on how to use the IMLN function in Google Sheets. Additionally, we will explore the syntax and a real example of using the function.

Great! Let’s dive right in.

The Anatomy of the IMLN Function

The syntax or the way we write the IMLN function is as follows:

=IMLN(number)

  • = the equal sign is how we start any function in Google Sheets.
  • IMLN() refers to our IMLN function. This function is used to return the natural logarithm of a complex number, base e (Euler’s number).
  • number is the only required argument. This refers to the complex number for which we want to calculate the natural logarithm. This can be a direct value enclosed in quotation marks, a cell reference, or a formula that returns a complex number.

Note: The IMLN function only returns natural logarithm for complex numbers with base e, or Euler’s number 2.71828.

The Anatomy of the LOG Function

The syntax or the way we write the LOG function is as follows:

=LOG(value,[base])

  • = the equal sign is how we begin any function in Google Sheets.
  • LOG() is our LOG function. The function is used to return the logarithm of a number given a base. 
  • value is the only required argument. This refers to the value for which we want to calculate the logarithm given the base value. Furthermore, this value must be positive. 
  • base is an optional argument. This refers to the base to use for calculating the logarithm. By default, the base is 10.

Note: We can use the LOG function when we want to return a logarithm with a different base than Euler’s number. 

Common Mistakes in Using IMLN Function

The IMLN function is simple and straightforward to use. Regardless, it is best to avoid these common mistakes to ensure the function works properly. 

Firstly, we may forget to include the “i” in the complex number. The IMLN function requires the complex number to be in the format “a+bi” or “a-bi”. If we forget to include the “i”, the formula will return an error. 

Secondly, we may use the incorrect notation for the complex number. We must make sure to use the plus sign (+) or subtract sign (-) to separate the real and imaginary parts of the complex number. 

When we use a different symbol or omit the sign, the function will result in an error.

Lastly, we may use an invalid complex number as an argument. The IMLN function requires a valid complex number as its argument. A complex number must be in the format “a+bi” or “a-bi”, where “a” and “b” are real numbers, and “i” represents the imaginary unit.

A Real Example of Using IMLN Function in Google Sheets

Let’s say we have a data set containing complex numbers. We want to calculate the natural logarithm of the complex numbers. Our initial data set would look like this:

Initial dataset

In this example, we will use the IMLN function to calculate the natural logarithm of complex numbers, which are useful in a variety of mathematical applications.

We will use the formula below to complete our task:

=IMLN(A2)

IMLN formula

There is only one required argument in the formula above, which is the number argument. We simply used a cell reference that directs to the complex number we want to calculate. In this case, we selected the cell A2

IMLN Function in Google Sheets

When placing the complex number directly into the formula, do not forget to enclose it in quotation marks to make it a string value. For instance, we will input “4+5i”

The final data set would look like this:

Final dataset

Let’s say we have another number in the data set with a different base. In this case, we cannot utilize the IMLN function. 

Another example

Instead, we will use the LOG function to return a logarithm with a different base:

=LOG(A8,2)

LOG formula

The first part of the formula is referring to the number we want to calculate. In this case, we selected cell A8. Next, we specified the base to use for calculating the logarithm, which is 2

The final data set with the LOG function would be:

Final output

You can make your own copy of the spreadsheet above using the link below. 

Amazing! Now we can dive into the steps of using the IMLN function in Google Sheets.

How to Use IMLN Function in Google Sheets

1. First, we will create a new column in the data set to display the natural logarithms of the complex numbers.

IMLN Function in Google Sheets

2. We will select the first empty row to input our formula. To begin, we will type in an equal sign and the function name. Our formula would be “=IMLN(”.

IMLN Function in Google Sheets

3. Then, we will simply select the cell containing the complex number we want to calculate. In this case, our formula would be “=IMLN(A2)”.

IMLN Function in Google Sheets

4. We will press the Enter key to return the result.

IMLN Function in Google Sheets

5. Next, we will drag down the Fill Handle tool to copy the formula and apply it to the rest of the cells.

IMLN Function in Google Sheets

6. Let’s try using the LOG function. We want to return the number in cell A8 with a different base. In this case, we will begin with an equal sign and the function name. The formula would be “=LOG(”.

IMLN Function in Google Sheets

7. Then, we will select the cell containing the number. Our formula would become “=LOG(A8”.

IMLN Function in Google Sheets

8. Lastly, we will input our desired base for the calculation. In this case, we want the base to be 2, which will make our final formula “=LOG(A8,2)”.

IMLN Function in Google Sheets

9. Press the Enter key to return the result.

IMLN Function in Google Sheets

And tada! We have successfully used the IMLN function in Google Sheets.

You can apply this guide whenever you need to calculate the natural logarithm of a complex number. You can now use the IMLN function and the various other Google Sheets formulas available to create great worksheets that work for you.

That’s pretty much it! Make sure to subscribe to our newsletter to be the first to know about the latest guides and tutorials from us.

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