COMPLEX function
The COMPLEX function in Excel is used to create a complex number from a real and an imaginary component. It allows you to represent complex numbers in the form , where is the real part, and is the imaginary part.
Syntax
COMPLEX(real_num, imaginary_num, [suffix])
Parameters
real_num: The real part of the complex number. This can be any numeric value, including a cell reference containing a number.imaginary_num: The imaginary part of the complex number. This can be any numeric value, including a cell reference containing a number. The function assumes that the imaginary part is multiplied byi(the imaginary unit).suffix(optional): A text string to append to the imaginary part of the complex number. The default is"i", but you can change it if needed (for example,"j"for electrical engineering applications).
How It Works
The COMPLEX function combines the real and imaginary parts into a single complex number in string form, formatted as "a + bi", where a is the real part and b is the imaginary part, and i is the imaginary unit.
If you don’t specify a suffix for the imaginary part, Excel uses "i" by default. You can change this to another suffix if required.
Examples
- Basic Example: To create the complex number :
=COMPLEX(3, 4)The result will be:
3 + 4i - Using a Different Suffix: If you want to represent the complex number with a
"j"instead of"i", you can specify a suffix:=COMPLEX(3, 4, "j")The result will be:
3 + 4j - Using Cell References: You can also use cell references for the real and imaginary parts. If
A1contains5andB1contains-2, the formula would be:=COMPLEX(A1, B1)The result will be:
5 - 2i - Creating Complex Numbers with Negative Imaginary Parts: If you want to create a complex number with a negative imaginary part, such as , use:
=COMPLEX(6, -5)The result will be:
6 - 5i
Important Notes
- The COMPLEX function returns the result as a text string in the format of a complex number. While the string looks like a complex number, it is treated as text in Excel and cannot directly be used in arithmetic calculations without conversion to an actual complex number format using other functions like IMREAL or IMAGINARY.
- The suffix parameter is optional, but it’s useful if you need a different suffix for the imaginary part. By default, Excel uses
"i".
Summary
The COMPLEX function in Excel is used to create a complex number by combining a real part and an imaginary part. It returns the result as a text string in the format "a + bi", where a is the real part, and b is the imaginary part. The function is helpful in fields like engineering, physics, and signal processing, where complex numbers are commonly used.