# Engineering functions – IMD to Z

### Table of Contents

- How to use the IMDIV function
- How to use the IMEXP function
- How to use the IMLN function
- How to use the IMLOG10 function
- How to use the IMLOG2 function
- How to use the IMPOWER function
- How to use the IMPRODUCT function
- How to use the IMREAL function
- How to use the IMSEC function
- How to use the IMSECH function
- How to use the IMSIN function
- How to use the IMSINH function
- How to use the IMSQRT function
- How to use the IMSUB function
- How to use the IMSUM function
- How to use the IMTAN function

## 1. How to use the IMDIV function

The IMDIV function calculates the quotient of two complex numbers in x + yi or x + yj text format.

The quotient is the result of dividing one complex number *inumber1* by another complex number *inumber2*. The numerator is *inumber1* and the denominator is *inumber2.*

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

### Table of Contents

### 1. IMDIV Function Syntax

IMDIV(*inumber1, inumber2*)

### 2. IMDIV Function Arguments

inumber1 |
Required. The complex numerator in x+yi or x+yj text format. |

inumber2 |
Required. The complex denominator in x+yi or x+yj text format. |

### 3. IMDIV Function Example

The image above demonstrates a formula in cell F3 that calculates the quotient of two complex numbers specified in cell C3 and D3 respectively.

The complex number in cell C3 is the numerator and the value in D3 is the denominator. The numerator and denominator are the top and bottom numbers of a fraction.

Formula in cell F3:

The IMDIV function divides one complex number by another complex number, the formula above divides the complex number in cell C3 by the complex number in cell D3.

The chart above shows complex numbers "-2+2i" and "2-4i" on the complex plane, the y-axis is the imaginary axis and the x-axis is the real axis.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMDIV(inumber1, inumber2)

becomes

IMDIV(C3, D3)

#### Step 2 - Evaluate the IMDIV function

IMDIV(C3, D3)

becomes

IMDIV("-2+2i","2-4i")

and returns

-0.6-0.2i

Use the rectangular form when you want to perform addition, subtraction, multiplication, and division of complex numbers. Section 5 below demonstrates how to convert complex numbers in polar form to rectangular form.

### 4. How to perform division between two complex numbers

This example demonstrates how Excel calculates in detail the quotient between two complex numbers in rectangular form.

z_{1 }is the light blue line on the chart, z_{2 }is green line, and the quotient is the dark blue line.

z_{1 }= a+ib

z_{2 }= c+id

IMDIV(z_{1},z_{2}) = (a+ib)/(c+id) = ((ac+bd) + (bc-ad)i)/(c^{2}+d^{2})

To perform a complex division of two complex numbers we need to divide the dividend and the divisor to calculate the quotient.

z_{1 }= -2+2i

z_{2 }= 2-4i

IMDIV(z_{1},z_{2}) = (-2+2i)/(2-4i) = ((-2*2+2*(-4)) + (2*2-(-2)*(-4))i)/(2^{2}+(-4)^{2}) = (-12 + -4i)/20 = -0.6 - 0.2i

### 5. How to convert complex numbers from polar form to rectangular form

The polar form has an absolute value or modulus which is the distance from the origin to a +bi. The θ is the angle of direction.

The following math formula allows us to calculate the complex value in rectangular form using the modulus and the θ:

Z = r(cos θ + isin θ)

This part calculates the real value: r*cos θ and this part calculates the imaginary value: r*i*sin θ

Formula in cell E9 calculates the complex values in rectangular form with Excel functions:

The result is obtained with a two-digit approximation, you can change the argument in the ROUND functions or remove the ROUND functions altogether from the formula to get a more accurate result.

### Explaining formula in cell E9

#### Step 1 - Convert degrees to radians

The RADIANS function

Function syntax:

RADIANS(D9)

becomes

RADIANS(60)

and returns

1.0471975511966

#### Step 2 - Calculate cosines for θ

The COS function

Function syntax:

COS(RADIANS(D9))

becomes

COS(1.0471975511966)

and returns

0.5

#### Step 3 - Multiply magnitude with cosines for θ

C9*COS(RADIANS(D9))

becomes

5*0.5

equals 2.5

#### Step 4 - Round to two digits

The ROUND function

Function syntax:

ROUND(C9*COS(RADIANS(D9)),2)

becomes

ROUND(2.5, 2)

and returns

2.5

#### Step 5 - Calculate sine for θ

The SIN function

Function syntax:

SIN(RADIANS(D9))

becomes

SIN(1.0471975511966)

and returns

0.866025403784439

#### Step 6 - Multiply magnitude with sine for θ

C9*SIN(RADIANS(D9))

becomes

5*0.866025403784439

and returns

4.33012701892219

#### Step 7 - Round to two digits

The ROUND function

Function syntax:

ROUND(C9*SIN(RADIANS(D9)),2)

becomes

ROUND(4.33012701892219,2)

and returns

4.33

#### Step 8 - Calculate complex numbers

The COMPLEX function

Function syntax:

COMPLEX(ROUND(C9*COS(RADIANS(D9)),2),ROUND(C9*SIN(RADIANS(D9)),2))

becomes

COMPLEX(2.5,4.33)

and returns

2.5+4.33i

### Useful links

IMDIV function - Microsoft

Complex number

Dividing Complex Numbers

## 2. How to use the IMEXP function

The IMEXP function calculates the exponential of a complex number in x + yi or x + yj text format.

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

**What is the exponential e?**

Exponential e is an irrational number also called Euler's number. It is approximately 2.718

**What is an irrational number?**

It is a number that can't be expressed as a simple fraction, in other words, the number of decimals are infinite. Other examples are √2 and π.

**Why is e called Euler's number?**

Leonard Euler is the first one to use the exponential e in the 18-th century. e is also known as the base of natural logarithms which are logarithms to the base of e.

**Why is e known as the base of natural logarithms?**

The number e is known as the base of natural logarithms because the natural logarithm function is the inverse of the natural exponential function.

x = e^{ln x} or x = ln e^{x}

**In what applications are complex logarithms useful?**

Many fields of mathematics and scientific disciplines use logarithms extensively.

- compound interest formulas
- exponential decay formulas

**What is the exponential form?**

Calculations with trigonometric functions and exponential functions of complex numbers become simpler with this form. It also demonstrates the connection between complex numbers and cyclical phenomena, such as waves and oscillations.

Z = re^{(iθ)}

### Table of Contents

### 1. IMEXP Function Syntax

IMEXP(*inumber*)

### 2. IMEXP Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMEXP function example

The image above demonstrates a formula in cell B28 that calculates the exponential of a complex number specified in cell B25.

Formula in cell B28:

The chart above demonstrates the complex plane, the y-axis the the imaginary axis and the x-axis is the real axis.

Complex number 2+i is the light blue line in the first quadrant. The exponential of 2+i is the green line also in the first quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMEXP(*inumber*)

becomes

IMEXP(B25)

#### Step 2 - Evaluate the IMEXP function

IMEXP(B25)

becomes

IMEXP("2+i")

and returns

-3.99232404844127+6.21767631236797i

### 4. How is the exponential of a complex number calculated in detail?

The exponential of a complex number is calculated like this:

C = x + yi

IMEXP(C) = e^{(x+yi)} = e^{x}e^{yi} = e^{x}(cos y + isin y)

For example, if C = 2+i then

IMEXP(C) = e^{(2+i)} = e^{2}e^{i} = e^{2}(cos 1 + isin 1)

e^{2}(cos 1 + isin 1) = e^{2 }* cos 1 + ie^{2} *sin 1

becomes

7.38905609893065*cos 1 + i7.38905609893065*sin 1

becomes

7.38905609893065*0.54030230586814 + i7.38905609893065*0.841470984807897

equals

3.99232404844127 + 6.21767631236797i

### 5. The exponential function of a complex number produces a wave

The image above demonstrates how the exponential function of a complex number results in a wave shown in the chart.

C=x+yi

The imaginary part starts with 0 (zero) in cell C25 and is increased by (1/2)π or 45 degrees for each cell below. The real number is always 0 (zero) in this example.

The IMEXP function calculates the exponential in cells D25 and below for each complex number and the result shows the real number and the imaginary number oscillating back and forth.

The chart shows the real numbers in orange and the imaginary numbers in light blue, the real axis displays radians in fractions of pi in steps of (1/2)π.

### Useful links

IMEXP function - Microsoft

Exponential Form of a Complex Number

Euler's formula - Wikipedia

## 3. How to use the IMLN function

The IMLN function calculates the natural logarithm of a complex number in x + yi or x + yj text format.

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

**What is a natural logarithm?**

A natural logarithm is a logarithm with the base e, which is an irrational number approximately 2.7182818284591

Ln is the inverse of the natural exponential function e.

x = e^{ln x} or x = ln e^{x}

x + yi= e^{ln x+yi} or x + yi = ln e^{x+yi}

**What is an irrational number?**

It is a number that can't be expressed as a simple fraction, in other words, the number of decimals are infinite. Other examples of irrational numbers are √2 and π.

### Table of Contents

### 1. IMLN Function Syntax

IMLN(*inumber*)

### 2. IMLN Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMLN function example

The image above demonstrates a formula in cell B28 that calculates the natural logarithm of a complex number specified in cell B25.

Formula in cell B28:

The chart above demonstrates the complex plane, the y-axis the the imaginary axis and the x-axis is the real axis.

Complex number 2+2i is the light blue line in the first quadrant. The natural logarithm of 2+2i is the green line also in the first quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMLN(*inumber*)

becomes

IMLN(B25)

#### Step 2 - Evaluate the IMLN function

IMLN(B25)

becomes

IMLN("2+2i")

and returns

1.03972077083992+0.785398163397448i

### 4. How is the IMLN function calculated in detail?

The natural logarithm of a complex number is calculated like this:

C = x + yi

IMLN(C) =ln√(x^{2}+y^{2})+ itan^{-1}(y/x)

For example,

C=2+2i

IMLN(C) =ln√(2^{2}+2^{2})+ itan^{-1}(2/2)

IMLN(C) =ln√8+ 0.785398163397448i

IMLN(C) =1.03972077083992+ 0.785398163397448i

### 5. The IMLN function not working - #NUM error?

IMLN(0) (zero) is not possible because the natural logarithm function ln(x+yi) is defined only for x<>0. The IMLN function returns #NUM error if the argument is 0 (zero).

The IFERROR function lets you catch errors, it can return a value you specify if an error value is returned.

### 6. How to enter negative complex numbers in Excel

Excel shows a dialog box if you try to enter a negative complex number in a cell. It thinks a typo was made and tries to correct the input, however, the corrected string is wrong.

Press with left mouse button on the "No" button, another dialog box appears.

This dialog box is actually helpful, Excel thinks t's a formula when the first character is an equal sign or a minus sign. A workaround is to type an apostrophe ' first and then the string.

Press the "OK" button to dismiss the dialog box.

Now type the apostrophe and then the negative complex number. This works and Excel thinks the input string is a text string.

Another way to enter negative complex numbers is to use the COMPLEX function. It returns a complex number based on a real and imaginary value.

### Useful links

IMLN function - Microsoft

Complex logarithm

The Logarithmic Function

## 4. How to use the IMLOG10 function

The IMLOG10 function calculates the base 10 logarithm (common logarithm) of a complex number in x + yi or x + yj text format.

**Provide an example equation of when the base 10 logarithm is needed with real values ?**

The following equation can be solved using the base 10 logarithm: 10^{x}=100

becomes

log10(10^{x}) = log10(100)

becomes

x log10(10) = 2

log10(10) = 1

x*1=2

equals

x = 2

**What is the difference between the natural logarithm and the base 10 logarithm?**

The natural logarithm uses e as the base and the common logarithm uses 10 as the base.

**What is the difference between the IMLOG10 function and the IMLOG2 function?**

The IMLOG function uses the common logarithm or 10 as the base and the IMLOG2 function uses 2 as the base.

### Table of Contents

## 1. IMLOG10 Function Syntax

IMLOG10(*inumber*)

## 2. IMLOG10 Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

## 3. IMLOG10 function example

The image above demonstrates a formula in cell B28 that calculates the base 10 logarithm of a complex number specified in cell B25.

Cell C28 calculates the real number from the complex number in cell B28. Cell D28 extracts the imaginary number from the complex number specified in cell B28.

The real and imaginary numbers separated in a cell each allow us to graph the complex number on the complex plane.

Formula in cell B28:

The chart above demonstrates the complex plane, the y-axis the the imaginary axis and the x-axis is the real axis.

Complex number 5+5i is the light blue line in the first quadrant. The base 10 logarithm of 5+5i is the green line also in the first quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMLOG10(*inumber*)

becomes

IMLOG10(B25)

#### Step 2 - Evaluate the IMLOG10 function

IMLOG10(B25)

becomes

IMLOG10("5+5i")

and returns

0.849485002168009+0.34109408846046i

## 4. How is the IMLOG10 function calculated in detail?

The base 10 logarithm of a complex number is calculated like this:

C = x + yi

IMLOG10(C) =log_{10}(x+yi)=(log_{10}e)ln(x+yi)

For example, C = 5 + 5i

IMLOG10(5 + 5i) =log_{10}(5+5i)=(log_{10}e)ln(5+5i)

becomes

IMLOG10(5 + 5i) =(log_{10}e)ln(5+5i)=0.434294481903252*ln(5+5i)

becomes

IMLOG10(5 + 5i) =0.434294481903252*ln(5+5i)=0.434294481903252*(1.95601150271407+0.785398163397448i)

and returns

IMLOG10(5 + 5i) =0.849485002168009+0.34109408846046i

## 5. The IMLOG10 function not working - #NUM error

The base 10 logarithm function IMLOG10(x+yi) is not defined for x=0, so IMLOG10(0) is not a valid expression. The IMLN function will return a #NUM error if the argument is zero.

The IFERROR function can help you handle errors by returning a value of your choice if an error value occurs.

**Why is it not possible to calculate the base 10 logarithm of a complex number that has a real part of zero and an imaginary part of 0?**

The formula to calculate the base 10 logarithm of a complex number is log_{10}(x+yi)=(log_{10}e)ln(x+yi)

There is no solution to ln(0) which is why the calculation is not possible.

### Useful links

IMLOG 10 function - Microsoft

Common logarithm

Value of Log 10

## 5. How to use the IMLOG2 function

The IMLOG2 function calculates the base 2 logarithm of a complex number in x + yi or x + yj text format.

**Provide an example equation of when the base 2 logarithm is needed with real values ?**

This equation can be solved using the base 2 logarithm: 2^{x}=16

becomes

log_{2}(2^{x}) = log_{2}(16)

becomes

x log_{2}(2) = 4

log_{2}(2) = 1

x*1=4

equals

x = 4

**What is the difference between the natural logarithm and the base 2 logarithm?**

The natural logarithm uses e as the base and the log_{2} uses 2 as the base.

**What is the difference between the IMLOG2 function and the IMLOG10 function?**

The IMLOG2 function uses 2 as the base and the IMLOG10 function uses 10 as the base.

### Table of Contents

### 1. IMLOG2 Function Syntax

IMLOG2(*inumber*)

### 2. IMLOG2 Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMLOG2 function example

The image above demonstrates a formula in cell B28 that calculates the base 2 logarithm of a complex number specified in cell B25.

Cell C28 calculates the real number from the complex number in cell B28. Cell D28 extracts the imaginary number from the complex number specified in cell B28.

The real and imaginary numbers separated in a cell each allow us to graph the complex number on the complex plane.

Formula in cell B28:

The chart above shows the complex plane, the y-axis is the imaginary axis and the x-axis is the real axis.

Complex number 5+5i is the light blue line in the first quadrant. The base 2 logarithm of 5+5i is the green line also in the first quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMLOG2(*inumber*)

becomes

IMLOG2(B25)

#### Step 2 - Evaluate the IMLOG2 function

IMLOG2(B25)

becomes

IMLOG2("5+5i")

and returns

2.82192809488736+1.1330900354568i

### 4. How to calculate the base 2 logarithm of a complex number in detail?

The base 2 logarithm of a complex number is calculated like this:

C = x + yi

IMLOG2(C) =log2(e)ln(x+yi)

For example, C = 5 + 5i

IMLOG2(C) =log2(e)ln(x+yi) = log2(e)ln(5+5i)

IMLOG2(C) = log2(e)ln(5+5i) = 1.44269504088896*ln(5+5i)

IMLOG2(C) = 1.44269504088896*ln(5+5i) =1.44269504088896*(1.95601150271407+0.785398163397448i)

IMLOG2(C) = 1.44269504088896*(1.95601150271407+0.785398163397448i) = 2.82192809488736+1.1330900354568i

### 5. The IMLOG2 function not working - #NUM error

The base 2 logarithm function IMLOG2(x+yi) is not defined for x=0, IMLOG2(0) is not a valid expression.

The IFERROR function can help you handle errors by returning a value of your choice if an error value occurs.

**Why is it not possible to calculate the base 10 logarithm of a complex number that has a real part of zero and an imaginary part of 0?**

The formula to calculate the base 2 logarithm of a complex number is log10(x+yi)=(log10e)ln(x+yi)

There is no solution to ln(0) which is why the calculation is not possible.

### Useful links

IMLOG2 function - Microsoft

Binary logarithm

Log base 2

## 6. How to use the IMPOWER function

The IMPOWER function calculates a complex number raised to a given power in x + yi or x + yj text format.

### Table of Contents

### 1. IMPOWER Function Syntax

IMPOWER(*inumber, number*)

### 2. IMPOWER Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

number |
Required. The power you want to raise the complex number to. Integer, fractional, or negative values are allowed. |

### 3. IMPOWER function example

The image above demonstrates a formula in cell B28 that calculates a complex number specified in cell B25 raised to a power.

Formula in cell C3:

The chart above shows the complex number -1-2i on the complex plane as a light blue line with an ending arrow, the green line with an ending arrow represents -1-2i raised to the power of 2 which is -2+4i.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMPOWER(*inumber, number*)

becomes

IMPOWER(B3, 2)

#### Step 2 - Evaluate the IMPOWER function

IMPOWER(B3, 2)

becomes

IMPOWER("1+2i", 2)

and returns

-3+4i

### 4. Calculate a given complex number raised to a power in detail

A complex number raised to a given power is calculated like this:

C = x + yi

Convert the complex number in rectangular form to polar form:

Z = r(cos θ + i sin θ)

θ = tan^{-1} (x/y)

r = √(x^{2}+y^{2})

Raise the complex number in polar form to a power.

IMPOWER(C) = (x+y)^{n }= r^{n}e^{inθ }= r^{n}cos nθ+ir^{n}sin nθ

Convert the complex number in polar form to rectangular form.

x + yi = √(x^{2}+y^{2})(cos θ + i sin θ)

### 4.1 Example: Raise -1-2i to the power of 2

C = -1-2i

θ = tan^{-1} (x/y) = tan^{-1} (-1/-2) = tan^{-1} (0.5) = 0.463647609000806 radians. This is true if the complex number is in the first quadrant.

However, complex number -1-2i is in the third quadrant. We need to add π to 0.463647609000806 to get the correct radians.

π + 0.463647609000806 = 4.24874137138388

**Example of quadrants in the complex plane**

The complex plane is divided into four quadrants, the orange line with an ending arrow represents 1+2i. It is in the first quadrant. The blue line with an ending arrow represents -1-2i, it is in the third quadrant.

r = √(x^{2}+y^{2}) = √((-1)^{2}+(-2)^{2}) = √(1+4) = √5

r^{n}cos nθ+ir^{n}sin nθ = (√5)^{2}cos (2*4.24874137138388) + i(√5)^{2}sin (2*4.24874137138388) = 5*cos (2*4.24874137138388) + i*5*sin (2*4.24874137138388) = 5*-0.6 + i*5*0.8 = -3+4i

You can also multiply x + yi by itself since we are raising it to the power of 2.

(x+yi)*(x+yi) = x^{2} + xyi + xyi -y^{2} = x^{2} + 2xyi - y^{2}

i*i = -1

(-1-2i)*(-1-2i) = 1+2*2i-4 = -3+4i

### 5. What are quadrants in the complex plane?

Quadrants are four regions (Quad = 4) formed by the intersection of the real axis and the imaginary axis in the complex plane.

**How are quadrants numbered in the complex plane?**

They are numbered counterclockwise from 1 to 4 and starts from the region where both the real and imaginary parts are positive.

The chart above shows the complex plane with the corresponding quadrants and four complex numbers in each quadrant.

The first quadrant is defined as 0 < θ < π/2, the orange line represents 1+2i and is in the first quadrant.

The second quadrant is defined as π/2 < θ < π, the green line represents -1+2i and is in the second quadrant.

The third quadrant is defined as -π/2 < θ < -π, the blue line represents 1-2i and is in the third quadrant.

The fourth quadrant is defined as 0 < θ < -π/2, the light blue line represents -1-2i and is in the fourth quadrant.

**Why is it important to know which quadrant a given complex number is located?**

It is important to know which quadrant a given complex number is in because it helps us determine the sign and angle. The angle of a complex number is between the line and the positive real axis.

The image above shows the angle or argument for the following four complex numbers:

1+2i, θ = 1.10714871779409 radians

-1+2i, θ = 2.0344439357957 radians

1-2i, θ = -1.10714871779409 radians

-1-2i, θ = -2.0344439357957 radians

### 6. Calculate the n-th root of a complex number

The IMPOWER function lets you calculate the n-th root of a given complex number. To calculate the n-th root of a complex number divide 1 by n in the second argument. This is the same as *complex_number*^(1/n) which returns the n-th root.

IMPOWER(*complex_number*, 1/n)

The following formula calculates the 4-th root of complex number specified in cell B25.

Formula in cell B28:

### Explaining formula

#### Step 1 - Divide 1 by n

1/n

becomes

1/4

#### Step 2 - Populate IMPOWER function

IMPOWER(*inumber*,*number*)

becomes

IMPOWER(B25,1/4)

#### Step 3 - Calculate the n-th root of a given complex number

IMPOWER(B25,1/4)

becomes

IMPOWER("-7,-24i",1/4)

and returns

"2-i"

### Useful links

IMPOWER function - Microsoft

Powers and Roots of Complex Numbers

Raising a Number to a Complex Power

## 7. How to use the IMPRODUCT function

The IMPRODUCT function calculates the product of complex numbers in x + yi or x + yj text format.

### Table of Contents

### 1. IMPRODUCT Function Syntax

IMPRODUCT(*inumber1, [inumber2], ...*)

### 2. IMPRODUCT Function Arguments

inumber1 |
Required. A complex number in x+yi or x+yj text format. |

[inumber2] |
Optional. Up to 255 complex numbers to multiply. |

### 3. IMPRODUCT function example

The image above demonstrates a formula in cell D3 that calculates the product of two complex numbers specified in cells C3 and B3.

Cell B3 contains this complex number "1+2i" and cell C3 contains the following complex number "-1-2i". The IMPRODUCT function in cell E3 calculates the complex product.

Formula in cell C3:

The image above shows a chart displaying the complex plane, the vertical axis is the imaginary axis, and the horizontal axis is the real axis. The light blue line C_{1} is the complex number "1+2i" and the green line C_{2} is the complex number "-1-2i". The product of C_{1} and C_{2} is the dark blue line.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMPRODUCT(*inumber, number*)

becomes

IMPRODUCT(B3, C3)

#### Step 2 - Evaluate the IMPRODUCT function

IMPRODUCT(B3, C3)

becomes

IMPRODUCT("1+2i", "-1-2i")

and returns

3-4i

### 4. How is the IMPRODUCT function calculated in detail?

A product of two complex numbers is calculated like this:

C_{1} = x + yi

C_{2} = z + wi

IMPRODUCT(C_{1},C_{2}) = (x+y)(z+w) = (xz - yw) + (xw + yz)i

### 4.1 Detailed calculation

C_{1} = 1 + 2i

C_{2} = -1 - 2i

IMPRODUCT(C_{1},C_{2}) = (x+y)(z+w) = (1*(-1) - 2*(-2)) + (1*(-2)+ 2*(-1))i

#### Step 1 - Multiply first part (xz - yw)

(1*(-1) - 2*(-2))

becomes

(-1-(-4))

#### Step 2 - Calculate the difference for the first part (xz - yw)

(-1-(-4))

equals 3.

#### Step 3 - Multiply second part (xw + yz)i

(1*(-2) + (2*(-1))i

becomes

(-2 + -2)i

#### Step 4 - Calculate the addition for the second part (xw + yz)i

(-2 + -2)i

equals

-4i

#### Step 5 - Construct complex product - add parts

(xz - yw) + (xw + yz)i

equals

3-4i

### 5. Calculate the complex determinant of a 2x2 matrix

The image above shows a complex 2 by 2 matrix in cells F23:G24, they are [[1+2i, 3-4i], [5+6i, 7-8i]]. The formula in cell B37 calculates the complex determinant of a 2 by 2 matrix based on complex numbers.

Formula in cell B37:

The image above demonstrates all four complex values in a chart and their corresponding determinant.

### 5.1 Explaining the formula in cell B37

a : 1+2i

b : 3-4i

c : 5+6i

d : 7-8i

det(A) = a*d - b*c = (1+2i)*(7-8i) - (3-4i)*(5+6i) = (23+6i) - (39-2i) = -16+8i

#### Step 1 - Calculate complex product

Function syntax:

IMPRODUCT(B25,B34)

becomes

IMPRODUCT("1+2i","7-8i")

and returns

"23+6i"

#### Step 2 - Calculate complex product

Function syntax:

IMPRODUCT(B28,B31)

becomes

IMPRODUCT("3-4i","5+6i")

and returns

"39-2i"

#### Step 3 - Calculate the difference

The IMSUB function

Function syntax:

IMSUB(IMPRODUCT(B25,B34),IMPRODUCT(B28,B31))

becomes

IMSUB("23+6i","39-2i")

and returns

-16+8i

### 6. Multiply a complex number by i

Multiplying a complex number by i is equivalent to rotating it by 90 degrees counterclockwise on the complex plane. (x + yi)*i = -y + xi

For example, if you multiply 1 + 2i (green line in the chart above) by i you get -2 + i (blue line in the chart above) which is 90 degrees counterclockwise from 1 + 2i.

Formula in cell B28:

You can also simplify i^{2} = -1 to multiply complex numbers by i. For example, if you multiply (-2 + i) by i you get -2i+i^{2} equals -1-2i.

### Useful links

IMPRODUCT function - Microsoft

Multiplying Complex Numbers - Cuemath

Multiplying complex numbers - Clark university

## 8. How to use the IMREAL function

The IMREAL function calculates the real coefficient of a complex number in x + yi or x + yj text format.

### Table of Contents

## 1. IMREAL Function Syntax

IMREAL(*inumber*)

## 2. IMREAL Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

## 3. IMREAL function example

The image above demonstrates a formula in cell C25 that calculates the real coefficient of a complex number specified in cell B25. Cell B25 contains "3+4i" which is a complex number constructed from a real and imaginary part.

The real part from cell B25 is extracted and displayed in cell C25, the imaginary part is shown in cell D25.

Formula in cell C25:

The image above also shows a chart of a complex plane, the real and imaginary numbers are coordinates. The real number is a dashed line representing the real number from "3+4i" to the real axis (x-axis).

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMREAL(*inumber*)

becomes

IMREAL(B3)

#### Step 2 - Evaluate the IMREAL function

IMREAL(B3)

becomes

IMREAL("3+4i")

and returns 3.

## 4. When to use the IMREAL function?

Use the IMREAL function when you want to

- add, subtract, multiply and divide complex numbers.
- calculate the modulus which is the distance from the origin to the point representing the complex number.
- graph complex numbers
- calculate the complex determinant of a 2x2 matrix

The links above points to articles explaining how to manually calculate these properties, however, Excel has functions so you don't need to calculate them manually:

IMSUM | IMSUB | IMPRODUCT | IMDIV | IMARGUMENT | IMABS

## 5. How to plot the real part of a complex number on a chart

The chart above demonstrates complex number "3+4i" on the complex plane. The y-axis is the imaginary axis and the x-axis is the real axis, the light blue line with an arrow represents the complex number from the origin (0,0) to (3,4).

The vertical dashed line displays the real number of the complex number "3+4i" on the real axis. The IMREAL function lets you extract the real number from a complex number, this is handy if you want to plot a complex number on chart.

A complex number number consists of a real number and an imaginary number, we need both these numbers to plot a complex number on a chart.

### 5.1 Calculate the real and imaginary numbers

To be able to plot the complex number on the complex plane we need to calculate the real and imaginary number separately. Cell B25 contains the complex number in rectangular form.

Formula in cell C25:

The IMREAL function extracts the real number from the complex number in cell B25.

Formula in cell D25:

The IMAGINARY function extracts the imaginary number from the complex number in cell B25.

To plot a line we must use coordinates from the origin (0,0), I have entered 0 zero in cells C24 and D24. The scatter chart we are soon going to create needs a blank row between the line coordinates in order to show two different lines not attached to each other.

The dashed line also needs two points on the chart in order to be displayed properly. It begins where the complex number ends (3,4) and ends at the real axis, the line is vertical meaning the end point must have an imaginary number of 0 (zero).

### 5.2 Insert a scatter chart

The following steps describe how to plot a complex number and the corresponding real number.

- Select cell range C24:D28.
- Go to tab "Insert" on the ribbon.
- Press with left mouse button on the "Insert Scatter (x,y) or Bubble chart" button.

- A popup menu appears, press with left mouse button on the "Scatter with straight lines".

A chart shows up on the worksheet, move the chart to its desired location.

Change the chart so it shows the complex number as a line with an ending arrow, the real number as a dashed line and so on. Here are detailed instructions:

How to plot theta θ - Argand diagram

### Useful links

IMREAL function - Microsoft

Real and imaginary numbers

Imaginary numbers - Math is fun

## 9. How to use the IMSEC function

**What is the IMSEC function?**

The IMSEC function calculates the secant of a complex number in x + yi or x + yj text format.

**What is a complex number?**

**What is a secant?**

The trigonometric secant is a function that defines an angle of a right-angled triangle to the ratio of the hypotenuse to the adjacent side. It is also the inverse of the cosine, sec(θ) = 1/cos(θ).

**What is the difference between a secant and a complex secant?**

The difference between secant and secant for complex numbers is that the former is defined for real numbers, while the latter is defined for complex numbers.

The secant of a real number x is defined as sec(θ) = 2/(e^{θ} + e^{-θ})

Natural number e is the base of the natural logarithm.

The secant of a complex number z = x + yi is defined as sec(x + yi) = (cos x cos y + isin x sinh y) / (cos^{2} x cosh^{2} y+ sin^{2} x sinh^{2} y)

Complex numbers has i as the imaginary unit.

### Table of Contents

### 1. IMSEC Function Syntax

IMSEC(*inumber*)

### 2. IMSEC Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMSEC function example

The image above shows a formula in cell B28 that calculates the cotangent of a complex number specified in cell B25.

Cell C28 calculates the real number from the complex number in cell B28. Cell D28 extracts the imaginary number from the complex number specified in cell B28.

The real and imaginary numbers separated in a cell each allow us to graph the complex number on the complex plane.

Formula in cell B28:

The chart above shows the complex plane, the y-axis is the imaginary axis and the x-axis is the real axis.

Complex number 2+i is the light blue line in the first quadrant. The complex secant of 2+i is the green line located in the second quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSEC(*inumber*)

becomes

IMSEC(B25)

#### Step 2 - Evaluate the IMSEC function

IMSEC(B25)

becomes

IMSEC("1+2i")

and returns

-0.41314934426694+0.687527438655479i

### 4. How is the IMSEC function calculated in detail?

The secant of a complex number is calculated like this:

C = x + yi

IMSEC(C) = (cos x cosh y + isin x sinh y) / (cos^{2} x cosh^{2} y+ sin^{2} x sinh^{2} y)

For example, C=2+i

IMSEC(2+i) = (cos 2 cosh 1 + isin 2 sinh 1) / (cos^{2} 2 cosh^{2} 1+ sin^{2} 2 sinh^{2} 1)

becomes

IMSEC(2+i) = (-0.416146836547142*1.54308063481524 + i0.909297426825682*1.1752011936438) / (0.173178189568194*2.38109784554182+ 0.826821810431806*1.38109784554182)

becomes

IMSEC(2+i) = (-0.64214812471552 + i1.06860742138278) / (0.412354214075659+ 1.14192182103435)

equals

IMSEC(2+i) = -0.41314934426694+0.687527438655479i

### 5. IMSEC function not working - #NUM error

The IMSEC function returns a #NUM error if the provided argument is not a valid complex number.

### Useful links

IMSEC function - Microsoft

Secant of Complex Number

Complex number - Wikipedia

## 10. How to use the IMSECH function

**What is the IMSECH function?**

The IMSECH function calculates the hyperbolic secant of a complex number in x + yi or x + yj text format.

**What is the secant?**

It is a trigonometric function that defines an angle of a right-angled triangle to the ratio of hypotenuse and the adjacent side. In other words, it is the inverse or reciprocal of cosine.

The secant function has a domain of all real numbers except where cos θ = 0, and a range of all real numbers except the interval -1 < y < 1

cos θ = 0 when θ is 90 degrees or π/2

**What is the hyperbolic secant?**

The hyperbolic secant is related to the hyperbolic cosine. sech x = 1/(cosh x) The hyperbolic secant has real numbers between 0 and 1.

**What is a hyperbola?**

The equation of a hyperbola with a horizontal axis is

(x^{2}/ a^{2}) - (y^{2} / b^{2}) = 1

where a and b are positive constants.

A circle has a constant distance from the center point, while a hyperbola is a curve that has two focus points (+ae, 0), and (-ae, 0).

**What is the difference between hyperbolic secant and complex hyperbolic secant?**

The difference between hyperbolic secant and hyperbolic secant for complex numbers is that the former is defined for real numbers, while the latter is defined for complex numbers.

The hyperbolic secant of a real number x is defined as sech(x) = 2/(e^{x} + e^{-x})

Natural number e is the base of the natural logarithm.

The complex hyperbolic secant of a complex number z = x + yi is defined as IMSECH(C) = (cosh x cos y - isinh x sin y) / (cosh^{2} x cos^{2} y+ sinh^{2} x sin^{2} y)

Complex numbers has i as the imaginary unit.

### Table of Contents

### 1. IMSECH Function Syntax

IMSECH(*inumber*)

### 2. IMSECH Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMSECH function example

The image above shows a formula in cell B28 that calculates the hyperbolic secant of a complex number specified in cell B25.

Formula in cell D3:

The chart above shows the complex plane, the y-axis is the imaginary axis and the x-axis is the real axis.

Complex number 2-2i is the light blue line in the fourth quadrant. The hyperbolic secant of 2-2i is the green line located in the second quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSECH(*inumber*)

becomes

IMSECH(B3)

#### Step 2 - Evaluate the IMSECH function

IMSECH(B3)

becomes

IMSECH("1+2i")

and returns

-0.41314934426694-0.687527438655479i

### 4. How is the IMSECH function calculated in detail?

The hyperbolic secant of a complex number is calculated like this:

C = x + yi

IMSECH(C) = (cosh x cos y - isinh x sin y) / (cosh^{2} x cos^{2} y+ sinh^{2} x sin^{2} y)

### 5. IMSECH function not working - #NUM error

The IMSECH function returns a #NUM error if the provided argument is not a valid complex number.

### Useful links

IMSECH function - Microsoft

Hyperbolic Secant of Complex Number

Complex trigonometric definitions

## 11. How to use the IMSIN function

**What is the IMSIN function?**

The IMSIN function calculates the sine of a complex number in x + yi or x + yj text format.

**What is the sine?**

The sine is a trigonometric function that relates an angle θ in a right triangle to the ratio of the length of the side opposite the angle and the length of the longest side (hypotenuse) of the triangle. A right triangle has one angle that measures 90° or π/2 radians which is approximately 1.5707963267949 radians.

**What is the difference between sine and the complex sine?**

The difference between sine and complex sine is that the former is defined for real numbers only, while the latter is defined for complex numbers as well. The sine of a complex number has some similarities to the sine of a real number, such as periodicity.

The sine function is periodic considering the angle, meaning it repeats its values after a certain interval. The period of the sine function is 2π or 360 degrees.

sin z = (e(iz) - e(-iz))/2i

z - complex number

i - imaginary unit

e -

### Table of Contents

### 1. IMSIN Function Syntax

IMSIN(*inumber*)

### 2. IMSIN Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMSIN function example

The image above demonstrates a formula in cell B28 that calculates the sine of a complex number specified in cell B25.

Formula in cell B28:

Complex number 2+2i is the light blue line in the first quadrant. The sine of 2+2i is the green line shown in the fourth quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSIN(*inumber*)

becomes

IMSIN(B25)

#### Step 2 - Evaluate the IMSIN function

IMSIN(B25)

becomes

IMSIN("2+2i")

and returns

3.42095486111701-1.50930648532362i

### 4. How to calculate the sine of a complex number in detail?

The sine of a complex number is calculated like this:

C = x + yi

sin (C) = sin (x) cosh (y) + cos (x) sinh (y)i

For example, C=2+2i

sin (2+2i) = sin (2) cosh (2) + cos (2) sinh (2)i

becomes

sin (2+2i) = 0.909297426825682*3.76219569108363 + -0.416146836547142*3.62686040784702i

equals

sin (2+2i) = 3.42095486111701 - 1.50930648532361i

sin - calculates the sine of a number

cos - calculates the cosine of a number

cosh - calculates the hyperbolic cosine of a number

sinh - calculates the hyperbolic sine of a number

### 5. IMSIN function not working

The IMSIN function returns a #NUM error if the provided argument is not a valid complex number.

### Useful links

IMSIN function - Microsoft

Sine of Complex Number - Proof Wiki

Sine of a Complex Number - Stack Exchange

## 12. How to use the IMSINH function

**What is the IMSINH function?**

The IMSINH function calculates the hyperbolic sine of a complex number in x + yi or x + yj text format.

**What is the hyperbolic sine?**

Hyperbolic functions are similar to ordinary trigonometric functions, but they use a different shape to define them.

Trigonometric functions use a circle, while hyperbolic functions use a hyperbola. The chart above shows a hyperbola and two asymptotes (dashed lines) where the intersection is at the center of the hyperbola. The chart below shows a circle containing the trigonometric functions.

**What is a hyperbola?**

The equation of a hyperbola with a horizontal axis is

(x^{2}/ a^{2}) - (y^{2} / b^{2}) = 1

where a and b are positive constants.

A circle has a constant distance from the center point, while a hyperbola is a curve that has two focus points (+ae, 0), and (-ae, 0).

**What is the difference between hyperbolic sine and complex hyperbolic sine?**

The difference between hyperbolic sine and hyperbolic sine for complex numbers is that the former is defined for real numbers, while the latter is defined for complex numbers.

The hyperbolic sine of a real number x is defined as

sinh(x) = (e^{x} - e^{-x})/2

Natural number e is the base of the natural logarithm.

The complex hyperbolic sine of a complex number z = x + yi is defined as sinh(z) = sinh(x)cos(y) + i cosh(x)sin(y)

Complex numbers has i as the imaginary unit.

### Table of Contents

### 1. IMSINH Function Syntax

IMSINH(*inumber*)

### 2. IMSINH Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMSINH function example

The image above demonstrates a formula in cell B28 that calculates the hyperbolic sine of a complex number specified in cell B25.

Formula in cell B28:

Complex number 2+i is the light blue line in the first quadrant. The hyperbolic sine of 2+i is the green line also shown in the first quadrant.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSINH(*inumber*)

becomes

IMSINH(B3)

#### Step 2 - Evaluate the IMSINH function

IMSINH(B3)

becomes

IMSINH("1+2i")

and returns

-0.489056259041294+1.40311925062204i

### 4. How is the IMSINH function calculated in detail?

The hyperbolic sine of a complex number is calculated like this:

C = x + yi

sinh(x + yi) = sinh x*cos y + icosh x*sin y

For example, C=2+i

sinh(2 + i) = sinh 2*cos 1 + icosh 2*sin 1

becomes

sinh(2 + i) = 3.62686040784702*0.54030230586814 + 3.76219569108363*0.841470984807897i

equals

sinh(2 + i) = 1.95960104142161+3.16577851321617i

### 5. IMSINH function not working #NUM error

The IMSINH function returns a #NUM error if the provided argument is not a valid complex number.

### Useful links

IMSINH function - Microsoft

Hyperbolic Sine of Complex Number

Hyperbolic Functions

## 13. How to use the IMSQRT function

The IMSQRT function calculates the square root of a complex number in x + yi or x + yj text format.

### Table of Contents

### 1. IMSQRT Function Syntax

IMSQRT(*inumber*)

### 2. IMSQRT Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMSQRT function example

The image above demonstrates a formula in cell B28 that calculates the square root of a complex number specified in cell B25.

Formula in cell D3:

I have also included the second solution to square root of 3+4i in cell B31. The chart shows complex number 3+4i in light blue, the solutions to square root of 3+4i which are 2+i and -2-i in green and orange respectively.

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSQRT(*inumber*)

becomes

IMSQRT(B25)

#### Step 2 - Evaluate the IMSQRT function

IMSQRT(B3)

becomes

IMSQRT("3+4i")

and returns

"2+i".

**Note!** The IMSQRT function returns only one of two possible solutions.

The solutions to square root of 3+4i are 2+i and -2-i. Change the sign of both the real and imaginary parts of the complex number to get the second square root.

You can verify these solutions using the IMPOWER function. IMPOWER("2+i",2) equals 3+4i, however, IMPOWER("-2-i",2) also equals 3+4i.

### 4. How to calculate the second square root of a complex number?

The formula in cell B31 calculates the second square root of a given complex number specified in cell B25.

Formula in cell B31:

It takes the value in cell B25, which is a complex number, and calculates its square root using the IMSQRT function. This returns one of the two possible square roots of the complex number.

It then multiplies the result of the IMSQRT function by -1 using the IMPRODUCT function. This changes the sign of both the real and imaginary parts of the complex number, and effectively returns the other square root.

### Explaining formula

#### Step 1 - Calculate the first square root

The IMSQRT function

Function syntax:

IMSQRT(B25)

becomes

IMSQRT("3+4i")

and returns "2+i".

#### Step 2 - Second square root

Function syntax:

IMPRODUCT(IMSQRT(B25),-1)

becomes

IMPRODUCT("2+i",-1)

and returns "-2-i".

### 5. How is the square root of a complex number in rectangular form calculated in detail?

The following math formula shows how to calculate the square root of a complex number.

Z = x + yi

y ≠ 0 (zero)

iy/|y| gives the sign of the imaginary part of the square root. |y| is the absolute value of y. For example, |4| = 4 and |-4| = 4.

iy/|y| = i if y is positive and -i if y is negative. This makes the two square roots have opposite signs for both parts.

For example, Z = 3+4i

|Z| = (3^2+4^2)^0.5 = (9+16)^0.5 = 25^0.5 = 5

Z^0.5 = ((5+3)/2)+i((5-3)/2)^0.5 = 4^0.5+i1^0.5 = 2+i

### Polar form

IMSQRT(C) = √(x + yi) = √r cos (θ/2) + i√r sin (θ/2)

θ = tan^{-1} (x/y)

r = √(x^{2} + y^{2})

### Useful links

IMSQRT function - Microsoft

How do I get the square root of a complex number? - Stack Exchange

## 14. How to use the IMSUB function

**What is the IMSUB function?**

The IMSUB function calculates the difference between two complex numbers in x + yi or x + yj text format.

### Table of Contents

### 1. IMSUB Function Syntax

IMSUB(*inumber1, inumber2*)

### 2. IMSUB Function Arguments

inumber1 |
Required. A complex number in x+yi or x+yj text format. |

inumber2 |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMSUB function example - rectangular form

The image above demonstrates the IMSUB function in cell F3 that calculates the difference between two complex numbers specified in cells C3 and D3.

Formula in cell F3:

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSUB(*inumber1, inumber2*)

becomes

IMSUB(C3, D3)

#### Step 2 - Evaluate the IMSUB function

IMSUB(C3, D3)

becomes

IMSUB("-2+2i","2-4i")

and returns

-4+6i

### 4. How to calculate the difference between two complex numbers in rectangular form?

This example demonstrates how Excel calculates in detail the difference between two complex numbers in rectangular form.

C_{1} is the first complex number specified in cell C3, C_{2} is the second complex number specified in cell D3.

C_{1} = x + yi

C_{2} = z + wi

To calculate the difference between two complex numbers we need to find the difference between the real numbers and the imaginary numbers separately.

C_{1}- C_{2} = (x + yi) - (z + wi) = (x - z) + (y - w)i

C_{1} = -2+2i

C_{2} = 2-4i

C_{1}- C_{2} = (-2 + 2i) - (2 - 4i) = ((-2) -2) + (2 - (-4))i = -4+6i

### 5. How to graph the difference between two complex numbers?

The image above demonstrates a scatter chart that shows two different complex numbers and their difference, in total three different complex values.

Complex numbers in rectangular form a+bi have real and imaginary values which are positive, negative or zero, this makes it possible to use a chart with two dimensions x and y.

The imaginary values on the vertical axis (y) and the real values on the horizontal axis (x).

C_{1} = -2+2i (light blue)

C_{2} = 2-4i (green)

C_{1}- C_{2} = -4+6i (dark blue)

Subtracting a complex number means that it points the opposite way with the same distance (green). The dark blue complex number is the difference between C_{1} and C_{2} .

### 5.1 Extract real and imaginary numbers from complex numbers

Make sure that each complex number begins with real value 0 and imaginary value 0 on a separate row except the complex number you subtract with (green). The real and imaginary values on the next row, and that there is an empty row between. You can use the IMREAL function and the IMAGINARY function to extract the coordinates from the complex numbers in column B, make sure they are in rectangular form.

Formula in cell C25:

Formula in cell D25:

Copy these cells and paste to cells C28 and D28 respectively.

Formula in cell B31:

The row before complex number 2-4i (row 27) must contain the result from cells C31 and D31.

### 5.2 Insert scatter chart

- Select cell range C24:D31.
- Go to tab "Insert" on the ribbon.
- Press with mouse on the icon named "Insert Scatter (x,y)", a popup menu appears.
- Press with left mouse button on the icon "Scatter with Straight Lines and Markers".

- The chart shows up on the worksheet.

Press and hold with left mouse button on the chart border, then drag it to the location you want. Use the "handles" to resize the chart, see the image below.

### 5.3 Create arrows and change colors

- Double-press with left mouse button on with left mouse button on one of the lines on the chart, all lines will be selected and a settings pane shows up.

- Press with left mouse button on the "Fill&Line" button.
- Press with mouse on "End Arrow type", select an arrow.
- Press with mouse on "End Arrow size, pick a size.

- Press with left mouse button on twice on a line to select a specific line.
- Press with left mouse button on the color button on the settings pane. A popup menu appears.

- Pick a color.
- Repeat steps 1 to 3 with remaining lines.

There are still three markers on the chart, here is how to remove them.

- Select all the lines by press with left mouse button oning on them once.
- Go to the settings pane.

- Press with left mouse button on "Marker Options".
- Select "None".

### 5.4 Change axis min and max value

- Double-press with left mouse button on one of the y-axis to open the settings pane.

- Press with left mouse button on the "Axis Options" button.
- Change the Bounds and the Units.
- Repeat step 1 to 3 with the x-axis.

### 5.5 Change axis markers and line width

- Select the y-axis.

- Press with left mouse button on the "Fill & Line" button.
- Press with left mouse button on the "Line".
- Press with left mouse button on the "Color" button. Press with mouse on black.
- Change the width to 1.5

- Press with right mouse button on on one of the lines, a popup menu appears.

- Press with mouse on "Add Data Labels".
- Double-press with left mouse button on one of the data labels, the settings pane shows up.

- Select "X Value" as well.

Change the chart title and add axis titles.

### 6. How to calculate the distance between two complex numbers?

The following formula calculates the length between two complex numbers in the complex plane. First, the formula subtracts the second complex number from the first, then it calculates the modulus of the difference.

For example, the first complex number is -2+2i and the second complex number is 4+4i. The difference is -6-2i, the modulus of -6-2i is the square root of 40 which equals approx. 6.32

Formula in cell E2:

The image above shows the distance between these two points on the complex plane, the distance is the dashed blue line between -2+2i and 4+4i.

### Explaining formula in cell E2

#### Step 1 - Calculate the difference between two complex numbers

The IMSUB function

Function syntax:

IMSUB(C2,C3)

becomes

IMSUB("-2+2i","4+4i")

and returns

"-6-2i"

#### Step 2 - Calculate the modulus of a complex number

The IMABS function

Function syntax:

IMABS(IMSUB(C2,C3))

becomes

IMABS("-6-2i")

and returns

6.32

### Useful links

IMSUB function - Microsoft

Complex numbers: the complex plane, addition and subtraction

Adding and Subtracting Complex Numbers

## 15. How to use the IMSUM function

The IMSUM function calculates the total of two or more complex numbers in x + yi or x + yj text format.

### Table of Contents

### 1. IMSUM Function Syntax

IMSUM(*inumber1, [inumber2], ...*)

### 2. IMSUM Function Arguments

inumber1 |
Required. A complex number in x+yi or x+yj text format. |

[inumber2] |
Optional. A complex number in x+yi or x+yj text format. Up to 255 complex numbers. |

### 3. IMSUM function example

The image above demonstrates a formula in cell D3 that calculates the total of two complex numbers specified in cells C3 and D3.

Formula in cell D3:

### 3.1 Explaining formula

#### Step 1 - Populate arguments

IMSUM(*inumber1, inumber2*)

becomes

IMSUM(C3, D3)

#### Step 2 - Evaluate the IMSUM function

IMSUM(C3, D3)

becomes

IMSUM("2+2i","2-4i")

and returns

4-2i

### 4. How to calculate the sum of two complex numbers in rectangular form?

This example demonstrates how Excel calculates in detail the sum of two complex numbers in rectangular form.

C_{1} is the first complex number specified in cell C3, C_{2} is the second complex number specified in cell D3.

C_{1} = x + yi

C_{2} = z + wi

To calculate the sum of two complex numbers we need to perform addition to the real and the imaginary numbers separately.

C_{1}+ C_{2} = (x + yi) + (z + wi) = (x + z) + (y + w)i

C_{1} = 2+2i

C_{2} = 2-4i

IMSUM(C_{1}, C_{2}) = C_{1}+ C_{2} = (2 + 2i) + (2 - 4i) = (2-2) + (2 + (-4))i = 4-2i

### 5. How to plot the sum of two complex numbers?

The image above shows a scatter chart that displays two different complex numbers and their sum, in total three different complex values.

Complex numbers in rectangular form a+bi have real and imaginary values which are positive, negative or zero, this makes it possible to use a chart with two dimensions x and y.

The imaginary values on the vertical axis (y) and the real values on the horizontal axis (x).

C_{1} = -1+6i (light blue)

C_{2} = 2-4i (green)

C_{1}+ C_{2} = 1+2i (dark blue)

Adding complex numbers means that you can put the second complex number at the first complex number, in other words, the green line starts where the light blue line ends. The dark blue complex number is the sum of C_{1} and C_{2} .

### 5.1 Extract real and imaginary numbers from complex numbers

The table demonstrated in the image above shows how the data needs to be arranged in order to plot different complex numbers on a chart.

- Each complex number has a starting point and an ending point.
- A blank row below each complex number.
- Formulas for calculating real and imaginary parts.

Formula in cell C31:

Formula in cell D25:

Formula in cell E25:

Complex number C_{2 }begins where C_{1 }ends and ends where the sum is located on the complex plane.

### 5.2 Insert scatter chart

- Select cell range D24:E31.
- Go to tab "Insert" on the ribbon.
- Press with mouse on the icon named "Insert Scatter (x,y)", a popup menu appears.
- Press with left mouse button on the icon "Scatter with Straight Lines and Markers".

- The chart shows up on the worksheet.

Press and hold with left mouse button on the chart border, then drag it to the location you want. Use the "handles" to resize the chart, see the image above.

### 5.3 Create arrows and change colors

- Double-press with left mouse button on with left mouse button on one of the lines on the chart, all lines will be selected and a settings pane shows up.

- Press with left mouse button on the "Fill&Line" button.
- Press with mouse on "End Arrow type", select an arrow.
- Press with mouse on "End Arrow size, pick a size.

- Press with left mouse button on twice on a line to select a specific line.
- Press with left mouse button on the color button on the settings pane. A popup menu appears.

- Pick a color.
- Repeat steps 1 to 3 with remaining lines.

There are still three markers on the chart, here is how to remove them.

- Select all the lines by press with left mouse button oning on them once.
- Go to the settings pane.

- Press with left mouse button on "Marker Options".
- Select "None".

### 5.4 Change axis min and max value

- Double-press with left mouse button on one of the y-axis to open the settings pane.

- Press with left mouse button on the "Axis Options" button.
- Change the Bounds and the Units.
- Repeat step 1 to 3 with the x-axis.

### 5.5 Change axis markers and line width

- Select the y-axis.

- Press with left mouse button on the "Fill & Line" button.
- Press with left mouse button on the "Line".
- Press with left mouse button on the "Color" button. Press with mouse on black.
- Change the width to 1.5

- Press with right mouse button on on one of the lines, a popup menu appears.

- Press with mouse on "Add Data Labels".
- Double-press with left mouse button on one of the data labels, the settings pane shows up.

- Select "X Value" as well.

Change the chart title and add axis titles.

### 6. How to calculate the midpoint of two complex numbers?

The midpoint of the line between two complex numbers x + yi and z + wi is the average of the real and imaginary numbers at the endpoints.

C_{1} = x + yi

C_{2} = z + wi

To calculate the average we need to add the real and imaginary numbers separately and then divide by 2.

Midpoint: (x+z) / 2 + ((y+w) / 2)i

Excel formula in cell D33:

Excel formula in cell E33:

### Explaining formula in cell D33

#### Step 1 - Calculate real number

The IMREAL function

Function syntax:

IMREAL(C25)

becomes

IMREAL("3+2i")

and returns 3.

#### Step 2 - Add real numbers

The plus sign lets you add numbers in an Excel formula.

IMREAL(C25)+IMREAL(C28)

becomes

3+2

equals 5.

#### Step 3 - Divide sum by 2

The division operator lets you divide numbers in an Excel formula.

(IMREAL(C25)+IMREAL(C28))/2

becomes

5/2

equals 2.5

### Useful links

IMSUM function - Microsoft

Complex numbers: the complex plane, addition and subtraction

Adding and Subtracting Complex Numbers

## 16. How to use the IMTAN function

**What is the IMTAN function?**

The IMTAN function calculates the tangent of a complex number in x + yi or x + yj text format.

### Table of Contents

### 1. IMTAN Function Syntax

IMTAN(*inumber*)

### 2. IMTAN Function Arguments

inumber |
Required. A complex number in x+yi or x+yj text format. |

### 3. IMTAN function example 1

The image above demonstrates a formula in cell D3 that calculates the tangent of a complex number in general or rectangular form specified in the function.

The IMTAN probably stands for imaginary tangent.

### 3.1 What are complex numbers?

Complex numbers allow us to solve equations that have no real solutions. Complex number have two parts, a real part and an imaginary part called i which means imaginary and stands for the square root of -1.

Link: How are complex numbers used in real life?

### 3.2 What are the applications for complex numbers?

Complex numbers are very useful in many fields of mathematics and science.

**Electronics**: Complex numbers are used to analyze circuits that involve alternating current (AC) or signals modulated by electromagnetic waves.**Electromagnetism**: Complex numbers are used to describe the electric and magnetic fields in terms of their magnitude and direction.**Control theory**: Complex numbers are used to design and optimize systems that have feedback loops, such as robots, airplanes, or rockets.**Signal analysis**: Complex numbers are used to perform Fourier transforms, which are methods of decomposing a signal into its frequency components.**Relativity**: Complex numbers are used to express the space-time interval in special relativity, which is a measure of the distance between two events that occur in different locations and times.**Fluid dynamics**: Complex numbers are used to model the flow of fluids, such as air or water.

Link: Complex number - Wikipedia

### 4. How is the IMTAN function result calculated?

z - complex number: 1+1i

a - real number: 1

b - imaginary number: 1

The math formula to calculate the imaginary tangent is:

#### Step 1 - Calculate real sin

The SIN function

Function syntax:

sin(2a)

becomes

sin(2*1)

and returns 0.909297426825682

#### Step 2 - Calculate real cos

The COS function

Function syntax:

cos(2a)

becomes

cos(2*1)

and returns -0.416146836547142

#### Step 3 - Calculate imaginary sinh

The SINH function

Function syntax:

sinh(2b)

becomes

sinh(2*1)

and returns 3.62686040784702

#### Step 4 - Calculate imaginary cosh

The COSH function

Function syntax:

cosh(2b)

becomes

cosh(2*1)

and returns 3.76219569108363

#### Step 5 - Divide first quotient

0.909297426825682/(-0.416146836547142+3.76219569108363)

becomes

0.909297426825682/3.34604885453649

and returns 0.271752585319512

#### Step 6 - Divide second quotient

3.62686040784702/(-0.416146836547142+3.76219569108363)

becomes

3.62686040784702/3.34604885453649

and returns 1.08392332733869i

The calculations match the result from the IMTAN function.

### 5. IMTAN function example 2 - cell reference

The image above demonstrates a formula in cell D3 that calculates the tangent of a complex number specified in cell C3.

Formula in cell D3:

### 5.1 Explaining formula

#### Step 1 - Populate arguments

IMTAN(*inumber1*)

becomes

IMTAN(C3)

#### Step 2 - Evaluate the IMTAN function

IMTAN(C3)

becomes

IMTAN("1+1i")

and returns

0.271752585319512+1.08392332733869i

### 6. IMTAN function example 3 - real and imaginary coefficients

The image above demonstrates a formula in cell D3 that calculates the tangent of real and imaginary coefficients specified in the COMPLEX function. The COMPLEX function lets you create a complex number using a real and imaginary number.

Formula in cell D3:

### 6.1 Explaining formula

#### Step 1 - Calculate complex number based on a real and imaginary number

The COMPLEX function

Function syntax:

COMPLEX(3,2)

returns

"3+2i".

#### Step 2 - Calculate the tangent of a complex number

IMTAN(COMPLEX(3,2))

becomes

IMTAN("3+2i")

and returns

-0.009+ 0.965i

### 7. IMTAN function error

The IMTAN function returns a #NUM error if we use an invalid argument. Make sure the argument is valid.

The IMTAN function returns #NUM error if the suffix is not "i" or "j", or omitted.

### Useful resources

More than 1300 Excel formulas### Excel categories

### Leave a Reply

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use 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 Oscar**

You can contact me through this contact form