Complex numbers are widely used in several science and engineering sectors. As the name states, calculating complex numbers is difficult.
However, with Microsoft Excel’s default functions, performing complex number calculations has never been easier.
Throughout this article, I will discuss how to insert, use, and convert complex numbers in Microsoft Excel.
Without further ado, let’s get started!
What is the Complex Number?
A complex number is a unique number that forms with real and imaginary numbers. Usually, the number looks similar to a + bi, where a & b are real numbers, and i is the imaginary number. The value of i is √(-1), which is not an actual number, and that’s why it is known as an imaginary number.
Primarily, engineers, scientists, and mathematicians use complex numbers to describe electromagnetic waves and periodic phenomena.
Though calculating complex numbers is hard, using Microsoft Excel, anyone can perform several functions such as COMPLEX and IMAGINARY.
But before using the complex number, you must enable an add-in called Analysis Toolpak. Move down to the next section to enable the complex number calculation.
How to Enable Complex Number Calculation
To enable complex number computing in MS Excel, you must turn on the Analysis ToolPak from the add-ins. To do so, navigate to File > Options > Add-ins > Go. Here, check the box next to Analysis ToolPak and click OK to enable the complex number calculations.
From now on, you can access the complex number functions from the Formulas tab.
Here are the steps to turn on the complex number calculation:
- Launch the Excel desktop application.
- Navigate to File >> Options.
- Switch to the Add-ins tab and select Go.
- Check the Analysis ToolPak checkbox and click OK.
Now that you have enabled the add-in, you can easily access the complex number function using the More Functions menu.
Simply switch to the Formulas tab and navigate to More Functions > Engineering > COMPLEX.
How to Insert Complex Numbers in Excel
The most straightforward method of inserting complex figures in a Microsoft Excel Sheet is to type the number into an Excel cell. For instance, click on any free cell and type 4+5i in the cell. Here, 4 & 5 are the real numbers, and i is the imaginary number; together, they’re complex numbers.
Alternatively, using the COMPLEX operator, you can also accomplish the same. To do so, select the cell where you want to insert the complex number.
Type =COMPLEX(A6,B6,”j”) in the Excel formula bar. Replace the cell number with your preferred cells, but keep the double quotes for the imaginary number j.
Quick Note: You should use j as the suffix instead of the letter i. However, keep the j inside double quotes and use lowercase. Otherwise, you may encounter a #VALUE error.
Once you get one real and one imaginary number in your sheet, you can effortlessly merge the real and imaginary numbers into a complex number. However, you must consider some terms to convert the numbers to complex numbers.
For instance, you must use a numeric format for both real and imaginary number cells.
The complex number cell is a string, meaning you cannot perform any calculations using this cell. You should use the IMSUM and IMABS functions in such scenarios.
Using the Fill Handle, you can get complex numbers for all your Excel cells. Simply drag and drop the Fill Handle to the last cell.
How to Use Complex Numbers in Excel
For basic numerical operations with complex numbers in Excel, use the IMABS, IMSUM, IMDIV, and IMPRODUCT functions for subtracting, summing, dividing, and multiplying. Besides, you can try some advanced functions to calculate complex numbers.
Talking about advanced functions, the most used functions for complex numbers are IMCONJUGATE, IMLN, IMSQRT, and IMEXP.
Go through the subsequent discussion to learn more about the usage of complex number functions in Microsoft Excel.
Basic Calculations
Following are the basic calculations of complex numbers:
1. Sum
To sum complex numbers, use the IMSUM function. First, locate the two cells (A9 and B9) that contain the complex numbers, and place your mouse on an empty cell (C9).
Type =IMSUM(A9,B9), and hit Enter. You can also get a sum from more than two cells by selecting all cells you need.
2. Subtract
Alternatively, use the IMSUB function to subtract complex numbers in Excel.
Place the mouse cursor on cell D9, type =IMSUB(B9,A9) and press Enter. It will subtract the set 1 from set 2.
3. Multiply
In Microsoft Excel, you can multiply several complex numbers using the IMPRODUCT function.
Select cell E9, type =IMPRODUCT(A9,B9) in the Excel formula bar, and press Enter. Using this formula, you can multiply two or more complex numbers.
4. Divide
Another basic calculation of complex numbers is the divide function. Fortunately, you can quickly divide any complex numbers using the IMDIV function.
Click on an empty cell (F9 on the attached image), type =IMDIV(B9,A9) in the formula bar, and tap the Enter key.
If you have multiple complex number sets, you can type the aforementioned functions for one set and simply drag and drop the Fill Handler to apply the function to all the sets below.
Moreover, you can do some advanced calculations by following the subsequent methods.
Advance Calculations
Following are the advanced calculations of complex numbers:
1. Get the Conjugate
Conjugate in mathematics means changing the sign between two terms. For instance, we can refer to x + y as the conjugate of x – y.
In Microsoft Excel, you can extract the conjugate using the IMCONJUGATE function.
To get the conjugate of a complex number, place your cursor on cell B14, type =IMCONJUGATE(A14), and press Enter. It will instantly show the conjugate of the selected complex number.
2. Get the Logarithm
Logarithm is the opposite of the Exponential function. Let me clarify with an example.
if you consider the base 10 system, you only get 100 when 10 is multiplied by 10. So, in the 10 base system, the logarithm of 100 is 2.
To find the logarithm in MS Excel, you should utilize the IMLN option.
Place your cursor on the cell where you want to show the logarithm (C14). Type =IMLN(A14) and press the Enter button. It will immediately show you the logarithm of the selected complex number.
3. Find the Square Root
The best method to find the square root is to use the IMSQRT function. You can solve several equations using this function while finding the electrical impedance or quantum states.
To find the square root in Excel, click on a black cell (D14), type =IMSQRT(A14) in the formula bar, and press Enter.
If you need to find the square root for multiple numbers, simply hold and crawl the Fill Handle to the last cell. It will directly show the square root for all select cells.
4. Get the Exponential
The exponential in mathematics is a term that involves an exponent. You can solve various complex modeling systems using the exponential of complex numbers.
To get the exponential of a complex number, click on any cell, type =IMEXP(A14), and hit Enter.
Quick Note: All the aforementioned cell numbers are based on my test Excel Sheet. You must alter the cell values depending on your Sheet.
How to Get Imaginary and Real Parts of Complex Numbers
If you have a complex number and are uncertain about the imaginary and real numbers, use the IMAGINARY and IMREAL functions to find the imaginary and real values.
To find the imaginary part, place the mouse cursor on an empty cell and type =IMAGINARY(B5). Replace the B5 with the complex number cell and hit Enter.
To get the real part from a number, select an empty cell and type =IMREAL(B5). Also, replace the B5 with the cell number that contains the complex number and press Enter.
It will instantly separate the imaginary and real parts from a complex number.
How to Convert Complex Numbers in MS Excel
Converting complex numbers to magnitude and polar forms ensure enhanced visualization and simplification. If you need to discover Cartesian and Polar coordinate systems from complex numbers, use the Excel IMABS and IMARGUMENT functions for the conversion.
Usually, the Cartesian appears as (x, y), and the Polar appears as (r, θ) after the conversion.
Here are the methods to convert complex numbers in MS Excel:
1. Convert to Magnitude Form
Use the IMABS function to get the magnitude form from a complex number. To do so, type =IMABS(B5) and hit Enter. Replace the B5 cell with the cell where you stored the number.
It will instantly show you the absolute value of the selected complex number.
2. Convert to Polar Form
Convert any complex number to polar form utilizing the combination of IMABS and IMARGUMENT functions
To do so, type =IMABS(B1)&”(cos “&IMARGUMENT(B1)&” + isin “&IMARGUMENT(B1)&”)” and hit Enter. Don’t forget to change the B1 regarding your complex number cell.
Wrap Up
Working with complex numbers is complex. However, with Excel’s COMPLEX functions, adding, subtracting, multiplying, and dividing complex numbers is easier.
Moreover, the ability to convert complex numbers to the magnitude and polar form added another dimension to dealing with complex number calculations.
Don’t hesitate to comment below for further assistance regarding this topic.