Complexity
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
This page consists of two parts: firstly, a brief tutorial of complex math we'll need in 6.200 starting next week; and secondly, some exercises involving working with complex numbers. We'll cover some elements of this in class next week as well, but it's worth getting a head start here.
Table of Contents
1) Tutorial: Complex Numbers
Complex numbers are central to a number of techniques discussed in this class. As such, we'll use the first parts of this page to talk a bit about the nature of complex numbers, but with a particular focus on algebraic and geometric interpretations of operations on complex numbers. Starting next week, we'll explore the ways that we can use these representations to make solving circuits easier.
1.1) Graphical Representations of Real and Complex Numbers
To start discussing complex numbers, we'll first consider the real numbers (such as 10, -4, 0.3, -2.2, \pi, etc.). A real number can be represented as a point along an infinite one-dimensional number line, which we'll call the real axis, shown below:
Any real number can be represented by a single point on this line. For example, the blue dot above represents the real number \pi\over 2.
You may already be familiar with complex numbers written in their rectangular form (also called the {\it Cartesian form}), which separates a complex number into its real and imaginary parts. Complex numbers in rectangular form are written as a_0 + b_0j, where both a_0 and b_0 are themselves real numbers, and j is the imaginary unit \sqrt{-1}. Note that throughout this course, as in many engineering disciplines, we will use the letter j to represent the imaginary unit \sqrt{-1}. Some other disciplines use the letter i to represent the imaginary unit, but in engineering, the letter i is traditionally reserved for electrical current. A complex number can be represented using two real numbers; as such, we can represent a complex number as a point in a two-dimensional space that we'll refer to as the complex plane. Below is a diagram showing a portion of the complex plane, with the number 3+4j indicated as a point:
1.2) Polar Form
Importantly, we can think of this number as a vector in the complex plane, as shown below. This vector has a magnitude (let's call it r) and an angle (\phi) in the complex plane.
This representation opens the door to some interesting geometric/graphical interpretation, which can help us reason about operations on complex numbers. To start with, we can define r and \phi in terms of a_0 and b_0:
We can also define a_0 and b_0 in terms of r and \phi:
From there, we can rewrite our rectangular form as r(\cos\phi + j\sin\phi), which is called the trigonometric form.
And moving a step further, we can use Euler's equation (e^{j\theta} = \cos\theta + j\sin\theta) to express our complex number as re^{j\phi}. This form, where we express a complex number in terms of its magnitude and angle (often referred to as its phase) in the complex plane, is referred to as polar form (also sometimes called the exponential form).
Polar form is the primary form we'll use throughout this class. However, it is worth noting that both rectangular and polar forms have their uses: certain operations are easier to perform and/or to understand when working with one form, versus the other, as we'll see in the following sections.
Note also that the polar representation of a number is not unique; that is to say that there are many different ways to represent the same number in polar form. Since increasing \phi involves increasing the angle, any number re^{j\phi} could also (equivalently) be represented by re^{j\left(\phi+2\pi\right)}. One way to see this is to note that both the real part a_0 = r\cos(\phi) and b_0 = r\sin(\phi) are both periodic functions of \phi, with a period of 2\pi.
1.3) Basic Operations
Next, let's look at arithmetic and geometric interpretations of various operations on complex numbers. With any operation, we have a choice of how we want to represent numbers; and as we'll see, there is no universal right answer for the question of "which representation is best?" Rather, the operation we perform determines the form we want to use.
1.3.1) Addition
Let's start by considering the addition of two complex numbers, c_1 and c_2. For addition, rectangular form tends to be the easiest form, since the real and imaginary parts of these numbers add independently. That is, for imaginary numbers c_1 = {\color{red} a_1} + {\color{blue} b_1}j and c_2 = {\color{red} a_2} + {\color{blue} b_2}j, we have:
The result is a new complex number, whose real part is a_1 + a_2, and whose imaginary part is b_1 + b_2.
Geometrically, this means that, when viewing complex numbers as vectors in the complex plane, they add like regular vectors. For example, consider the following depiction of adding two complex numbers. On the left, we show vectors representing two numbers c_1 and c_2. On the right, we show those vectors stacked "end-to-end," as well as their sum:
Subtraction works similarly in that the real parts and imaginary parts subtract independently:
1.3.2) Multiplication
Now let's consider the multiplication of two complex numbers, c_1 and c_2. We could approach this by multiplying the rectangular forms together and applying the "FOIL" rule to compute the product:
However, this process is a bit of a pain. It's already tedious with only two numbers, and it gets even more painful when when we are considering the product of more than just two numbers. However, thinking about the product becomes a bit easier if we represent both numbers in their polar forms (c_1 = {\color{red}r_1}e^{j{\color{blue}\phi_1}} and c_2 = {\color{red}r_2}e^{j{\color{blue}\phi_2}}), which then takes substantially less effort:
This is a new complex number with magnitude r_1r_2, and with angle \phi_1+\phi_2: the magnitudes multiply, and the angles sum. It's worth noting that while complex numbers add like vectors, they do not follow the normal rules for vector multiplication. Rather, multiplication of complex numbers has a different interesting geometric interpretation that involves rotating through the complex plane (by way of adding the angles).
Division works in a similar way, producing a new complex number whose magnitude is a ratio of the input magnitudes and whose angle is the difference of the input angles:
1.3.3) Exponentiation
Finally (for now), let's consider raising a complex number c_1 to a power. As with multiplication, we {\it could} do this using rectangular form, but given the relationship between exponentiation and multiplication (and the fact that multiplication was way easier in polar form than rectangular form), polar form seems like a better bet. If we represent c_1 as {\color{red}r_1}e^{j{\color{blue}\phi_1}}, then we have:
Note that this result is a new complex number whose magnitude is r_1^x and whose angle is \phi_1\cdot x. For example:
In this example, c_1 = 1+j. |c_1| = \sqrt{2} and \angle c_1 = {\pi\over 4}, so it can be represented as c_1 = 1+j = \sqrt{2}e^{j{\pi\over 4}}, which is shown in blue above. We can also see two results: squaring c_1 gives us a new number whose angle is 2\angle c_1 = {\pi\over 2} and whose magnitude is |c_1|^2 = 2. This number is 2e^{j{\pi\over 2}}, or 2j, which is shown in black above. Similarly, we can find the square root of c_1 by raising it to the 1\over 2 power, which gives us a new number whose magnitude is \sqrt{|c_1|} = \sqrt[4]{2} and whose angle is {\angle c_1 \over 2} = {\pi\over 8}. This number is shown in red above.
1.3.4) Operations: Summary
Developing facility with moving between these representations is a useful skill to develop as we work through 6.200, in part because we're going to use complex numbers heavily when reasoning about our systems' responses to sinusoidal inputs. But for now, we hope that what you take away from these notes is an exposure to complex numbers (particularly in polar form and a geometric interpretation of those numbers; as well as an idea about when each representation is useful. Specifically,
- For addition and subtraction, rectangular form tends to be easiest.
- For multiplication, division, and exponentiation, polar form tends to be easiest.
1.4) Real Numbers in Rectangular and Polar Form
It is perhaps worth mentioning at this point that we can use any of the above representations to represent a purely real number as well. If we have a positive, real number n, that's already represented in rectangular form, where the imaginary part just happens to be 0. And so we can bring all of the nice geometric interpretation from above to bear on real numbers as well (those interpretations aren't limited to numbers with a nonzero imaginary part!).
In polar form, we can gain some insight by plotting that number as a vector on the complex plane, where we can see that this number has a magnitude of n, and it has an angle of 0, so it can be represented as n=ne^{j0}:
In the case of a negative, real-valued number (let's call it -n), we see something slightly different. Here, the magnitude is n, but the angle is \pi, so we can represent it as -n = ne^{j\pi}:
If you ever wondered about Euler's identity, e^{j\pi} = -1, now we can make sense of it! All that that's saying is that negative one is a number whose magnitude is 1 and whose angle in the complex plane is \pi!
2) Exercises: Conversions/Operations
Determine the real and imaginary parts, as well as the magnitude and phase, of
each of the following expressions. Enter your answer as a Python expression,
which can depend on pi
, e
, and/or sqrt
. These should be solvable without
a calculator, but note that you may find it useful to convert some or all parts
of some expressions between representations as you're working toward an answer.
While there may be multiple correct answers, the checkers on this page are expecting all magnitudes to be positive and all phases (angles) \theta to be expressed in the range -\pi < \theta \leq \pi.