# 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.

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

### 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 calculates the real coefficient of a complex number in x + yi or x + yj text format.

Function syntax: IMREAL(inumber)

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

### Functions in 'Engineering' category

The IMSUM 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