ExcelFunctions.net Logo

The Excel COMPLEX Function

Home » Excel-Built-In-Functions » Excel-Engineering-Functions » Excel-Complex-Function
Search this site:
Custom Search

Complex Numbers

Within the real number scale, there is no such thing as the square root of a negative number.

However, within the world of complex numbers, the 'imaginary' value, i is used to represent the square root of -1.

Therefore, the square root of any negative number can be represented by the square root of the number's modulus, multiplied by i.

For example :

√(-4)   =   2i

A Complex Number is composed of a real number combined with an imaginary number.

E.g. The complex number, z, is written as

z   =   5 + 2i

Basic Description

The Excel Complex function takes two arguments, representing the real and the imaginary coefficients of a complex number, and from these, creates a complex number.

The format of the function is :

COMPLEX( Real_num, I_num, [Suffix] )

where the arguments are as shown in the table below:

Real_num - The real component of the complex number
I_num - The imaginary component of the complex number
[Suffix] -

An optional argument that is used to specify a suffix to be used.

(For example, if we want the imaginary number 5+2i to use the suffix "j" (i.e. to be written as 5+2j), we would set the [Suffix] argument to "j")

If supplied, the [Suffix] argument, must be equal to either "i" or "j";
If omitted, this argument takes on the default value "i"


Examples

In the example below, the Complex function is used to create different complex numbers in Excel.

The format of the functions is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right.

 Formulas
  A
1 =COMPLEX( 5, 2 )
2 =COMPLEX( 5, -9 )
3 =COMPLEX( -1, 2, "j" )
4 =COMPLEX( 10, -5, "i" )
5 =COMPLEX( 0, 5 )
6 =COMPLEX( 3, 0 )
 Results
  A
1 5+2i
2 5-9i
3 -1+2j
4 10-5i
5 5i
6 3


Further examples of the Excel Complex function can be found on the Microsoft Office website.


Common Errors

If you get an error from your Excel Complex function this is likely to be one of the following :

#NAME? -

Occurs when Analysis ToolPak add-in is not enabled in your Excel.
You will need to enable the add-in if you want to use the Excel complex number functions.

To do this in Excel 2003 :

  • From the Tools drop-down menu, select the option Add-Ins ...
  • An 'Add-Ins' window will pop up. From this, select the option Analysis ToolPak and click OK

To do this in Excel 2007 :

  • Click the Microsoft button on the top left of your spreadsheet and select the Excel Options button
  • From the menu on the left hand side, select Add-Ins
  • In the 'Manage:' box, select Excel Add-ins and click Go...
  • An 'Add-Ins' window will pop up. From this, select the option Analysis ToolPak and click OK
#VALUE! - Either or both of the supplied Real_num or I_num arguments are non-numeric
or
- The supplied [Suffix] argument is something other than "i" or "j"






Valid XHTML 1.0 Transitional

Disclaimer Privacy Policy

Copyright © 2008-2011 ExcelFunctions.net