How to use the IMAGINARY function
The IMAGINARY function calculates the imaginary number of a complex equation 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. IMAGINARY Function Syntax
IMAGINARY(inumber)
2. IMAGINARY Function Arguments
inumber | Required. A complex number in x+yi or x+yj text format. |
3. IMAGINARY function example
A complex number consists of an imaginary number and a real number, complex numbers let you solve polynomial equations using imaginary numbers if no solution is found with real numbers.
A complex number in rectangular form can be described as z = x + yi or z = x + yj text form in Excel. The IMAGINARY function extracts the imaginary value from the complex number.
Formula in cell D3:
The imaginary coefficient is the number ending with a i or j, this number is what the IMAGINARY function extracts from a complex number.
3.1 Explaining formula
Step 1 - Populate arguments
IMAGINARY(inumber)
becomes
IMAGINARY(B25)
Step 2 - Evaluate IMAGINARY function
IMAGINARY(C3)
becomes
IMAGINARY("3+4i")
and returns 4.
4. When to use the IMAGINARY function?
Use the IMAGINARY 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 imaginary part of a complex number on a chart
The chart above shows how to represent the complex number “3+4i” on the complex plane. The complex plane has two axes: the x-axis is for real numbers and the y-axis is for imaginary numbers. The blue line with an arrow points from the origin (0,0) to (3,4), which is the location of “3+4i” on the plane.
The horizontal dashed line marks the imaginary part of the complex number “3+4i” on the y-axis. The IMAGINARY function can extract the real part from any complex number, which is useful for plotting complex numbers on charts.
A complex number has both a real part and an imaginary part, and we need both of them to plot a complex number on the plane.
5.1 Calculate the real and imaginary parts of a complex number
To plot a complex number on the complex plane, we have to find its real and imaginary parts separately. Cell B25 has 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 need to use coordinates from the origin (0,0), so I have entered 0 (zero) in cells C24 and D24. The scatter chart that we will create soon requires a blank row between the line coordinates to show two separate lines that are not connected.
The dashed line also needs two points on the chart to be displayed correctly. It starts from where the complex number is (3,4) and ends at the y-axis. The line is horizontal, so the end point must have an real part 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 imaginary number as a dashed line and so on. Here are detailed instructions:
How to plot theta θ - Argand diagram
Useful links
IMAGINARY function - Microsoft
Functions in 'Engineering' category
The IMAGINARY function function is one of many 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 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