top of page

How to use the COMPLEX Function in Excel - 3 Examples


The COMPLEX function is used to help create complex numbers using real and imaginary coefficients, that can be used with various other Excel Functions. The COMPLEX function will either use the form "x + yi" or "x + yj".


Contents:



Syntax

= COMPLEX(real_num,i_num,[suffix])

real_num = The real coefficient (leading number or factor) of the complex number. The x in "x + yi".

i_num = The imaginary coefficient of the complex number. The y in "x + yi".

[suffix] = [optional] The suffix for the imaginary component. The default is i, but j can be used in its place depending on your use case.


What is a Complex Number

A complex number is a number that has both a real and an imaginary component.


Real numbers are nearly any number that you can think of, whole numbers, negatives, fractions, decimals, and even square roots:

Imaginary numbers are created when a squared number gives a negative result. Normally this cannot happen as a negative times a negative will always yield a positive value, but if we say:

When we square i in this case, we get -1. Some examples of imaginary numbers are:




Complex numbers combine both a real and and imaginary number like so:

Either part of the complex number can also be zero.


Explanation

The COMPLEX function is part of the "Engineering" group of functions within Excel.


This function will always return a result in text format, in the form "x + yi" or "x + yj" depending on which suffix is being used. Where x represents the real number, and y represents the imaginary number.


Notes:

- If either the real_num or i_num argument is nonnumeric, and #VALUE! error will be returned.

- The suffix argument must be an "i" or a "j", if it is not, a #VALUE! error will be returned.


Examples

1. Create Complex Numbers Using Cell References

This is the easiest way to create a large amount of complex numbers. Using cell references we can easily drop in the required real numbers, imaginary numbers, and change the suffix if needed.


Note here that either part can be negative or zero, and the function will still work. For the suffix, only a lower case "i" and "j" will work, any uppercase letters will give you a #VALUE! error.

= COMPLEX(B3,C3,D3)

2. Create Complex Numbers With Hardcoded Values

Complex numbers can also be created using hardcoded values instead of cell references but you'll need to remember to surround the suffix (either the default i, or j) in double quotes. If not, you'll get a #VALUE! error.

= COMPLEX(7,3,"j")

3. Create Imaginary Numbers

Using the COMPLEX function can also be a good way of creating imaginary numbers if you know the coefficients needed, without having to manually type them out. All you need to do differently is make sure that the real_num argument is hardcoded as a 0.

= COMPLEX(0,B3)







bottom of page