Im

Im[z]

gives the imaginary part of the complex number z.

Details

  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • Im[expr] is left unevaluated if expr is not a numeric quantity.
  • Im automatically threads over lists.

Examples

open allclose all

Basic Examples  (3)

Find the imaginary part of a complex number:

Plot over a subset of the complex plane:

Use Im to specify regions of the complex plane:

Scope  (29)

Numerical Evaluation  (7)

Evaluate numerically:

Complex number input:

Evaluate to high precision:

Mixedprecision complex inputs:

Evaluate efficiently at high precision:

Im threads elementwise over lists and matrices:

Im can deal with realvalued intervals:

Specific Values  (6)

Values of Im at fixed points:

Value at zero:

Values at infinity:

Exact inputs:

Evaluate for complex exponentials:

Evaluate symbolically:

Visualization  (5)

Visualize on the real axis:

Plot on the real axis:

Visualize Im in the complex plane:

Visualize Im in three dimensions:

Use Im to specify regions of the complex plane:

Function Properties  (5)

Im is defined for all real and complex inputs:

Im is zero on the entire real line:

It achieves all real values over the complex plane:

Im is an odd function:

Im is not a differentiable function:

The difference quotient does not have a limit in the complex plane:

There is only a limit in certain directions, for example, the real direction:

Obtain this result using ComplexExpand:

TraditionalForm formatting:

Function Identities and Simplifications  (6)

Automatic simplification:

Expand assuming real variables x and y:

Simplify Im using appropriate assumptions:

Express a complex number as a sum of its real and imaginary parts:

Express in terms of real and imaginary parts:

Find the imaginary part of a Root expression:

Applications  (3)

Flow around a cylinder as the imaginary part of a complexvalued function:

Construct a bivariate harmonic function from a complex function:

The function satisfies Laplace's equation:

Reconstruct an analytic function from its real part :

Example reconstruction:

Check result:

Properties & Relations  (8)

Use Simplify and FullSimplify to simplify expressions containing Im:

Prove that the disk is in the upper half-plane:

ComplexExpand assumes variables to be real:

Here z is not assumed real, and the result should be in terms of Re and Im:

FunctionExpand does not assume variables to be real:

ReImPlot plots the real and imaginary parts of a function:

Use Im to describe regions in the complex plane:

Reduce can solve equations and inequalities involving Im:

With FindInstance you can get sample points of regions:

Use Im in Assumptions:

Integrate can generate conditions in terms of Im:

Possible Issues  (2)

Im can stay unevaluated for numeric arguments:

Additional transformation may simplify it:

Im is a function of a complex variable and is therefore not differentiable:

As a complex function, it is not possible to write Im[z] without involving Conjugate[z]:

In particular, the limit that defines the derivative is direction dependent and therefore does not exist:

Use ComplexExpand to get differentiable expressions for real-valued variables:

Neat Examples  (1)

Use Im to plot a 3D projection of the Riemann surface of :

Introduced in 1988
 (1.0)