AbsArg
Details
- AbsArg automatically threads over lists.
Examples
open all close allBasic Examples (3)
The absolute value and argument of a complex number:
AbsArg[5 + 12I]Real numbers are a special kind of complex number:
AbsArg[3]AbsArg[-3]AbsArg[list] gives a list of ordered pairs:
AbsArg[{I, -1, -I, 1}]Scope (5)
AbsArg accepts all number types:
AbsArg[-3]AbsArg[(3/5)]AbsArg[1.5`5]AbsArg[1.50 - 3.20I]AbsArg works with symbolic representations of numbers:
AbsArg[-17^(1/(4))]AbsArg[Exp[2 I Pi / 3]]AbsArg[Gamma[-1 / 2]]Purely symbolic expressions can be partially simplified:
AbsArg[z]AbsArg[2z]AbsArg[z^2]AbsArg supports nested lists and ragged arrays:
AbsArg[{a, {b, c}}]AbsArg[{{1, -1, 0}, {0, 1}}]AbsArg works with SparseArray and structured array objects:
AbsArg[SparseArray[{{1} -> 1, {3} -> a, {4} -> -Pi}, {5}]]AbsArg[SymmetrizedArray[{{1, 1, 2} -> 1, {1, 2, 2} -> 3I}, {2, 2, 2}, {{3, 1, 2}, Exp[2 I Pi / 3]}]]Properties & Relations (9)
AbsArg increases the depth of an array by 1 and adds a new inner dimension of length 2:
mat = RandomReal[1, {4, 3}];ArrayDepth[mat]ArrayDepth[AbsArg[mat]]Dimensions[mat]Dimensions[AbsArg[mat]]AbsArg[array] gives an array of {abs,arg} pairs:
AbsArg[PauliMatrix[2]]This can be turned into a pair {Abs[array],Arg[array]} using Transpose:
Transpose[AbsArg[PauliMatrix[2]], RotateLeft[{1, 2, 3}]]ComplexExpand assumes variables to be real:
ComplexExpand[AbsArg[I Exp[x / 2]]]In general, variables are assumed to be complex, which may prevent simplification:
AbsArg[I Exp[x / 2]]Use Simplify and FullSimplify to simplify the results of ReIm:
ComplexExpand[AbsArg[r Exp[I θ]]]Simplify[%, r > 0 && -Pi < θ ≤ Pi]FullSimplify[AbsArg[Log[Sign[z]]], z < 0]AbsArg converts complex numbers to their polar representation:
AbsArg[1 + 2I]ToPolarCoordinates converts pairs of real numbers to their polar representation:
ToPolarCoordinates[{1, 2}]AbsArg can be viewed as the composition of ReIm and ToPolarCoordinates:
AbsArg[3 + 4I] === ToPolarCoordinates[ReIm[3 + 4I]]AbsArgPlot plots the magnitude of a function colored by the phase:
AbsArgPlot[ArcSin[x], {x, -5, 5}]Plot[Abs[ArcSin[x]], {x, -5, 5}]ComplexPlot plots the phase of a function using color and shades by the magnitude:
ComplexPlot[Sin[z] ^ 3 / (z + 1) ^ 4, {z, -5 - 5I, 5 + 5I}]DensityPlot[Arg[Sin[x + I * y] ^ 3 / (x + I * y + 1) ^ 4], {x, -5, 5}, {y, -5, 5}]ComplexPlot3D plots the magnitude of a function as height and colors using the phase:
ComplexPlot3D[Sin[z] ^ 3 / (z + 1) ^ 4, {z, -5 - 5I, 5 + 5I}]Plot3D[Abs[Sin[x + I * y] ^ 3 / (x + I * y + 1) ^ 4], {x, -5, 5}, {y, -5, 5}]Possible Issues (1)
Substituting a list l for z in the output of AbsArg[z] is different from directly evaluating AbsArg[l]:
AbsArg[{1, I, 0}]AbsArg[z] /. z -> {1, 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}];
AbsArg[arr] === Transpose[(AbsArg[z] /. z -> arr ), RotateRight@ Range [ ArrayDepth[arr] + 1]]See Also
Abs Arg FromPolarCoordinates AngleVector ReIm AbsArgPlot BodePlot
Function Repository: ComplexToPolar
Related Guides
History
Text
Wolfram Research (2015), AbsArg, Wolfram Language function, https://reference.wolfram.com/language/ref/AbsArg.html.
CMS
Wolfram Language. 2015. "AbsArg." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AbsArg.html.
APA
Wolfram Language. (2015). AbsArg. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AbsArg.html
BibTeX
@misc{reference.wolfram_2026_absarg, author="Wolfram Research", title="{AbsArg}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/AbsArg.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_absarg, organization={Wolfram Research}, title={AbsArg}, year={2015}, url={https://reference.wolfram.com/language/ref/AbsArg.html}, note=[Accessed: 12-June-2026]}