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.
The letter j is used in electrical engineering to distinguish between the imaginary value and the electric current.
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
Functions in 'Engineering' category
The IMREAL 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