As with the other algebras on this site, complex numbers can be introduced in different ways:

- We can look at their algebraic properties in their own right, as a set of symbols and numbers with clear rules for doing different operations, (complex number algebra is discussed on this page).
- We can look at complex numbers as extensions or generalisations of other algebras (for example they extend real numbers and they are a subset of quaternions and clifford algebras).
- We can look at complex number algebra as a system which (unlike real numbers) has a solution to all quadratic equations.
- We can look at complex numbers in geometric terms to represent a plane (see discussion of complex plane below) and transforms between planes as explained on this page. We can look at complex numbers in terms of their uses, in particular two dimensional rotations.
- As a magnitude and direction given by: r e
^{iθ} - As an extension field to the real numbers, isomorphic to R[x]/<x+1>
- As a product of two real number fields
- As an even subalgebra of a Clifford algebra based on 2D vectors wich square to +ve.

The most useful notation for complex numbers is of the form a + i b. Usually when an expression contains an addition symbol we can combine the two operands into a single number, but in the case of a complex number, this is as simple as we can get it and so the plus symbol remains as part of the complex number. We can't combine the two parts of the complex number because they represent different things, the real part and the imaginary part. In geometric terms we can consider the real and imaginary parts to be at 90° to each other. If one of the parts is zero then it is not necessary to include it and, in this case, we can omit the '+' but even in this case we often leave the 0 and '+' in the expression for clarity.

The 'i' has the following roles:

- It is a marker to distinguish the imaginary part, in other words 'i' is short for 'imaginary'.
- It represents the square root of minus one: i = √-1. So, if we are simplifying an expression and if we get i*i appearing in an expression, we can replace it with -1.
- In geometric terms it can also be considered an operator, representing rotation by 90°.

I have put further explanation of the square root of minus one on this page.

Complex numbers are two dimensional in that they contain two scalar values and they can represent points in 2D vector space. They are similar to 2D vectors except with different multiplication rules. Unlike vector multiplication, complex numbers have the following properties:

- multiplication of two complex numbers produces another complex number .
- there is always a multiplication inverse (division always exists - except for usual restriction of divide by zero).

Complex numbers are commutative, associative and distributive over addition (as defined here).

So the set of all complex numbers is a two dimensional plane which contains the real numbers, shown below as a horizontal line, and the imaginary numbers, shown below as a vertical line.

So multiplying by i rotates round to the imaginary axis, and multiplying by i again rotates to the negative real axis. So, i*i=-1, which is just another way of saying that i is the square root of minus one. Therefore the square root of a negative number always has a solution when we are working in complex numbers even though it does not have a solution when we are working purely in real numbers.

## Adding complex numbers

Just add the real and imaginary components independently as follows:

(a + i b)+(c + i d) = (a+c) + i (b+d)

## Multiplying complex numbers

To multiply just expand out the terms and group as follows:

(a + i b)*(c + i d) = (a*c - b*d) + i (a*d + b*c)

I don't know if multiplications are so costly in CPU time in modern computers, but if we do want to minimise multiplications we can do a complex multiplication using 3 floating point multiplications as follows:

multiply(other){

double t1= a * other.a;

double t2= b * other.b;

double t3= (a + b)*(other.a+other.b);

a = t1 - t2;

b = t3 - t1 - t2;

}

## Norm

This is the distance (r) of a + i b from the origin.

It is written as:

r = | a + i b |

by pythagorous:

r = | a + i b | = math.sqrt(a*a + b*b)

Check that:

|a + i b|*|c + i d| = |a*c - b*d + i (a*d + b*c)|

## Division

We don't tend to use the
notation for division, since complex multiplication is not commutative we need
to be able to distinguish between [a][b]^{-1} and [b]^{-1}[a].
So instead of a divide operation we tend to multiply by the inverse.

In order to calculate the inverse 1/b we multiply top and bottom by its conjugate as follows, conj(b)/b*conj(b). Multiplying a complex number by its conjugate gives a real number and we already know how to divide by a real number.

The conjugate of a + i b is a - i b

so (a + i b)*conj(a + i b) = a*a + b*b

so 1/(a + i b) = a/(a*a + b*b) - i b/(a*a + b*b)

## Representing Rotations using complex numbers

instead of a + i b the complex number could also be represented in what is known as the polar form:

r (cos(θ) + i sin(θ))

in other words replace:

- a = r cos(θ)
- b =r sin(θ)

we can use e^{i θ}= cos(θ)
+ i sin(θ) to give the exponential
form:

r e^{i θ}

If we want combine the result of two rotations, for example rotate by θ1 then rotate by θ2, then we multiply the corresponding complex numbers because:

e^{i (θ1+θ2)} = e^{i θ1} * e^{i θ2}

Or to combine two rotations by addition if we add the logarithms of the complex numbers.

## Applications of complex numbers

A complex number could be used to represent the position of an object in a two dimensional plane, complex numbers could also represent other quantities in two dimensions like displacements, velocity, acceleration, momentum, etc. But do the usual equations of motion work correctly?

There does not seem to be any problem with F = m a

where F and a are complex numbers

and m is a scalar.

But we could have done this just as well with a 2 dimensional vector. To really use complex algebra we would need something that in involved multiplication of two complex numbers. I don't think we can use energy equations because energy is a scalar quantity, isn't it?

Another possibility to use complex numbers in simple mechanics might be to use them to represent rotations. We have seen above how complex numbers can be used to represent rotations, but what is the advantage of doing this? why use a complex number when only a single number is needed to represent a rotation angle in a two dimensional plane?

Is there any advantages in using complex numbers to represent the complete state of a solid object, in other words it has a state variable that includes both the position. I don't think this would work because, if we want to combine translations then we add them, but it we want to combine rotations using complex numbers then we multiply them. So we cant combine operations using a single operation. We would be better off using a 3 element vector, two elements for position and one for orientation angle.

There are a lot of applications in physics and engineering where complex numbers are useful.

A common use of complex numbers is in electrical circuits, where capacitors and inductors are like an imaginary component of resistors. This only applies when using alternating current at the frequency being used. In other words, if the frequency of the current changes then the complex 'resistance' value of the components will very. This type of analysis could also be applied to a mechanical analog of electrical circuits, the spring, mass, damper model. If we want to determine the response of such a model at a particular frequency, then complex numbers would be a good way to do this.

Another use of complex numbers is for generating fractel patterns on a 2-dimentional plane.