Argument (polar angle) of a complex number
This functionality does not run in MATLAB.
arg(z) returns the argument of the complex
arg(x, y) returns the argument of the complex
number with real part
x and imaginary part
This function is also known as
atan2 in other
The argument of a non-zero complex number z = x + i y =
|z| ei ϕ is
its real polar angle ϕ.
the principal value
For x ≠ 0, y ≠
0, it is given by
An error occurs if
arg is called with two
arguments and either one of the arguments
a non-real numerical value. Symbolic arguments are assumed to be real.
On the other hand, if
arg is called with
only one argument
x + I*y, it is not assumed that
A floating-point number is returned if one argument is given which is a floating-point number; or if two arguments are given, both of them are numerical and at least one of them is a floating-point number.
If the sign of the arguments can be determined, then the result
is expressed in terms of
Cf. Example 2. Otherwise, a
symbolic call of
arg is returned. Numerical factors
are eliminated from the first argument. Cf. Example 3.
A symbolic call to
arg returned has only
arg(0,0), or equivalently
An alternative representation is . Cf. Example 4.
When called with floating-point arguments, the function is sensitive
to the environment variable
DIGITS which determines the numerical
working precision. Properties of identifiers are taken into account.
We demonstrate some calls with exact and symbolic input data:
arg(2, 3), arg(x, 4), arg(4, y), arg(x, y), arg(10, y + PI)
arg is called with two arguments, the
arguments are implicitly assumed to be real, which allows some additional
simplifications compared to a call with only one argument:
arg(1, y), arg(1 + I*y)
arg(x, infinity), arg(-infinity, 3), arg(-infinity, -3)
Floating point values are computed for floating-point arguments:
arg(2.0, 3), arg(2, 3.0), arg(10.0^100, 10.0^(-100))
assume(x > 0): assume(y < 0): arg(x, y)
assume(x < 0): assume(y > 0): arg(x, y)
assume(x <> 0): arg(x, 3)
Certain simplifications may occur in unevaluated calls. In particular, numerical factors are eliminated from the first argument:
arg(3*x, 9*y), arg(-12*sqrt(2)*x, 12*y)
convert symbolic calls of
arg to the logarithmic
rewrite(arg(x, y), ln)
limit(arg(x, x^2/(1+x)), x = infinity)
series(arg(x, x^2), x = 1, 4, Real)