An argument of the complex number, denoted, is defined in two equivalent ways:
Geometrically, in the complex plane, as the 2D polar angle from the positive real axis to the vector representing. The numeric value is given by the angle in radians and is positive if measured counterclockwise.
The names magnitude, for the modulus, and phase, for the argument, are sometimes used equivalently. Under both definitions, it can be seen that the argument of any non-zero complex number has many possible values: firstly, as a geometrical angle, it is clear that whole circle rotations do not change the point, so angles differing by an integer multiple of radians are the same, as reflected by figure 2 on the right. Similarly, from the periodicity of sine| and cosine|, the second definition also has this property. The argument of zero is usually left undefined.
Principal value
Because a complete rotation around the origin leaves a complex number unchanged, there are many choices which could be made for by circling the origin any number of times. This is shown in figure 2, a representation of the multi-valuedfunction, where a vertical line cuts the surface at heights representing all the possible choices of angle for that point. When a well-defined function is required then the usual choice, known as the principal value, is the value in the open-closed interval, that is from to radians, excluding rad itself. This represents an angle of up to half a complete circle from the positive real axis in either direction. Some authors define the range of the principal value as being in the closed-open interval.
Notation
The principal value sometimes has the initial letter capitalized as in, especially when a general version of the argument is also being considered. Note that notation varies, so and may be interchanged in different texts. The set of all possible values of the argument can be written in terms of as: Likewise
If a complex number is known in terms of its real and imaginary parts, then the function that calculates the principal value is called the two-argument arctangent function atan2: The atan2 function is available in the math libraries of many programming languages, and usually returns a value in the range. Many texts say the value is given by, as is slope, and converts slope to angle. This is correct only when, so the quotient is defined and the angle lies between and, but extending this definition to cases where is not positive is relatively involved. Specifically, one may define the principal value of the argument separately on the two half-planes and ,,, and then patch together. A compact expression with 4 overlapping half-planes is For the variant where is defined to lie in the interval, the value can be found by adding to the value above when it is negative. Alternatively, the principal value can be calculated in a uniform way using the tangent half-angle formula, the function being defined over the complex plane but excluding the origin: This is based on a parametrization of the circle by rational functions. This version of is not stable enough for floating pointcomputational use but can be used in symbolic calculation. A variant of the last formula which avoids overflow is sometimes used in high precision computation:
Identities
One of the main motivations for defining the principal value is to be able to write complex numbers in modulus-argument form. Hence for any complex number, This is only really valid if is non-zero but can be considered as valid also for if is considered as being an indeterminate form rather than as being undefined. Some further identities follow. If and are two non-zero complex numbers, then If and is any integer, then