Complex number

A complex number is a number that can be expressed in the form a + bi, where a and b are real numbers and i is the imaginary unit, which satisfies the equation i2 = −1. In this expression, a is the real part and b is the imaginary part of the complex number. Complex numbers extend the concept of the one-dimensional number line to the two-dimensional complex plane (also called Argand plane) by using the horizontal axis for the real part and the vertical axis for the imaginary part. The complex number a + bi can be identified with the point (a, b) in the complex plane. A complex number whose real part is zero is said to be purely imaginary, whereas a complex number whose imaginary part is zero is a real number. In this way, the complex numbers contain the ordinary real numbers while extending them in order to solve problems that cannot be solved with real numbers alone.

A complex number can be visually represented as a pair of numbers (a, b) forming a vector on a diagram called an Argand diagram, representing the complex plane. "Re" is the real axis, "Im" is the imaginary axis, and i is the imaginary unit which satisfies the equation i2 = −1.

Definition

An illustration of the complex plane. The real part of a complex number z = x + iy is x, and its imaginary part is y.
A complex number is a number of the form a + bi, where a and b are real numbers and i is an imaginary unit, satisfying i2 = −1. For example, −3.5 + 2i is a complex number.
The real number a is called the real part of the complex number a + bi; the real number b is called the imaginary part of a + bi. By this convention the imaginary part does not include the imaginary unit: hence b, not bi, is the imaginary part.The real part of a complex number z is denoted by Re(z) or ℜ(z); the imaginary part of a complex number z is denoted by Im(z) or ℑ(z). For example,
\begin{align}
  \operatorname{Re}(-3.5 + 2i) &= -3.5 \\
  \operatorname{Im}(-3.5 + 2i) &= 2
\end{align}
Hence, in terms of its real and imaginary parts, a complex number z is equal to \operatorname{Re}(z) + \operatorname{Im}(z) \cdot i . This expression is sometimes known as the Cartesian form of z.
A real number a can be regarded as a complex number a + 0i whose imaginary part is 0. A purely imaginary number bi is a complex number 0 + bi whose real part is zero. It is common to write a for a + 0i and bi for 0 + bi. Moreover, when the imaginary part is negative, it is common to write abi with b > 0 instead of a + (−b)i, for example 3 − 4i instead of 3 + (−4)i.
The set of all complex numbers is denoted by , \mathbf{C} or \mathbb{C}.

Notation

Some authors write a + ib instead of a + bi. In some disciplines, in particular electromagnetism and electrical engineering, j is used instead of i, since i is frequently used for electric current. In these cases complex numbers are written as a + bj or a + jb.

Complex plane

Main article: Complex plane
Figure 1: A complex number plotted as a point (red) and position vector (blue) on an Argand diagram; a+bi is the rectangular expression of the point.
 
A complex number can be viewed as a point or position vector in a two-dimensional Cartesian coordinate system called the complex plane or Argand diagram (see Pedoe 1988 and Solomentsev 2001), named after Jean-Robert Argand. The numbers are conventionally plotted using the real part as the horizontal component, and imaginary part as vertical (see Figure 1). These two values used to identify a given complex number are therefore called its Cartesian, rectangular, or algebraic form.
A position vector may also be defined in terms of its magnitude and direction relative to the origin. These are emphasized in a complex number's polar form. Using the polar form of the complex number in calculations may lead to a more intuitive interpretation of mathematical results. Notably, the operations of addition and multiplication take on a very natural geometric character when complex numbers are viewed as position vectors: addition corresponds to vector addition while multiplication corresponds to multiplying their magnitudes and adding their arguments (i.e. the angles they make with the x axis). Viewed in this way the multiplication of a complex number by i corresponds to rotating the position vector counterclockwise by a quarter turn (90°) about the origin: (a+bi)i = ai+bi^2 = -b+ai

Relations

Equality

Two complex numbers are equal if and only if both their real and imaginary parts are equal. In symbols:
z_{1} = z_{2} \, \, \leftrightarrow \, \, ( \operatorname{Re}(z_{1}) = \operatorname{Re}(z_{2}) \, \and \, \operatorname{Im} (z_{1}) = \operatorname{Im} (z_{2}))

Ordering

Because complex numbers are naturally thought of as existing on a two-dimensional plane, there is no natural linear ordering on the set of complex numbers.
There is no linear ordering on the complex numbers that is compatible with addition and multiplication. Formally, we say that the complex numbers cannot have the structure of an ordered field. This is because any square in an ordered field is at least 0, but i2 = -1.

Elementary operations

Conjugation

Main article: Complex conjugate
Geometric representation of z and its conjugate \bar{z} in the complex plane
The complex conjugate of the complex number z = x + yi is defined to be xyi. It is denoted \bar{z} or z*.
Formally, for any complex number z:
\bar{z} = \operatorname{Re}(z) - \operatorname{Im}(z) \cdot i
Geometrically, \bar{z} is the "reflection" of z about the real axis. In particular, conjugating twice gives the original complex number: \bar{\bar{z}}=z.
The real and imaginary parts of a complex number z can be extracted using the conjugate:
\operatorname{Re}\,(z) = \tfrac{1}{2}(z+\bar{z}), \,
\operatorname{Im}\,(z) = \tfrac{1}{2i}(z-\bar{z}). \,
Moreover, a complex number is real if and only if it equals its conjugate.
Conjugation distributes over the standard arithmetic operations:
\overline{z+w} = \bar{z} + \bar{w}, \,
\overline{z-w} = \bar{z} - \bar{w}, \,
\overline{z w} = \bar{z} \bar{w}, \,
\overline{(z/w)} = \bar{z}/\bar{w}. \,
The reciprocal of a nonzero complex number z = x + yi is given by
\frac{1}{z}=\frac{\bar{z}}{z \bar{z}}=\frac{\bar{z}}{x^2+y^2}.
This formula can be used to compute the multiplicative inverse of a complex number if it is given in rectangular coordinates. Inversive geometry, a branch of geometry studying reflections more general than ones about a line, can also be expressed in terms of complex numbers.

Addition and subtraction

Addition of two complex numbers can be done geometrically by constructing a parallelogram.
Complex numbers are added by adding the real and imaginary parts of the summands. That is to say:
(a+bi) + (c+di) = (a+c) + (b+d)i.\
Similarly, subtraction is defined by
(a+bi) - (c+di) = (a-c) + (b-d)i.\
Using the visualization of complex numbers in the complex plane, the addition has the following geometric interpretation: the sum of two complex numbers A and B, interpreted as points of the complex plane, is the point X obtained by building a parallelogram three of whose vertices are O, A and B. Equivalently, X is the point such that the triangles with vertices O, A, B, and X, B, A, are congruent.

Multiplication and division

The multiplication of two complex numbers is defined by the following formula:
(a+bi) (c+di) = (ac-bd) + (bc+ad)i.\
In particular, the square of the imaginary unit is −1:
i^2 = i \times i = -1.\
The preceding definition of multiplication of general complex numbers follows naturally from this fundamental property of the imaginary unit. Indeed, if i is treated as a number so that di means d times i, the above multiplication rule is identical to the usual rule for multiplying two sums of two terms.
(a+bi) (c+di) = ac + bci + adi + bidi \ (distributive law)
 = ac + bidi + bci + adi \ (commutative law of addition—the order of the summands can be changed)
 = ac + bdi^2 + (bc+ad)i \ (commutative and distributive laws)
 = (ac-bd) + (bc + ad)i \ (fundamental property of the imaginary unit).
The division of two complex numbers is defined in terms of complex multiplication, which is described above, and real division. Where at least one of c and d is non-zero:
\,\frac{a + bi}{c + di} = \left({ac + bd \over c^2 + d^2}\right) + \left( {bc - ad \over c^2 + d^2} \right)i.
Division can be defined in this way because of the following observation:
\,\frac{a + bi}{c + di} = \frac{\left(a + bi\right) \cdot \left(c - di\right)}{\left (c + di\right) \cdot \left (c - di\right)} = \left({ac + bd \over c^2 + d^2}\right) + \left( {bc - ad \over c^2 + d^2} \right)i.
As shown earlier, cdi is the complex conjugate of the denominator c + di. The real part c and the imaginary part d of the denominator must not both be zero for division to be defined.

Square root

See also: Square roots of negative and complex numbers
The square roots of a + bi (with b ≠ 0) are  \pm (\gamma + \delta i), where
\gamma = \sqrt{\frac{a + \sqrt{a^2 + b^2}}{2}}
and
\delta = \sgn (b) \sqrt{\frac{-a + \sqrt{a^2 + b^2}}{2}},
where sgn is the signum function. This can be seen by squaring  \pm (\gamma + \delta i) to obtain a + bi.Here \sqrt{a^2 + b^2} is called the modulus of a + bi, and the square root with non-negative real part is called the principal square root; also \sqrt{a^2 + b^2}= \sqrt{z\bar{z}}, where  z = a + bi .

Polar form

Main article: Polar coordinate system
Figure 2: The argument φ and modulus r locate a point on an Argand diagram; r(\cos \varphi + i \sin \varphi) or r e^{i\varphi} are polar expressions of the point.

Absolute value and argument

An alternative way of defining a point P in the complex plane, other than using the x- and y-coordinates, is to use the distance of the point from O, the point whose coordinates are (0, 0) (the origin), together with the angle subtended between the positive real axis and the line segment OP in a counterclockwise direction. This idea leads to the polar form of complex numbers.
The absolute value (or modulus or magnitude) of a complex number z = x + yi is
\textstyle r=|z|=\sqrt{x^2+y^2}.\,
If z is a real number (i.e., y = 0), then r = | x |. In general, by Pythagoras' theorem, r is the distance of the point P representing the complex number z to the origin. The square of the absolute value is
\textstyle |z|^2=z\bar{z}=x^2+y^2.\,
where \bar{z} is the complex conjugate of z.
The argument of z (in many applications referred to as the "phase") is the angle of the radius OP with the positive real axis, and is written as \arg(z). As with the modulus, the argument can be found from the rectangular form x+yi:
\varphi = \arg(z) =
\begin{cases}
\arctan(\frac{y}{x}) & \mbox{if } x > 0 \\
\arctan(\frac{y}{x}) + \pi & \mbox{if } x < 0  \mbox{ and } y \ge 0\\
\arctan(\frac{y}{x}) - \pi & \mbox{if } x < 0 \mbox{ and } y < 0\\
\frac{\pi}{2} & \mbox{if } x = 0 \mbox{ and } y > 0\\
-\frac{\pi}{2} & \mbox{if } x = 0 \mbox{ and } y < 0\\
\mbox{indeterminate } & \mbox{if } x = 0 \mbox{ and } y = 0.
\end{cases}
The value of φ must always be expressed in radians. It can increase by any integer multiple of and still give the same angle. Hence, the arg function is sometimes considered as multivalued. Normally, as given above, the principal value in the interval (−π,π] is chosen. Values in the range [0,2π) are obtained by adding if the value is negative. The polar angle for the complex number 0 is indeterminate, but arbitrary choice of the angle 0 is common.
The value of φ equals the result of atan2: \varphi = \mbox{atan2}(\mbox{imaginary}, \mbox{real}).
Together, r and φ give another way of representing complex numbers, the polar form, as the combination of modulus and argument fully specify the position of a point on the plane. Recovering the original rectangular co-ordinates from the polar form is done by the formula called trigonometric form
 z = r(\cos \varphi + i\sin \varphi ).\,
Using Euler's formula this can be written as
z = r e^{i \varphi}.\,
Using the cis function, this is sometimes abbreviated to
 z = r \operatorname{cis} \varphi. \,
In angle notation, often used in electronics to represent a phasor with amplitude r and phase φ, it is written as
z = r \ang \varphi . \,

Multiplication and division in polar form

Multiplication of 2 + i (blue triangle) and 3 + i (red triangle). The red triangle is rotated to match the vertex of the blue one and stretched by 5, the length of the hypotenuse of the blue triangle.
 
Formulas for multiplication, division and exponentiation are simpler in polar form than the corresponding formulas in Cartesian coordinates. Given two complex numbers z1 = r1(cos φ1 + i sin φ1) and z2 = r2(cos φ2 + i sin φ2), because of the well-known trigonometric identities
 \cos(a)\cos(b) - \sin(a)\sin(b) = \cos(a + b)
 \cos(a)\sin(b) + \sin(a)\cos(b) = \sin(a + b)
we may derive
z_1 z_2 = r_1 r_2 (\cos(\varphi_1 + \varphi_2) + i \sin(\varphi_1 + \varphi_2)).\,
In other words, the absolute values are multiplied and the arguments are added to yield the polar form of the product. For example, multiplying by i corresponds to a quarter-turn counter-clockwise, which gives back i2 = −1. The picture at the right illustrates the multiplication of
(2+i)(3+i)=5+5i. \,
Since the real and imaginary part of 5 + 5i are equal, the argument of that number is 45 degrees, or π/4 (in radian). On the other hand, it is also the sum of the angles at the origin of the red and blue triangles are arctan(1/3) and arctan(1/2), respectively. Thus, the formula
\frac{\pi}{4} = \arctan\frac{1}{2} + \arctan\frac{1}{3}
holds. As the arctan function can be approximated highly efficiently, formulas like this—known as Machin-like formulas—are used for high-precision approximations of π.
Similarly, division is given by
\frac{z_1}{ z_2} = \frac{r_1}{ r_2} \left(\cos(\varphi_1 - \varphi_2) + i \sin(\varphi_1 - \varphi_2)\right).