Im[z]
gives the imaginary part of the complex number
.
Im
Im[z]
gives the imaginary part of the complex number
.
Examples
open all close allBasic Examples (4)
Find the imaginary part of a complex number:
Im[2 + 3I]Find the imaginary part of a complex number expressed in polar form:
Im[2Exp[I π / 3]]Plot over a subset of the complex plane:
Plot3D[Im[x + I y], {x, -2, 2}, {y, -2, 2}]Use Im to specify regions of the complex plane:
ComplexRegionPlot[Im[z] > 0, {z, 2}]Scope (29)
Numerical Evaluation (7)
Im[1.2]Im[(3/2) + (4/5)I]N[Im[E + I Pi], 25]Mixed‐precision complex inputs:
Im[2 - 1.64I]Im[2 - 1.6400000000000000000I]Im[2`20 - (164/100)I]Im[2.5 - (164/100)I]Evaluate efficiently at high precision:
N[Im[-5^(1/(5))], 100]//TimingN[Im[-5^(1/(5))], 10000];//TimingIm threads elementwise over lists and matrices:
Im[{1.2, 1.5I, -1.8I}]Im[(| | |
| :- | :- |
| 1 | u |
| v | -I |)]Im can be used with Interval and CenteredInterval objects:
Im[Interval[{-1, 1}]]Im[CenteredInterval[-1 + I, (1 + I) / 2]]Specific Values (6)
Values of Im at fixed points:
Table[Im[n], {n, {1, I 7 / 3, -7 / 5 + I}}]Im[0]Im[Infinity]Im[I Infinity]Im[DirectedInfinity[-1 + I]]Im[ComplexInfinity]Im[-5^(1/(5))]Evaluate for complex exponentials:
Table[Im[Exp[k I 3π / 8]], {k, 8}]PiecewiseExpand[Im[I x], -2 < x < 2]Visualization (5)
Plot[Im[x^(1/(4))], {x, -3, 3}, MaxRecursion -> 15]Plot[Im[E^I x], {x, -2π, 2π}]Visualize Im in the complex plane:
ComplexContourPlot[Im[z], {z, 2}, PlotLegends -> Automatic]Visualize Im in three dimensions:
ComplexPlot3D[Im[z], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic, MeshFunctions -> {Re[#1]&, Im[#1]&}, Mesh -> Automatic]Use Im to specify regions of the complex plane:
ComplexRegionPlot[Im[z^3] > Im[(1/z^3)], {z, 2}]//QuietFunction Properties (5)
Im is defined for all real and complex inputs:
FunctionDomain[Im[x], x]FunctionDomain[Im[x], x, Complexes]Im is zero on the entire real line:
FunctionRange[Im[x], x, y]It achieves all real values over the complex plane:
FunctionRange[Im[x], x, y, Complexes]Im is an odd function:
Im[-x] == -Im[x]Im is not a differentiable function:
Im'[x]The difference quotient does not have a limit in the complex plane:
Underscript[, hUnderscript[ -> , ℂ]0](Im[x + h] - Im[x]/h)There is only a limit in certain directions, for example, the real direction:
Underscript[, hUnderscript[ -> , ℝ]0](Im[x + h] - Im[x]/h)Obtain this result using ComplexExpand:
ComplexExpand[Im'[x]]TraditionalForm formatting:
Im[x]//TraditionalFormFunction Identities and Simplifications (6)
Im[{Re[z], Im[z], I Re[z], Abs[z], Conjugate[z]}]Expand assuming real variables x and y:
ComplexExpand[Im[x]]ComplexExpand[Im[x + I y]]Simplify Im using appropriate assumptions:
Simplify[Im[x], x > 0]Express a complex number as a sum of its real and imaginary parts:
FullSimplify[Re[z] + I Im[z]]Express in terms of real and imaginary parts:
Abs[x ^ 2]//FunctionExpandFind the imaginary part of a Root expression:
Im[Root[# ^ 5 + 11# ^ 2 + 1&, 2]]//RootReduceApplications (3)
Flow around a cylinder as the imaginary part of a complex‐valued function:
ComplexContourPlot[Im[z + 1 / (z)], {z, 3}, Contours -> 40, Epilog -> Disk[{0, 0}, 1]]Construct a bivariate harmonic function from a complex function:
z ^ 2Sin[z + z ^ 3] + Tan[(1/z)]ComplexExpand[Im[% /. z -> x + I y]]The function satisfies Laplace's equation:
D[%, x, x] + D[%, y, y]//SimplifyReconstruct an analytic function
from its real part
:
analyticReconstruct[v_, {x_, y_}, z_] :=
2I(v //. {x -> z / 2, y -> z / (2I)}) - I(v //. {x -> 0, y -> 0})analyticReconstruct[{2x y, E^xSin[y]}, {x, y}, z]//SimplifyComplexExpand[Im[% /. z -> x + I y]]//SimplifyProperties & Relations (8)
Use Simplify and FullSimplify to simplify expressions containing Im:
{Im[Exp[I Pi / 5]x], Im[2x + I]}Simplify[%, x > 3]FullSimplify[Abs[Im[z]] ≤ Abs[z]]Prove that the disk
is in the upper half-plane:
FullSimplify[ForAll[z, Implies[Abs[z - I] ≤ 1, Im[z] ≥ 0]]]ComplexExpand assumes variables to be real:
ComplexExpand[Im[(x + I y) ^ 3]]ComplexExpand[Im[Sin[x + I y]]]Here z is not assumed real, and the result should be in terms of Re and Im:
ComplexExpand[Abs[z] ^ 2, z, TargetFunctions -> {Re, Im}]FunctionExpand does not assume variables to be real:
FunctionExpand[Im[z1 + z2 + z3]]FunctionExpand[Im[(x + I y) ^ 3]]ReImPlot plots the real and imaginary parts of a function:
{Plot[{Re[ArcSin[x]], Im[ArcSin[x]]}, {x, -3, 3}],
ReImPlot[ArcSin[x], {x, -3, 3}]}Use Im to describe regions in the complex plane:
Map[ComplexRegionPlot[#, {z, 3}, PlotPoints -> 40]&, {Im[(1 + I)z] < 0, -1 < Im[z ^ 2] < 1, -1 < Im[(z + 1/z - 1)] < 1, Im[z ^ 7] < 7}]Reduce can solve equations and inequalities involving Im:
Reduce[Im[z ^ 2] > 1, z]Reduce[Im[z ^ 2] == Abs[z], z]With FindInstance you can get sample points of regions:
FindInstance[Im[z ^ 2] > 1, z]Use Im in Assumptions:
Integrate[x ^ (I s), {x, 1, Infinity}, Assumptions -> Im[s] > 1]Limit[x ^ (I s), x -> Infinity, Assumptions -> Im[s] > 0]Integrate can generate conditions in terms of Im:
Integrate[x ^ (I s), {x, 1, Infinity}]Possible Issues (2)
Im can stay unevaluated for numeric arguments:
{Im[Log[2 + I]], Im[Sqrt[1 + I]]}Additional transformation may simplify it:
FunctionExpand[%]Im is a function of a complex variable and is therefore not differentiable:
D[Im[z], z]As a complex function, it is not possible to write Im[z] without involving Conjugate[z]:
FullSimplify[Im[z] == (z - Conjugate[z]/2I)]In particular, the limit that defines the derivative is direction dependent and therefore does not exist:
Limit[DifferenceQuotient[Im[z], {z, h}], h -> 0, Direction -> 1]Limit[DifferenceQuotient[Im[z], {z, h}], h -> 0, Direction -> I]Use ComplexExpand to get differentiable expressions for real-valued variables:
D[ComplexExpand[Im[x + I y]], y]Neat Examples (1)
Use Im to plot a 3D projection of the Riemann surface of
:
ParametricPlot3D[{r Cos[f], r Sin[f], Im[Sqrt[r]Exp[I f / 2]]}, {r, 0, 1}, {f, 0, 4Pi}]Tech Notes
Related Links
History
Introduced in 1988 (1.0) | Updated in 2021 (13.0)
Text
Wolfram Research (1988), Im, Wolfram Language function, https://reference.wolfram.com/language/ref/Im.html (updated 2021).
CMS
Wolfram Language. 1988. "Im." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Im.html.
APA
Wolfram Language. (1988). Im. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Im.html
BibTeX
@misc{reference.wolfram_2026_im, author="Wolfram Research", title="{Im}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Im.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_im, organization={Wolfram Research}, title={Im}, year={2021}, url={https://reference.wolfram.com/language/ref/Im.html}, note=[Accessed: 13-June-2026]}