Purpose

Return value

Syntax

=IMREAL(inumber)
  • inumber - A string representing a complex number.

Using the IMREAL function

The IMREAL function returns the real part of a complex number. For example:

=IMREAL("4+3i") // returns 4

Excel handles complex numbers as strings formatted like “x+yi” or “x+yj”. Use the COMPLEX function to get the string representing a complex number.

Explanation

A complex number like “2-5i” is drawn as an arrow in the complex plane, where the horizontal axis corresponds to the real part of the number, and the vertical axis corresponds to the imaginary part.

A complex number is drawn as an arrow in the complex plane. - 1

The IMREAL function returns the real part of the number.

=IMREAL("2-5i") // returns 2

Notes:

  • IMREAL returns a #NUM error when the input does not represent a valid complex number.

Purpose

Return value

Syntax

=IMSEC(complex_num)
  • complex_num - The complex number in the form “x+yi”.

Using the IMSEC function

The Excel IMSEC function returns the secant of a complex number. For example, given “4+3i” as input the function returns “-0.065294028-0.07522496i” as output.

=IMSEC("4+3i") // returns -0.065294028-0.07522496i

Explanation

In math, the complex secant function is the reciprocal of the complex cosine function .

The complex secant function definition. - 2

In Excel, the output of the complex secant function is equivalent to the following formula.

=IMDIV(COMPLEX(1,0),IMCOS(z)) // equivalent to IMSEC(z)