You are currently browsing the tag archive for the ‘complex numbers’ tag. Weaving a Spider Web II: Catching mosquitoes

First I thought I would have another go at making a spider web pattern – this time using Geogebra.  I’m going to use polar coordinates and the idea of complex numbers to help this time.

Parametrically I will define my dots on my web by: Here r will dictate the distance of the dot from the origin, p will dictate how many dots I will have before I return to the starting point, and then I will vary n from 1 to p.

For example, if I have a distance of 1 from the origin then r = 1.  I decide to have 10 dots in one cycle, therefore p =10.  This gives the following: Now if I plot all these points as n varies from 1 to 10 I will get the following graph: Here I joined up all the dots to their neighbors and also to the origin.  If you know about complex numbers you might notice that we can represent these points as complex numbers, and these are the 10th roots of unity. Following the same method I now change the distance from the origin (so r is changed).  This then will give me the following web: Finding the optimum web design

I’m now going to explore some maths suggested by the excellent Chalkdust magazine (recommended for some great exploration ideas).  In their “Spider Witch Project” they suggest the following idea to work out how a spider can make sure they catch their prey. Say we have the web above, distances in cm.  Let’s say that the inner green circle is no use for catching flies (this is where the spider wants to stay, and so flies will avoid this area).  So excluding this circle we have 2 additional concentric circle-like rings, and 10 radial lines from the centre.  This gives us a total of 20 areas (like the one shaded red).

Changing to concentric circles Now let’s change our web into perfect circles.  We still have 20 areas in which the spider aims to catch their prey.  Let’s say that a spider will only catch their prey if the area it flies into is such that it is caught from all sides (i.e if the area is too large it may fly through the middle, or simply touch one strand but be able to escape).

For this particular design – with 2 concentric circles outside the centre area, the question is how many radial lines through the centre should the spider spin?  If it spins too few radial lines then its prey will not be caught, but if it spins too many then it will be wasting precious time (and energy) spinning its web.

Next lets work out the average of one of these red areas (in cm squared).  This will be: Next let’s assume that our spider wants to catch a mosquito.  Let’s say the mosquito is 3mm by 4mm with a 2D plan cross sectional area of 12 mm squared.  And let’s say that the mosquito will not be caught in the web unless the area of the red area is the same size or smaller than the mosquito’s 2D plan cross sectional area.  In this case we can see that the mosquito will escape: So, let’s see how many radial lines the spider needs to spin if it only has 2 concentric rings outside the “green zone”.  Here n will represent the number of radial lines from the centre: So, we can see that a spider wanting to catch a mosquito might need to make at least 105 radial lines to catch its prey.  This doesn’t seem to realistic.  So, let’s modify our model to see how this compares to real life.

Real life This particular spiderweb has around 20 concentric circles (counting double strands) and around 38 radial lines.  Let’s see how many radial lines we would predict from our model.

If we have a radius of around 6cm for this web (around the average for a spider web), and take an inner radius of 1cm for simplicity, then with 20 concentric circles we would predict: So a spider would need at least 46 radial lines to catch their prey.  This is not too far away from the real life case in this case of 38 radial lines.

Further study

This could make a very interesting exploration.  You can get some more ideas on this by reading the Chalkdust article where they go into ideas of optimisation for the time taken.

This topic shows how a good investigation should progress.  Start with a very simple case, make lots of assumptions, then see what happens.  If you reach a conclusion then go back and try to make your initial case more complicated, or revisit your assumptions to see how realistic they were. Complex Numbers as Matrices – Euler’s Identity

Euler’s Identity below is regarded as one of the most beautiful equations in mathematics as it combines five of the most important constants in mathematics: I’m going to explore whether we can still see this relationship hold when we represent complex numbers as matrices.

Complex Numbers as Matrices

First I’m I’m going to define the following equivalences between the imaginary unit and the real unit and matrices: The equivalence for 1 as the identity matrix should make sense insofar as in real numbers, 1 is the multiplicative identity.  This means that 1 multiplied by any real number gives that number.  In matrices, a matrix multiplied by the identity matrix also remains unchanged.  The equivalence for the imaginary unit is not as intuitive, but let’s just check that operations with complex numbers still work with this new representation.

In complex numbers we have the following fundamental definition: Does this still work with our new matrix equivalences? Yes, we can see that the square of the imaginary unit gives us the negative of the multiplicative identity as required.

More generally we can note that as an extension of our definitions above we have: Complex number multiplication

Let’s now test whether complex multiplication still works with matrices.  I’ll choose to multiply the following 2 complex numbers: Now let’s see what happens when we do the equivalent matrix multiplication: We can see we get the same result.  We can obviously prove this equivalence more generally (and check that other properties still hold) but for the purposes of this post I want to check whether the equivalence to Euler’s Identity still holds with matrices.

Euler’s Identity with matrices

If we define the imaginary unit and the real unit as the matrices above then the question is whether Euler’s Identity still holds, i.e:

Next I can note that the Maclaurin expansion for e^(x) is: Putting these ideas together I get: This means that: Next I can use the matrix multiplication to give the following: Next, I look for a pattern in each of the matrix entries and see that: Now, to begin with here I simply checked these on Wolfram Alpha – (these sums are closely related to the Macluarin series for cosine and sine). Therefore we have: So, this means I can write: And so this finally gives: Which is the result I wanted!  Therefore we can see that Euler’s Identity still holds when we define complex numbers in terms of matrices.  Complex numbers are an incredibly rich area to explore – and some of the most interesting aspects of complex numbers is there ability to “bridge” between different areas of mathematics.

Essential resources for IB students: Revision Village has been put together to help IB students with topic revision both for during the course and for the end of Year 12 school exams and Year 13 final exams.  I would strongly recommend students use this as a resource during the course (not just for final revision in Y13!) There are specific resources for HL and SL students for both Analysis and Applications. There is a comprehensive Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and then provides a large bank of graded questions.  What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial.  Really useful! The Practice Exams section takes you to a large number of ready made quizzes, exams and predicted papers.   These all have worked solutions and allow you to focus on specific topics or start general revision.  This also has some excellent challenging questions for those students aiming for 6s and 7s.

Each course also has a dedicated video tutorial section which provides 5-15 minute tutorial videos on every single syllabus part – handily sorted into topic categories. I’ve put together four comprehensive pdf guides to help students prepare for their exploration coursework and Paper 3 investigations. The exploration guides talk through the marking criteria, common student mistakes, excellent ideas for explorations, technology advice, modeling methods and a variety of statistical techniques with detailed explanations. I’ve also made 17 full investigation questions which are also excellent starting points for explorations.  The Exploration Guides can be downloaded here and the Paper 3 Questions can be downloaded here.

Plotting the Mandelbrot Set

The video above gives a fantastic account of how we can use technology to generate the Mandelbrot Set – one of the most impressive mathematical structures you can imagine. The Mandelbrot Set can be thought of as an infinitely large picture – which contains fractal patterns no matter how far you enlarge it.  Below you can see a Mandelbrot zoom – which is equivalent to starting with a piece of A4 paper and enlarging it to the size of the universe!  Even at this magnification you would still see new patterns emerging.

The way the Mandelbrot set is formed in the first video is by using the following iterative process:

Zn+1 = Zn2 + c

Here Z is a complex number (of the form a + bi) and c is a constant that we choose.  We choose our initial Z value as 0.  Z1 = 0. We then choose a value of c (which is also a complex number) and see what happens when we follow the iterative process.

Let’s choose c = 2i +1. Z1 = 0

Zn+1 = Zn2 + 2i +1
Z2 = (0)2 + 2i +1
Z2 = 2i + 1

We then repeat this process:
Z3 = Z22 + 2i +1
Z3 = (2i+1)2 + 2i +1
Z3 = (2i)(2i) + 2i + 2i + 1 + 2i +1
Z3 = 6i-2 (as i.i = -1)

As we continue this process Zn spirals to infinity.

What we are looking for is whether this iterated Z value will diverge to infinity (i.e get larger and larger) or if it will remain bounded. If diverges to infinity we colour the initial point 2i+1 as blue on a complex axis. If it remains bounded we will colour it in black. In this case our initial point 2i+1 will diverge to infinity and so it will be coloured in blue.

So, let’s use Geogebra to see this is action.  The Geogrebra online program for this is here.

We choose a value for c.  Let’s say c = 0.23 + 0.42i.  Z1 = 0
Zn+1 = Zn2 + 0.23 + 0.42i.
Z2 = (0)2 + 0.23 + 0.42i.
Z2 = 0.23 + 0.42i.

Z3 = Z22 + 0.23 + 0.42i.
Z3 = (0.23 + 0.42i.)2 + 0.23 + 0.42i.
Z3 = 0.1065 + 0.6132i
Z4 = (0.1065 + 0.6132i)2 + 0.23 + 0.42i.
Z4 = -0.13467199 + 0.5506116i

We carry on with this iterative process and plot the points that we get each time.  We can see the (0.23, 0.42), (0.1065, 0.42) and (-0.13467199, 0.5506116) correspond to the first coordinates on the spiral after (0,0).  We can see that as this process continues we see a convergence to a point close to (0.05, 0.45). If we choose another starting value for c: c = 0.17 + 0.56i we get the following diagram: Again we have a stable spiral which spirals around a geometric shape and does not diverge to infinity.

If we choose another starting value for c: c = -0.25 + 0.64i we get the following diagram: If we choose another starting value for c: c = 0.11 + 0.59i we get the following diagram: However, If we choose another starting value for c: c = 0.3 + 0.68i we get the following diagram: This time we can see that the orbit of points does not converge, but instead it diverges to infinity.

We can then colour in each point – simply categorising whether the value of c leads to an orbit which diverges or remains bounded.  Black means it remains bounded, blue that it has escaped to infinity.  So, below we can see that when we do the iterative process with c = 0.39+ 0.63i our orbit will escape to infinity (as it is coloured blue) If we do this exercise in much finer detail we arrive at the following picture: This is the Mandelbrot Set – and will keep producing fractal patterns as you zoom in to infinity.

IB Revision

If you’re already thinking about your coursework then it’s probably also time to start planning some revision, either for the end of Year 12 school exams or Year 13 final exams. There’s a really great website that I would strongly recommend students use – you choose your subject (HL/SL/Studies if your exam is in 2020 or Applications/Analysis if your exam is in 2021), and then have the following resources: The Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and each area then has a number of graded questions. What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial.  Really useful! The Practice Exams section takes you to ready made exams on each topic – again with worked solutions.  This also has some harder exams for those students aiming for 6s and 7s and the Past IB Exams section takes you to full video worked solutions to every question on every past paper – and you can also get a prediction exam for the upcoming year.

I would really recommend everyone making use of this – there is a mixture of a lot of free content as well as premium content so have a look and see what you think.

Mandelbrot and Julia Sets – Pictures of Infinity

The above video is of a Mandelbrot zoom.  This is a infinitely large picture – which contains fractal patterns no matter how far you enlarge it.  To put this video in perspective, it would be like starting with a piece of A4 paper and enlarging it to the size of the universe – and even at this magnification you would still see new patterns emerging. To understand how to make the Mandelbrot set, we first need to understand Julia sets.  Julia sets are formed by the iterative process:

Zn+1 = Zn2 + c

Here Z is a complex number (of the form a + bi) and c is a constant that we choose.  So, for example if we choose Z1 = 1+i and c = 1 then:

Z2 = Z12 + 1
Z2 =(1+i)2 + 1
Z2 = 2i + 1

We then repeat this process:
Z3 = Z22 + 1
Z3 = (2i+1)2 + 1
Z3 = 4i-2

and so on – what we are looking for is whether this iterated Z value will diverge to infinity (i.e get larger and larger) or if it will remain bounded. If diverges to infinity we colour the initial point 1+i as red on a complex axis. If it remains bounded we will colour it in black. In this case our initial point 1 + i will diverge to infinity and so it will be coloured in red.

Next we do this for every single point in the complex plane – each time seeing what happens when we iterate it many times. Each time we colour it in as red if it diverges and black if it remains bounded. Once we have done that we will have a picture which represents what happens to every point in the complex plane. This then is our Julia set.

For example the Julia set for c = 1 looks like this: This is because every single complex number when iterated by  Zn+1 = Zn2 + 1 will diverge to infinity (get infinitely big).

Not very interesting so far, but different values of c provide some amazing patterns. This above pattern is generated by c = 0.376 – 0.1566i. and this pattern is for c = 0.376 – 0.1566i. and this one is c = -0.78 + 0.1i. This last one for c = 0.4 + 0.1i looks different to the others – this one has patterns but they are not connected together as in the other examples.

Mandelbrot Set

This brings us on to how to calculate the Mandelbrot set.  We calculate every possible Julia set for all complex numbers c, and then for every Julia set which is connected then we colour the c value in black, and every value of c which the Julia set is disconnected we colour the c value in red.  We then have a new plot in the complex plane of c values.  This gives us the Mandelbrot set shown below: Don’t worry if this seem a bit complicated – it is!  You can play around making your own Julia sets by choosing a c value at this online generator.  You might also like towatch the Numberphile video on the same topic:

If you enjoyed this post you might also like Dan Pearcy’s post on this topic which explains how Geogebra can be used to generate these sets.  Also PlusMaths have a number of posts on this amazing subject

IB Revision If you’re already thinking about your coursework then it’s probably also time to start planning some revision, either for the end of Year 12 school exams or Year 13 final exams. There’s a really great website that I would strongly recommend students use – you choose your subject (HL/SL/Studies if your exam is in 2020 or Applications/Analysis if your exam is in 2021), and then have the following resources: The Questionbank takes you to a breakdown of each main subject area (e.g. Algebra, Calculus etc) and each area then has a number of graded questions. What I like about this is that you are given a difficulty rating, as well as a mark scheme and also a worked video tutorial.  Really useful! The Practice Exams section takes you to ready made exams on each topic – again with worked solutions.  This also has some harder exams for those students aiming for 6s and 7s and the Past IB Exams section takes you to full video worked solutions to every question on every past paper – and you can also get a prediction exam for the upcoming year.

I would really recommend everyone making use of this – there is a mixture of a lot of free content as well as premium content so have a look and see what you think.

### Website Stats

• 8,353,266 views

All content on this site has been written by Andrew Chambers (MSc. Mathematics, IB Mathematics Examiner).

### New website for International teachers I’ve just launched a brand new maths site for international schools – over 1500 pdf pages of resources to support IB teachers

Explore here!