# Complex Numbers

This chapter introduces complex numbers, beginning with factoring polynomials, and proceeding on to the complex plane and Euler's identity.

## Factoring a Polynomial

Remember factoring polynomials''? Consider the second-order polynomial

It is second-order because the highest power of is (only non-negative integer powers of are allowed in this context). The polynomial is also monic because its leading coefficient, the coefficient of , is . By the fundamental theorem of algebra (discussed further in §2.4), there are exactly two roots (or zeros) of any second order polynomial. These roots may be real or complex (to be defined). For now, let's assume they are both real and denote them by and . Then we have and , and we can write

This is the factored form of the monic polynomial . (For a non-monic polynomial, we may simply divide all coefficients by the first to make it monic, and this doesn't affect the zeros.) Multiplying out the symbolic factored form gives

Comparing with the original polynomial, we find we must have

This is a system of two equations in two unknowns. Unfortunately, it is a nonlinear system of two equations in two unknowns.2.1 Nevertheless, because it is so small, the equations are easily solved. In beginning algebra, we did them by hand. However, nowadays we can use a software tool such as Matlab or Octave to solve very large systems of linear equations.

The factored form of this simple example is

Note that polynomial factorization rewrites a monic th-order polynomial as the product of first-order monic polynomials, each of which contributes one zero (root) to the product. This factoring business is often used when working with digital filters [68].

The general second-order (real) polynomial is

 (2.1)

where the coefficients are any real numbers, and we assume since otherwise it would not be second order. Some experiments plotting for different values of the coefficients leads one to guess that the curve is always a scaled and translated parabola. The canonical parabola centered at is given by

 (2.2)

where the magnitude of determines the width of the parabola, and provides an arbitrary vertical offset. If , the parabola has the minimum value at ; when , the parabola reaches a maximum at (also equal to ). If we can find in terms of for any quadratic polynomial, then we can easily factor the polynomial. This is called completing the square. Multiplying out the right-hand side of Eq.(2.2) above, we get

 (2.3)

Equating coefficients of like powers of to the general second-order polynomial in Eq.(2.1) gives

Using these answers, any second-order polynomial can be rewritten as a scaled, translated parabola

In this form, the roots are easily found by solving to get

This is the general quadratic formula. It was obtained by simple algebraic manipulation of the original polynomial. There is only one catch.'' What happens when is negative? This introduces the square root of a negative number which we could insist does not exist.'' Alternatively, we could invent complex numbers to accommodate it.

## Complex Roots

As a simple example, let , , and , i.e.,

As shown in Fig.2.1, this is a parabola centered at (where ) and reaching upward to positive infinity, never going below . It has no real zeros. On the other hand, the quadratic formula says that the roots'' are given formally by . The square root of any negative number can be expressed as , so the only new algebraic object is . Let's give it a name:

Then, formally, the roots of are , and we can formally express the polynomial in terms of its roots as

We can think of these as imaginary roots'' in the sense that square roots of negative numbers don't really exist, or we can extend the concept of roots'' to allow for complex numbers, that is, numbers of the form

where and are real numbers, and .

It can be checked that all algebraic operations for real numbers2.2 apply equally well to complex numbers. Both real numbers and complex numbers are examples of a mathematical field.2.3 Fields are closed with respect to multiplication and addition, and all the rules of algebra we use in manipulating polynomials with real coefficients (and roots) carry over unchanged to polynomials with complex coefficients and roots. In fact, the rules of algebra become simpler for complex numbers because, as discussed in the next section, we can always factor polynomials completely over the field of complex numbers while we cannot do this over the reals (as we saw in the example ).

## Fundamental Theorem of Algebra

This is a very powerful algebraic tool.2.4 It says that given any polynomial

we can always rewrite it as

where the points are the polynomial roots, and they may be real or complex.

## Complex Basics

This section introduces various notation and terms associated with complex numbers. As discussed above, complex numbers arise by introducing the square-root of as a primitive new algebraic object among real numbers and manipulating it symbolically as if it were a real number itself:

Mathematicians and physicists often use instead of as . The use of is common in engineering where is more often used for electrical current.

As mentioned above, for any negative number , we have

where denotes the absolute value of . Thus, every square root of a negative number can be expressed as times the square root of a positive number.

By definition, we have

and so on. Thus, the sequence , is a periodic sequence with period , since . (We'll learn later that the sequence is a sampled complex sinusoid having frequency equal to one fourth the sampling rate.)

Every complex number can be written as

where and are real numbers. We call the real part and the imaginary part. We may also use the notation

Note that the real numbers are the subset of the complex numbers having a zero imaginary part ().

The rule for complex multiplication follows directly from the definition of the imaginary unit :

In some mathematics texts, complex numbers are defined as ordered pairs of real numbers , and algebraic operations such as multiplication are defined more formally as operations on ordered pairs, e.g., . However, such formality tends to obscure the underlying simplicity of complex numbers as a straightforward extension of real numbers to include .

It is important to realize that complex numbers can be treated algebraically just like real numbers. That is, they can be added, subtracted, multiplied, divided, etc., using exactly the same rules of algebra (since both real and complex numbers are mathematical fields). It is often preferable to think of complex numbers as being the true and proper setting for algebraic operations, with real numbers being the limited subset for which .

## The Complex Plane

We can plot any complex number in a plane as an ordered pair , as shown in Fig.2.2. A complex plane (or Argand diagram) is any 2D graph in which the horizontal axis is the real part and the vertical axis is the imaginary part of a complex number or function. As an example, the number has coordinates in the complex plane while the number has coordinates .

Plotting as the point in the complex plane can be viewed as a plot in Cartesian or rectilinear coordinates. We can also express complex numbers in terms of polar coordinates as an ordered pair , where is the distance from the origin to the number being plotted, and is the angle of the number relative to the positive real coordinate axis (the line defined by and ). (See Fig.2.2.)

Using elementary geometry, it is quick to show that conversion from rectangular to polar coordinates is accomplished by the formulas

where denotes the arctangent of (the angle in radians whose tangent is ), taking the quadrant of the vector into account. We will take in the range to (although we could choose any interval of length radians, such as 0 to , etc.).

In Matlab and Octave, atan2(y,x) performs the quadrant-sensitive'' arctangent function. On the other hand, atan(y/x), like the more traditional mathematical notation does not know'' the quadrant of , so it maps the entire real line to the interval . As a specific example, the angle of the vector (in quadrant I) has the same tangent as the angle of (in quadrant III). Similarly, (quadrant II) yields the same tangent as (quadrant IV).

The formula for converting rectangular coordinates to radius , follows immediately from the Pythagorean theorem, while the follows from the definition of the tangent function itself.

Similarly, conversion from polar to rectangular coordinates is simply

These follow immediately from the definitions of cosine and sine, respectively.

## More Notation and Terminology

It's already been mentioned that the rectilinear coordinates of a complex number in the complex plane are called the real part and imaginary part, respectively.

We also have special notation and various names for the polar coordinates of a complex number :

The complex conjugate of is denoted (or ) and is defined by

where, of course, .

In general, you can always obtain the complex conjugate of any expression by simply replacing with . In the complex plane, this is a vertical flip about the real axis; i.e., complex conjugation replaces each point in the complex plane by its mirror image on the other side of the axis.

## Elementary Relationships

From the above definitions, one can quickly verify

Let's verify the third relationship which states that a complex number multiplied by its conjugate is equal to its magnitude squared:

 (2.4)

## Euler's Identity

Since is the algebraic expression of in terms of its rectangular coordinates, the corresponding expression in terms of its polar coordinates is

There is another, more powerful representation of in terms of its polar coordinates. In order to define it, we must introduce Euler's identity:

 (2.5)

A proof of Euler's identity is given in the next chapter. Before, the only algebraic representation of a complex number we had was , which fundamentally uses Cartesian (rectilinear) coordinates in the complex plane. Euler's identity gives us an alternative representation in terms of polar coordinates in the complex plane:

We'll call the polar form of the complex number , in contrast with the rectangular form . Polar form often simplifies algebraic manipulations of complex numbers, especially when they are multiplied together. Simple rules of exponents can often be used in place of messier trigonometric identities. In the case of two complex numbers being multiplied, we have

A corollary of Euler's identity is obtained by setting to get

This has been called the most beautiful formula in mathematics'' due to the extremely simple form in which the fundamental constants , and 0, together with the elementary operations of addition, multiplication, exponentiation, and equality, all appear exactly once.

For another example of manipulating the polar form of a complex number, let's again verify , as we did above in Eq.(2.4), but this time using polar form:

As mentioned in §2.7, any complex expression can be conjugated by replacing by wherever it occurs. This implies , as used above. The same result can be obtained by using Euler's identity to expand into and negating the imaginary part to obtain , where we used also the fact that cosine is an even function ( ) while sine is odd ( ).

We can now easily add a fourth line to that set of examples:

Thus, for every .

Euler's identity can be used to derive formulas for sine and cosine in terms of :

Similarly, , and we obtain the following classic identities:

## De Moivre's Theorem

As a more complicated example of the value of the polar form, we'll prove De Moivre's theorem:

Working this out using sum-of-angle identities from trigonometry is laborious (see §3.13 for details). However, using Euler's identity, De Moivre's theorem simply falls out'':

Moreover, by the power of the method used to show the result, can be any real number, not just an integer.

## Conclusion

This chapter has covered just enough about complex numbers to enable us to talk about the discrete Fourier transform.

Manipulations of complex numbers in Matlab and Octave are illustrated in §I.1.

To explore further the mathematics of complex variables, see any textbook such as Churchill [15] or LePage [37]. Topics not covered here, but which are important elsewhere in signal processing, include analytic functions, contour integration, analytic continuation, residue calculus, and conformal mapping.

## Complex_Number Problems

Next Section:
Proof of Euler's Identity
Previous Section:
Introduction to the DFT