ReIm
Details
- ReIm automatically threads over lists.
Examples
open all close allBasic Examples (3)
The real and imaginary parts of a complex number:
ReIm[5 + 12I]Real numbers are a special kind of complex number:
ReIm[3]ReIm[list] gives a list of ordered pairs:
ReIm[{I, -1, -I, 1}]Scope (5)
ReIm accepts all number types:
ReIm[-3]ReIm[(3/5)]ReIm[1.5`5]ReIm[1.5 - 3.2I]ReIm works with symbolic representations of numbers:
ReIm[-17^(1/(4))]ReIm[Exp[2 I Pi / 3]]ReIm[Gamma[-1 / 2]]Purely symbolic expressions can be partially simplified:
ReIm[z]ReIm[2z]ReIm[w + z]ReIm supports nested lists and ragged arrays:
ReIm[{a, {b, c}}]ReIm[{{1, -1, 0}, {0, 1}}]ReIm works with SparseArray and structured array objects:
ReIm[SparseArray[{{1} -> I, {3} -> a, {4} -> -Pi}, {5}]]ReIm[SymmetrizedArray[{{1, 1, 2} -> 1, {1, 2, 2} -> 3I}, {2, 2, 2}, {{3, 1, 2}, Exp[2 I Pi / 3]}]]Applications (3)
Use ReIm with ListPlot to visualize numbers in the complex plane:
ListPlot[ReIm[{I, E, -1 - 2I, Sqrt[-I]}], PlotStyle -> PointSize[Large]]Use ReIm with ParametricPlot to visualize complex-valued functions on the reals:
ParametricPlot[ReIm[(-2)^x], {x, 0, 4}]Use ReIm together with Epilog to pick out points in a complex-plane plot:
JuliaSetPlot[-1, Epilog -> {AbsolutePointSize[6], White, Point[ReIm[{I / 2, -I / 2, 1, -1}]]}]Properties & Relations (9)
ReIm increases the depth of an array by one, adding a new inner dimension of length 2:
mat = RandomReal[1, {4, 3}];ArrayDepth[mat]ArrayDepth[ReIm[mat]]Dimensions[mat]Dimensions[ReIm[mat]]ReIm[array] gives an array of {re,im} pairs:
ReIm[PauliMatrix[2]]This can be turned into a pair {Re[array],Im[array]} using Transpose:
Transpose[ReIm[PauliMatrix[2]], RotateLeft[{1, 2, 3}]]ComplexExpand assumes variables to be real:
ComplexExpand[ReIm[r Exp[I θ]]]In general, variables are assumed to be complex, which may prevent simplification:
ReIm[r Exp[I θ]]Use Simplify and FullSimplify to simplify the results of ReIm:
ReIm[2x + I]Simplify[%, x > 3]FullSimplify[Norm[ReIm[z]] == Abs[z]]ReIm converts complex numbers to
pairs:
ReIm[I]FromPolarCoordinates converts pairs of real-valued polar coordinates to
pairs:
FromPolarCoordinates[{1, Pi / 2}]ReIm can be viewed as the composition of AbsArg and FromPolarCoordinates:
ReIm[3 + 4I] === FromPolarCoordinates[AbsArg[3 + 4I]]ReIm converts complex numbers to
pairs:
ReIm[5 Exp[3 Pi I / 4] ]AngleVector converts pairs of reals to
pairs:
AngleVector[{5, 3Pi / 4}]ReImPlot plots the real and imaginary parts of a function:
{Plot[ReIm[ArcSin[x]], {x, -3, 3}],
ReImPlot[ArcSin[x], {x, -3, 3}]}Use ComplexListPlot to plot complex numbers using their real and imaginary parts:
data = RandomComplex[{-10 - 10I, 10 + 10I}, 100];ComplexListPlot[data]ListPlot[ReIm[data]]Possible Issues (1)
Substituting a list l for z in the output of ReIm[z] is different from directly evaluating ReIm[l]:
ReIm[{I, -I, 0}]ReIm[z] /. z -> {I, -I, 0}For any array, the two results are related by a transposition of the inner and outer levels:
arr = RandomComplex[{-1 - I, 1 + I}, {3, 3, 3}];
ReIm[arr] === Transpose[(ReIm[z] /. z -> arr ), RotateRight@ Range [ ArrayDepth[arr] + 1]]See Also
Re Im ComplexExpand Complex FromPolarCoordinates AbsArg ReImPlot
Function Repository: ComplexToPolar
Related Guides
History
Text
Wolfram Research (2015), ReIm, Wolfram Language function, https://reference.wolfram.com/language/ref/ReIm.html.
CMS
Wolfram Language. 2015. "ReIm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ReIm.html.
APA
Wolfram Language. (2015). ReIm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ReIm.html
BibTeX
@misc{reference.wolfram_2026_reim, author="Wolfram Research", title="{ReIm}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/ReIm.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_reim, organization={Wolfram Research}, title={ReIm}, year={2015}, url={https://reference.wolfram.com/language/ref/ReIm.html}, note=[Accessed: 13-June-2026]}