# How to use the COMPLEX function

**What is the COMPLEX function?**

The COMPLEX function returns a complex number in the general form (also known as the rectangular form) based on a real and imaginary number.

**What is a complex number?**

A complex number can be written in this form x+yi, it contains a real and imaginary part. Complex numbers extend the real numbers by allowing solutions to equations that have no real solutions.

Complex numbers can be represented as points or vectors on a plane called the complex plane, where the horizontal axis is the real axis and the vertical axis is the imaginary axis, see the image above. The complex plane allows a geometric interpretation of complex numbers and their operations.

### Table of Contents

## 1. COMPLEX Function Syntax

COMPLEX(*real_num*, *i_num*, *[suffix]*)

## 2. COMPLEX Function Arguments

real_num |
Required. The real coefficient of the complex number. |

i_num |
Required. The imaginary coefficient of the complex number. |

[suffix] |
Optional. This argument lets you choose the suffix of the imaginary component. The default value is "i". |

The letter j is used in electrical engineering to distinguish between the imaginary value and the electric current.

## 3. COMPLEX Function example

The COMPLEX function is useful when you want to create a complex number with given real and imaginary coefficients. A complex number is a number that has two parts: a real part and an imaginary part. The real part is a number that you are familiar with, such as 2, -5, or 0.5. The imaginary part is a number that is multiplied by a special symbol called i, which stands for the square root of -1.

The COMPLEX function converts real and imaginary coefficients into a complex number of the form x + yi or x + yj, where x represents the real part and y represents the imaginary part.

The COMPLEX function returns a text result, not a numeric result. You can not perform arithmetic operations on the result directly. However, Excel has other functions that work with complex numbers, check out the Engineering category for more imaginary functions.

Formula in cell E3:

Cell B3 contains the real coefficient of the complex number, x in the diagram. Cell C3 contains the imaginary coefficient of the complex number, y in the diagram shown above.

Cell E3 calculates the complex number based on the real and imaginary coefficients specified in cells B3 and C3 respectively.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

COMPLEX(*real_num*, *i_num*, *[suffix]*)

becomes

COMPLEX(B3,C3)

#### Step 2 - Evaluate COMPLEX function

COMPLEX(B3,C3)

becomes

COMPLEX(2,3)

and returns

"2+3i".

The COMPLEX function returns complex numbers in general form.

### 3.2 What is the general form of complex numbers?

The general form of complex numbers is a + bi, where a and b are real numbers and i is the imaginary unit that satisfies i^2 = -1. The real part of a complex number is a, and the imaginary part is b.

### 3.3 Describe different forms of complex numbers?

Form |
Description |

General or rectangular |
Z = a +bi. Use this form when you want to perform arithmetic operations such as addition, subtraction, multiplication, and division of complex numbers. It also shows the real and imaginary parts of a complex number clearly. |

Polar |
Z = r(cos Î¸ + i sin Î¸) This form is useful for finding the roots, powers, and logarithms of complex numbers. It also shows the geometric interpretation of a complex number as a point on the complex plane with a certain distance and direction from the origin. |

Exponential |
Z = re^(iÎ¸) Use this form when you want to simplify calculations involving trigonometric functions and exponential functions of complex numbers. It also shows the connection between complex numbers and periodic phenomena such as waves and oscillations. |

Standard basis form |
Example, 2-3i = 2*1 + (-3)*i This form is useful for performing linear algebra operations such as scalar multiplication, vector addition, dot product, and cross product of complex numbers. It also shows the algebraic structure of complex numbers as a two-dimensional vector space. |

The general form and the polar form of complex numbers are equivalent and can be converted from one to another using trigonometry and algebra.

### 3.4 Why is i equal to the square root of -1?

The symbol i is defined as the square root of -1 because there is no real number that satisfies this equation. If we try to find a real number x such that x^2 = -1, we get a contradiction.

For example, if x is positive, then x^2 is also positive, so it cannot be equal to -1.

If x is negative, then x^2 is also positive, for the same reason.

If x is zero, then x^2 is also zero, which is not equal to -1. So there is no real solution to x^2 = -1.

However, mathematicians wanted to extend the real numbers to include a solution to this equation, so they invented a new symbol i (iota) and defined it as the square root of -1. This means that i^2 = -1 by definition. This also means that i is not a real number, but an imaginary number.

We can create complex numbers, by using i, which are numbers that have both a real part and an imaginary part.Â Complex numbers are useful because they allow us to solve equations that have no real solutions, such as x^2 + 1 = 0. Using i, we can find two solutions: x = i and x = -i. This is because i^2 = -1 and (-i)^2 = -1.

## 4. COMPLEX Function error

The COMPLEX function returns #VALUE error if the two first arguments are not numbers.

The COMPLEX function also returns a #VALUE if the suffix is not "i", "j" or omitted.

### Useful resources

COMPLEX function - Microsoft

Intro to complex numbers

An Introduction to Complex Numbers

### Functions in 'Engineering' category

The COMPLEX function function is one of 42 functions in the 'Engineering' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form