## Engineering Topics – Differential Equations

A differential equation is an equation that has a derivative in it. A derivative is a rate of change, like velocity. So if you are driving in a car where your velocity from a starting point is v which is some function of time, this can be solved to find your position from a starting point at any time. There are lots of techniques to solve these equations and the study of this scares many students. But the fact is, if you drive a car, pick up a glass of water, throw a ball at a target, your mind subconsciously handles the differential equations that model these activities quite well.

Let’s stick with the car example. Suppose you are 100 metres away from a stop sign or a red traffic light. So you apply the brakes. Let x(t) be your distance from the stop sign in metres at a time t, t be the time in seconds, and (t) be your velocity at time (t). Now you want your distance to the stop sign to decrease from 100 to 0 metres comfortably in say 15 seconds. What about this linear way:

It does stop at the stop sign, but is it comfortable? This equation of a line has a constant slope (rate of change) of −100/15 = −6.67 m/s = −24 km/hr. This means that at the stop sign, you are going 24 km/hr when you hit the brakes hard to stop. The passengers drinking coffee at the time, would not appreciate that. Also, if you are going 100 km/hr at 100 meters away, to follow this profile, you have to slam on the brakes to suddenly get at a speed of 24 km/hr. Well maybe there would be no coffee left to spill at the stop sign.

So this shows that we need to be aware of our speed and our distance to do this comfortably.

What about stopping following this red curve:

This starts at 100 metres and ends at 0 like the linear graph but has a better rate of change profile. The rate of change (that is the velocity) varies on this curve. It is visually seen as the slope of the line tangent to the graph at a point. The grey line shown is an example of a tangent line. Notice that the gradient at the beginning of the curve is high (in the negative direction) but at the end, it is near zero (the slope of a horizontal line is zero). This would be a much smoother stop than a linear approach.

But your mind during this action is not just seeing your distance from the stop sign, it is also sensing your velocity and adjusting it as you get closer to the stop sign. The following is an equation that relates the velocity and position:

$\dot{x}(t)=-0.3[x(t)+1.11]$

If you were to solve this equation for x(t) using differential equation techniques, you would get the equation seen in the graph above. If you were to design a control system (which is what your mind is when performing this action) you would use the above differential equation to control both your position and your velocity.

But even this stopping profile has flaws. Notice that the deceleration at the beginning is quite steep (the slope of a tangent line at t = 0). Perhaps a better profile would be:

This starts with a more gentle deceleration, increases the deceleration until you get closer to the stop sign, then the deceleration decreases until you come to a full stop at the sign.

Regardless of the stopping profile used, your mind controls the braking action to conform to a desired profile based on your current speed (the slope of the tangent line) and your distance from the stop sign. People who are designing driverless cars, robotic arms, aircraft autopilots, etc, use differential equations. And because they are working in three dimensions, these equations can be in the form of matrix and/or vector equations. And the solutions will use complex numbers: all of these topics were covered in my last few posts.

So besides the basic algebraic skills you may be studying or have studied, more advanced topics like this one or those covered in in my last few post are the heart of engineering.

## Engineering Topics – Matrices

If you looked at my last post on complex numbers, the example I used was 1-dimensional, there was only one variable of interest. However, if you include time, the problem is 2-dimensional and we can plot the result on a 2-dimensional coordinate system. But our world is 3-dimensional (4 if you include time). In engineering, there are frequently many more than 3 variables needed to solve a problem. To handle these kind of problems, matrices are needed. Matrices come with their own set of algebra rules, but you don’t need to know these to follow this post. Let’s look at some examples.

### System of Equations

Perhaps the simplest example that looks intuitively correct is using matrices to solve a set of m linear equations with m unknowns. In year 10, students are taught how to solve a system of 2 equations and 2 unknowns. They learn about two methods to solve these: substitution and elimination. These methods can be used for higher number of unknowns but this quickly becomes unwieldy as the number of unknowns increases.

An engineering example using 3 unknowns comes from my experience as an astronautical engineer. I was tasked to model the output of a mechanical gyroscope. A gyroscope is used to measure rotation about a specific direction (axis). This information is used in an inertial navigation system to determine an object’s orientation and velocity. There are several kinds of gyroscopes: mechanical, laser, semiconductor. The one in your smartphone is a semiconductor one. Mechanical ones are still used in aircraft and spacecraft navigation systems because of their long-term stability. However, their electronic output is not directly proportional to the rotational input, there are errors in the output. In an ideal world, the output, v, will be kω = v where ω is the rotation detected (radians/second), v is the output voltage, and k is the conversion factor needed to convert radians/second to volts. But as our world is not ideal, there are errors in the signal produced by the gyroscope. These errors need to be subtracted from the output before it is sent to the navigation system.

The model I used had many more terms in it, but for purposes of this post, I will simplify it to

$k_1\omega_1+k_2\omega_2+k_3\omega_3=v$

where k1ω1 is the desired output in direction 1, and the other two terms are errors introduced from rotations about the other 2 perpendicular directions in 3-dimensional space. For a particular gyroscope, I had to find the k‘s so that the navigation system would know what the actual rotation about direction 1 is.

So the gyroscope was placed on a very accurate test platform where its orientation with respect to the earth’s rotation was accurately known and the platform could also rotate an accurately known amount. So if the gyroscope was subjected to three different orientations/rotations and the output measured at each position, three equations in the 3 k unknowns could be generated. Actually, many more measurements were made. There are errors in the measurements of the outputs and the inputs so I actually used a least squares matrix process (yes, statistics is used in engineering as well) to find the best estimates of the k‘s. But again, for purposes of this post, let’s assume we have perfect knowledge of the inputs and outputs so that only three measurements are needed.

Using different rotation rates about the primary measurement axis and the two perpendicular ones, we generate the following set of equations:

$3k_1+2k_2+1k_3=2.51\\5k_1-5k_2+7k_3=3.82\\6k_1-6k_2-7k_3=4.43$

There is a matrix version of this system of equations:

$\begin{bmatrix}3&2&1\\5&-5&7\\6&-6&-7\end{bmatrix}\begin{bmatrix}k_1\\k_2\\k_3\end{bmatrix}=\begin{bmatrix}2.51\\3.82\\4.43\end{bmatrix}$

Without going into the rules of matrix algebra, I think you can see how each of the objects in the above equations were assembled: the array (matrix) of numbers are the coefficients of the unknowns, listed in the same order as in the system of equations. The vertical matrix next to it (also called a vector as it only has the one column) lists the unknowns, and the matrix on the right side is the numbers on the right side of the system. If we let A be the matrix of coefficients, k be the matrix of unknowns, and b be the matrix of the right side numbers, the matrix equation and its solution is:

$\textbf{Ak}=\textbf{b}\Longrightarrow\textbf{k}=\textbf{A}^{-1}\textbf{b}$

On a CAS calculator, this is solved very quickly. The answer will be the matrix k and you just pick off the elements for each ki in the same order as in the setup of the matrix equation. Doing this on my CAS, I get the answer :

$\textbf{k}=\begin{bmatrix}0.8\\0.05\\0.01\end{bmatrix}$

So the output model for this gyro is

$0.8\omega_1+0.05\omega_2+0.01\omega_3=v$

Given the corrected outputs of the other two gyros, the navigation system knows what the true rotation about axis 1 is.

### Rotation matrix

Another “rocket scientist” application of matrices associated with navigation are rotation matrices. Supposed your spacecraft is halfway between earth and the moon and a course correction is needed. In which direction do you burn your rocket engines? If you just point your spacecraft toward the moon and fire, you will miss by a lot. This is because you are not taking your spacecraft’s and the moon’s motion into account. And when I say “motion”, I mean with respect to an inertial (that is static) reference coordinate system, called an inertial reference frame. Depending on the scenario, this could be a system at the centre of the earth or the sun that does not rotate with the earth or sun.

So calculations are made with respect to the inertial frame but the spacecraft’s navigation system only knows its reference frame when it comes to firing the engines. Rotation matrices is how an inertial direction is converted to a spacecraft’s reference frame.

To simplify this a bit, I will limit the coordinate systems to be 2-dimensional, but the concept can easily be extended to 3 dimensions.

Consider the two coordinate systems below:

where the x-y system is the inertial frame and the x’-y’ system is the spacecraft reference frame. Now I know that the origins of these two frames will be physically separated, but it turns out that this does not matter. Only the angle (angles for 3-dimensions) between the two frames matter. I draw them together so you can more easily see the result.

Now suppose that, with respect to the inertial frame which does take into account the motions of the spacecraft and the moon, it is calculated that the direction the engines should fire for the course correction is v as indicated in the diagram. This direction has an x value and a y value which corresponds to where the arrow of v is. The spacecraft has to convert this to its coordinate system and it does it with the following matrix multiplication:

$\begin{bmatrix}x’\\y’\end{bmatrix}=\begin{bmatrix}\text{cos}(\theta)&\text{sin}(\theta)\\-\text{sin}(\theta)&\text{cos}(\theta)\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}$

The angle 𝜃 is known from the various navigation systems that are being used to track the spacecraft, including an inertial navigation system that has gyroscopes that we just modelled. Now the spacecraft knows in what direction it has to fire its engines.

### Other uses

In the previous example, the navigation computers needed to have a model of all the forces acting on the spacecraft and the resulting motions, that is its dynamics, in order to calculate the vector v. This model is a matrix differential equation that is constantly being numerically solved. To do this, the computer needs to keep track of the spacecraft’s position in 3-dimensional space (3 variables) as well as the velocity in each of those dimensions (3 more variables). The matrix needed for that model has to have the same number of rows and columns as the number of variables, so that is a 6 × 6 matrix (36 elements).

Matrices are used in electronics, optics, quantum mechanics, cryptography, robotics – you get the point.

## Engineering Topics – Complex Numbers

The world moves and so do many things that occur naturally or are made by humans. Because of this, when engineers or scientists want to mathematically model a system or process, they frequently need to identify not only the variables of interest (like position), but the rate of change of these variables (like velocity). These mathematical models are equations that relate the variables and their rates of change. Equations like this are called differential equations and how to solve these equations is usually introduced to students after they have studied calculus. And solutions to these equations frequently have complex numbers in them.

What is a complex number? A complex number is defined using the definition of the imaginary unit, i:

$i=\sqrt{-1}$

This may look like a crime against mathematics as through much of our maths education, we were told that you cannot take the square root of a negative number. This is reinforced by trying to take the square root of a negative number on many calculators resulting in an error. But it turned out that this invention had some usefulness in maths.

Numbers like bi where b is a real number are called imaginary numbers. If you add a real number a to this, a + bi, you get a complex number, where a is the real part and b is the imaginary part. There is a lot of theory surrounding complex numbers, but I will only cover what is necessary for this post.

Complex numbers satisfy many of the properties you are familiar with using real numbers including the rules involving exponents. So using a complex number as an exponent to the natural base e (a number, like 𝜋, which is frequently used in engineering), the expression can be split into two parts:

$e^{a+bi}=e^ae^{bi}$

You are familiar with ea, but what do we do with ebi? This is actually a complex number as well and can be put into a standard form using Euler’s formula:

$e^{bi}=\text{cos}\,b+i\,\text{sin}\,b$

In textbooks, the right side of the above equation is abbreviated as cis b. So

$e^{a+bi}=e^a(\text{cos}\,b+i\,\text{sin}\,b)=e^a\,\text{cis}\,b$

So what can imaginary numbers tell us about the real world? Well, the “useless” things you were taught about quadratic equations, are about to become useful.

### The Damped Harmonic Oscillator

There are many things that oscillate, but not forever: electronic circuits, your car when it hits a bump, aircraft when they hit an air pocket. A simple example is a mass on a spring with a damper attached:

There’s a lot of physics happening here. But all you need to know is that there are 3 main forces affecting the motion of the mass. These forces are created by: gravity (which creates an acceleration downward), spring (proportional to the position of the mass), and damper (proportional to the velocity of the mass). What is the position of the mass at any time t?

Using Newton’s second law, F = ma, the following differential equation can be generated. A differential equation is an equation that relates a variable (in this case, the position x) with its rates of change (in this case velocity and acceleration):

$m\ddot{x}+b\dot{x}+kx=0$

where x is the position of the mass relative to a reference point, b is the damping coefficient (how strong is the damper), k is the spring constant (how strong is the spring), x with one dot above it is the rate of change of x with respect to time (commonly known as velocity), and x with two dots is the rate of change of velocity with respect to time (commonly known as acceleration).

Solving differential equations is a whole university course, but for this type of equation, the solution will be of the form:

$x(t)=Ae^{𝜆t}$

where A is the initial position of the mass at t = 0. So the problem reduces down to finding 𝜆. It turns out that 𝜆 is the solution to the corresponding algebraic equation (called the characteristic equation):

$m\lambda^2+b\lambda+k=0$

So yes, here is an example where you use the quadratic skills you learned. Using the quadratic formula:

$\lambda=\frac{-b\pm\sqrt{b^2-4mk}}{2m}$

The discriminant b2 – 4mk, dictates the type of solutions for 𝜆. In this post, I am interested in the case where b2 – 4mk < 0, the under damped case which is graphically shown in the animation above.

With a little bit of algebra and using the definition of i to factor out the −1 inside the square root (and what remains in the square root is positive):

$\lambda=\frac{-b\pm\sqrt{(-1)(4mk-b^2)}}{2m}=\frac{-b}{2m}\pm i\sqrt{\frac{k}{m}-\frac{b^2}{4m^2}}$

If we let

$\alpha=\frac{b}{2m}\text{ and }\omega=\sqrt{\frac{k}{m}-\frac{b^2}{4m^2}}$

then 𝜆 = -⍺ ± ωi. So the solution is

$x(t)=Ae^{(-\alpha\pm \omega i)t}=Ae^{-\alpha t}e^{(\pm\omega ti)}=Ae^{-\alpha t}(\text{cos}(\pm \omega t)+i\,\text{sin}(\pm\omega t))$

Now it looks like we still have an imaginary part in the answer. We need a real solution that fits the real world. As I said before, solving differential equations is a separate subject usually studied at uni. In that subject, you would learn about the superposition principle where any linear combination of two separate solutions of a differential equation will also be a solution. Notice that we do in fact, have two solutions above: one using the + and the other using the −. Using relationships that exist for circular (trig) functions for sine and cosine, we can add these two solutions together and the imaginary part will cancel out, leaving only a real solution:

$x(t)=Ae^{-\alpha t}\text{cos}(\omega t)$

As t grows, the cosine part of the solution just bounces up and down between ±A. But the exponent of e gets more negative as t grows making e⍺t smaller, starting at 1 when t = 0. This generates the following curve:

Notice how the exponential part of the solution is an envelope that the cosine curve must fit into.

Instead of a mass hanging on a spring, the differential equation we started out with could represent your car’s suspension system which has springs and shock absorbers (dampers). Notice that we can change the parameters, the strengths of the springs and shock absorbers, to change the way a car handles bumps. The response in the graph above may be too loose and we may want to change the parameters to make the car settle down more quickly. This is engineering.

## Engineering Topics – Vectors

As an ex-engineer, I know that almost all of the math skills I have learned in school have been used in my career. However, students generally do not appreciate this when, for example, they are factoring a quadratic. It becomes easier to demonstrate the usefulness of math to students when they are being taught skills that have a direct application. So I thought I would present a few topics in maths with some applications in engineering. The first of these topics is vectors.

A vector is an object with a magnitude and a direction. If you are travelling at 60 km/hr, that number is just a magnitude. But if you are travelling north at 60 km/hr, that has a directions as well and can be represented as a vector.

There are a lot of new math skills associated with vectors, but I will only cover what is necessary to present this application of vectors.

Vectors can be added algebraically but I will just be talking about how to add vectors graphically.

Here is a typical vector:

It’s magnitude can be its physical length or a labelled quantity like 60 km/hr or 100 N (newtons) of force. Its direction though, needs a reference. This will usually be a coordinate system like the Cartesian coordinate system:

This vector represents a velocity of 60 km/hr in the direction 30° from the positive x-axis. Now this direction is completely dependent on the coordinate system used. We could have made the x-axis line up with the vector itself. But once established, questions regarding the vector will be answered with respect to the coordinate system used.

A vector can be the sum of two or more vectors. There are many variations to this but the scenario applicable to this post is where the vector is the sum of two vectors that are perpendicular to each other. Given the coordinate system we have used, the vector V can be broken up into two components, Vx and Vy. That is, V = Vx + Vy. Graphically, this looks like:

Now we already know the direction with respect to this coordinate system of each of the component vectors Vx and Vy, but what are their magnitudes?

Looking at the above figure, you can see that the vector V splits the rectangle formed by the x and y axes and the dotted lines into two similar right triangles. If the length of the hypotenuse of these triangles is 60, then

$\left|{\boldsymbol{V_x}}\right|=60\text{ cos}(30°)=51.96 \text{ km/hr}$

where |vector| is notation to represent the magnitude of a vector. Similarly, you can see that

$\left|{\boldsymbol{V_y}}\right|=60\text{ sin}(30°)=30 \text{ km/hr}$

If you were given the perpendicular vector components, you can use the Pythagorean theorem to find the magnitude. Let’s use the components found above to see if they give back the original vector:

$\left|{\boldsymbol{V}}\right|=\sqrt{\boldsymbol{V_x}^2+\boldsymbol{V_y}^2}=\sqrt{51.96^2+30^2}\approx60\text{ km/hr}$

This is approximately 60 because the 51.96 number used is a two decimal place approximation to the actual irrational number.

So here is a practical application of this:

A cable supports a beam at an angle of 29.745°. A weight at the end of the beam provides a force of 500 N. Assume that the weight of the beam is negligible. What is the tension (force) seen by the cable?

Now before I tackle this, a bit of background. First, the “N” in “500 N” stands for “newtons”. This is the unit of force in the SI system of units. SI is the International System of Units that is usually used in science and engineering. Though your mass may be 80 kg, the force you exert on the earth is 784.8 N. In return, the earth exerts a force of 784.8 N against you in the opposite direction. Second, this problem is a statics problem, that is, nothing is moving. That means that all involved forces (vector quantities that have direction) must add to zero. The force you exert on the earth and the opposite force that the earth exerts on you add to zero, so there is no motion up or down. Third, tension and compression in a structural member is a force that the member exerts on neighbouring objects in response to forces that cause the tension or compression.

Let’s isolate the end of this structure where the force is being applied:

As there is no motion, there must be an opposite but equal force of 500 N:

What is causing this opposite force? It’s the tension in the cable. This tension must be great enough to cause a force of 500 N in the y (up) direction. This 500 N up is the y component of the force from the cable:

Knowing the y component, the opposite side of the right triangle shown, we can use trigonometry to find the hypotenuse, the value of the tension in the cable T:

$\left|{\boldsymbol{T}}\right|=\frac{500}{\text{sin}(29.745°)}=1000.78 \text{ N}$

I leave it to you to review the definition of the sine of an angle in a right triangle.

Even though this was not asked, the tension in the cable creates a force in the x direction (horizontal direction). Again using trigonometry, the value of this force is 875.00 N. Where is the force that opposes this so that there is no motion? It comes from the compression imposed on the horizontal member:

This is an engineering problem because if you were to design and build this structure, you would have to ensure that the materials used could handle the tension and compression loads with an additional safety factor. Before reading this post, if you just thought that the cable needs to handle 500 N, you would soon be looking for a new job.

## Complex Numbers, Part 5

Blast from the past: remember the quadratic formula

$x = \frac{-b \pm \sqrt{{b}^{2}-4ac}}{2a}$

and you would look at the discriminant (the b² – 4ac part) to determine if there were 1, 2, or no solutions? You were told that if b² – 4ac < 0, then there were no solutions. Well that was a lie (please don’t ask me about Santa Claus). It turns out that there are always solutions to a quadratic equation

ax² + bx + c = 0, where a, b, and c are real and a ≠ 0.

Let’s look at z² + 4z + 29 = 0 and solve for z. Using the quadratic formula, we get

$z = \frac{-4 \pm \sqrt{{4}^{2} – 4(1)(29)}}{2(1)} = \frac{-4 \pm \sqrt{-100 }}{2}$

The square root of -100 used to be a problem but no longer:

$\frac{-4 \pm \sqrt{-100 }}{2} = \frac{-4 \pm \sqrt{100 }\sqrt{-1}}{2} = = \frac{-4 \pm 10i}{2}= -2 \pm 5i$

Notice that the answer is a complex conjugate pair. This always happens for any polynomial equation with real coefficients. If a complex number is a root, so is its conjugate. The answer above also means that

z² + 4z + 29 = (z + 2 – 5i)(z + 2 + 5i)

So now if b² – 4ac < 0, the quadratic equation has a conjugate pair as the solution.

If solutions to polynomial equations are complex conjugates, that means that a cubic equation has to have at least one real root because a cubic equation can have at most, three solutions. In fact, any odd powered polynomial equation has to have at least one real root. This makes sense graphically because the highest power of an odd-powered polynomial will eventually dominate all the other terms as x goes very negative or very positive. The highest powered term will have opposite signs for negative and positive values of x, so the polynomial will eventually cross the x-axis.

Let’s do one more problem. If a polynomial has single roots 2 ± i and 3, what is that polynomial? To solve this, just form the factors with these roots:

(z -2 –i)(z -2 +i)(z -3) = (z² – 4z + 5)(z -3) = z³ – 7z² + 17z – 15

## Complex Numbers, Part 4

Now let’s do some maths with complex numbers. First, notice what happens with successive powers of i:

i0 = 1 (anything to the 0 power is 1)
i1 = i
i2 = -1 (by definition)
i3 = i2 × i = –i
i4 = i2 × i2 = 1

If you keep increasing the power, you will keep getting the pattern:
1, i, -1, –i. For higher powers, you can find where you are in the pattern by dividing the power by 4 and looking at the remainder. If the remainder is 0, then the answer is 1. If the remainder is 1, the answer is i. A remainder of 2 gives -1, and a remainder of 3 gives –i. For example, i69 , 69÷4 = 17 with a remainder of 1. So i69 = i.

Now lets’ convert between rectangular and polar forms.

Convert the following to polar form:

$\begin{array}{l} {z}_{1} = 1 \,- \sqrt{3}i\\ {z}_{2} = -1+ \sqrt{3}i\end{array}$

First let’s find the modulus r. Both of these complex numbers have the same modulus because of the squaring of each term:

${r}_{1} = \sqrt{{1}^{2}+{(-\sqrt{3})}^{2}} = {r}_{2} = \sqrt{{(-1)}^{2} + {(\sqrt{3})}^{2}} = \sqrt{4} = 2$

Now let’s compute Arg(z) for each. Using my calculator, I get the same answer for both:

$\begin{array}{l} {\theta }_{1} = \text{tan}^{-1}{\left(\frac{-\sqrt{3}}{1}\right)} = -\frac{\pi }{3}\\ {\theta }_{2} = \text{tan}^{-1}{\left(\frac{\sqrt{3}}{-1}\right)} = -\frac{\pi }{3}\end{array}$

The second one is wrong. In the first one, the real part is positive and the imaginary part is negative. This puts the complex number in the fourth quadrant in an Argand plot, so -????/3 is the correct angle. But in the second one, the real part is negative and the imaginary part is positive. This puts the complex number in the second quadrant, so clearly -????/3 is wrong:

Your calculator does not know where the minus sign is so it’s just programmed to give an answer in the range -????/2 to ????/2, (-90° to 90°). You however, being smarter than your calculator, know that the minus sign in z2, puts it in the second quadrant. You need to adjust the given angle to put it in the second quadrant as illustrated.

So the polar form of z1 is 2 cis (-????/3). The polar form of z2 is 2 cis 2????/3.

Now let’s go from polar to rectangular. Convert

$4\sqrt{2}\text{cis} \left (-\frac{3????}{4} \right )$

into its rectangular form.

In my last post I gave the equations

$x = r \text{ cos} ????, y = r \text{ sin} ????$

So z =4√2cos(-3????/4) + 4√2 sin(-3????/4)i = -4 – 4i. You do not need to worry about quadrant issues converting from polar to rectangular.

In my next post, I will solve some quadratic equations that previously did not have any solutions when we were stuck in the real domain. Now life is more complex.

## Complex Numbers, Part 3

Complex numbers cannot be plotted on the traditional Cartesian coordinate system because of the imaginary part. A cartesian system is used to plot a pair of real numbers. Since a pair of complex numbers consists of four real numbers, a pair of complex numbers cannot be plotted. However, we can plot a single complex number on a modified version of a Cartesian system where the x-axis is relabelled as the real axis and the y-axis is the imaginary axis. This modified coordinate system is called an Argand diagram after its inventor Jean-Robert Argand, a Swiss mathematician.

Here is a plot of a generic complex number z = x + yi:

An Argand plot can be used to see the results of adding and subtracting complex numbers. These are interesting and you can see these in any textbook but the real power of an Argand plot is to see the relationship between the rectangular form of a complex number (the form we have been using so far) and the polar form.

Remember that polar coordinates are a different way to identify the location of a point in a two-dimensional plane. Instead of giving x and y coordinates, you can give an angle from the positive x-axis to define a direction, then a distance along that direction to define where a point is located. The same is true for an Argand plot of a complex number, and this polar form is more convenient to use than the rectangular form in certain scenarios. Below is the same plot as above, but I’ve added the polar coordinates:

From your past experience with triangles and trigonometry, you can see that the following relationships are true:

$\begin{array}{l} r = |z| = \sqrt{{x}^{2}+{y}^{2}}\\ x = r \text{ cos} ????, y = r \text{ sin} ????\\ ???? =\text{tan}^{-1}\frac{y}{x}\end{array}$

From the above, you can see that in terms of r and ????,

z = r cos???? + ir sin????

The polar form notation that is used in VCE Australia is

z = r cis????

where “cis” is shorthand for “cos + i sin”. There are other ways to express a polar complex number as well. In electronics, r∠???? is frequently used.

Some definitions: modulus is the length of a complex number, that is, r. Arg(z) is the principal value of ????. This is pronounced as “the argument of z“. As any particular ???? can have multiples of 2???? radians or 360° added to it, arg(z) restricts ???? to -???? < arg(z) ≤ ????. Be careful when computing ???? with the inverse tangent formula. A calculator will only give values between -????/2 and ????/2 (-90° and 90°), that is the first and fourth quadrants. You need to interpret this result to the correct angle by looking at the signs of x and y to know which quadrant your particular complex number falls in. I will do some sample problems in my next post to illustrate this.

## Complex Numbers, Part 2

Addition, subtraction, and multiplication of complex numbers extend the rules for real numbers. Division is done a bit differently but still follow rules you already know for real numbers.

Addition: To add two complex numbers, just add the real parts and the imaginary parts separately. Example:

(2 – 5i) + (-3 +2i) = (2 – 3) + (-5 + 2)i = -1 – 3i

Subtraction: same as addition, you just separately subtract the real parts and the imaginary parts. Example:

(2 – 5i) – (-3 +2i) = (2 – (-3)) + (-5 – (+2))i = 5 – 7i

Multiplication: Just as for real algebraic expressions like (x + y)(2x + 3y), you just multiply two complex numbers the same way then add like terms. Just remember that i² = -1 so a negative sign will appear when i is multiplied by i. Example:

(2 – 5i) × (-3 +2i) = 2 × (-3) + 2 × 2i -5i × (-3) – 5i × 2i
= -6 + 4i + 15i -10i² = -6 + 19i -10(-1) = 4 + 19i

The same method applies when multiplying a real number times a complex number:

2 × (2 – 5i) = 4 – 10i

Before I talk about division, I need to introduce another definition. In my last post, I solved a quadratic equation with the solution -2 ± 3i. So there are two solutions, one with the + and the other with the -. These two solutions are called a complex conjugate pair. -2 + 3i is the complex conjugate of -2 – 3i and vice versa. It turns out that if a polynomial equation has a complex solution, the conjugate of that solution is also a solution. That is, complex solutions to polynomial equations always come in complex conjugate pairs. If z is a complex number, z̄ is used to represent its conjugate.

So now let’s look at complex division. To divide by a complex number (which include real numbers) by a complex number with a non-zero imaginary part, multiply the numerator and denominator by the conjugate of the denominator. Example:

$(2-5i)\div (-3+2i)=\frac{2-5i}{-3+2i}\times \frac{-3-2i}{-3-2i}=\frac{-6-4i+15i-10}{9+6i-6i+4}$ $=\frac{-16+11i}{13}=-\frac{16}{13}+\frac{11}{13}i$

This example illustrates a few more things about complex numbers. First, at the end, dividing a complex number by a pure real number (or multiplying for that matter), you just divide (or multiply) each part of the complex number by the real number.

The other thing you may have noticed is in the multiplication in the denominator. Multiplying a complex number by its conjugate results in a real number. This resulting number has graphical significance which you will see later. In general, if z = x + yi, then z̄ = xyi and z z̄ = x² + y².

In my last post, I found that -2 ± 3i are solutions to z² +4z + 13 = 0. Let’s check one of these solutions:

(-2 + 3i)² + 4(-2 + 3i) +13 = 4 -12i -9 – 8 + 12i + 13 = 0 + 0i

I’ll leave it to you to show that the conjugate also solves the equation.

Note that two complex numbers are equal only if their real parts are equal and their imaginary parts are equal.

In my next post, I’ll look at how we can plot complex numbers.

## Complex Numbers, Part 1

Complex numbers extend the real numbers () to include a second element, yi:

z = x + yi

where x and y are real numbers and i is the imaginary unit that is defined in terms of its square, i² = -1. Yes, this does mean that i is the square root of -1. All this time you’ve been told that taking the square root of a negative number is illegal. It is if your calculations are limited to being real numbers, but with this special definition of i, it is now legal. Welcome to the world of complex numbers! The symbol for the set of all complex numbers is ℂ.

With this new definition and this new domain of numbers, there are new definitions and rules for operations. Operations on complex numbers are mostly extending the rules you already know for real numbers. First, let’s look at some definitions.

Just as x is the default variable used for an unknown real number, z is usually used for complex numbers. If z = x + yi, x is called the real part of z and y is called the imaginary part. There is shorthand notation for this:

Re(z) = x, Im(z) = y

where x and y are real numbers: x ∈ ℝ and y ∈ ℝ.

Now if Im(z) = 0, then you just have a real number. So real numbers are a subset of complex numbers. That is ℝ ⊂ ℂ

So were complex numbers created just to give maths students something to do? Absolutely not! (Though it would be nice to have some quiet time by giving my students complex problems). Since there is an extra number in a complex number, there is additional information there that can describe a physical quantity. Most often in science and engineering, this extra information relates to a phase angle or a frequency. I will show examples of this in future posts. Though the imaginary part of a complex number is called “imaginary”, a complex number can describe a real physical quantity.

Expanding our working maths domain to complex numbers, allows for solutions to equations that previously had “no solution”. Consider

x² +4x + 13 = 0

This equation would previously be said to have no solutions. But now, we can find complex solutions. So perhaps we should change the variable to

z² +4z + 13 = 0

Using the quadratic formula to solve this gives

$z = \frac{-b \pm \sqrt{{b}^{2}-4ac}}{2a} =\frac{-4 \pm \sqrt{{4}^{2}-4(1)(13)}}{2(1)} = \frac{-4 \pm \sqrt{-36}}{2}$

Now -36 = (-1)(36) and the rule that the square root of a product is the product of the square roots applies:

$z =\frac{-4 \pm \sqrt{-36}}{2} = \frac{-4 \pm \sqrt{36}\sqrt{-1}}{2} = \frac{-4 \pm 6i}{2} = -2 \pm 3i$

Before we can confirm that -2 ± 3i is a solution to the equation, we need to know how to do basic operations on complex numbers. That will be the subject of my next post.