tag:blogger.com,1999:blog-23198442923045404632017-07-28T07:30:25.683+01:00Make Your Own MandelbrotA Blog Accompanying the GuideMakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.comBlogger55125tag:blogger.com,1999:blog-2319844292304540463.post-9632257818376627332016-07-19T23:30:00.000+01:002016-07-19T23:30:38.530+01:00Python 3 Code on GitHubThe code for the book <a href="https://www.amazon.com/dp/B01EET6WUE/">Make Your Own Mandelbrot </a>is now on github:<br /><br /><ul><li><a href="https://github.com/makeyourownmandelbrot/makeyourownmandelbrot">https://github.com/makeyourownmandelbrot/makeyourownmandelbrot</a></li></ul><br /><br />And whilst I was doing this, I updated the code to <b>Python 3</b>.<br /><br />This required only minor changes: the <b><span style="font-family: Courier New, Courier, monospace;">xrange()</span></b> becomes the simpler <span style="font-family: Courier New, Courier, monospace;"><b>range()</b></span> function.<br /><br /><i>(sadly the 3d code requires the mayavi libraries which are not yet ported to Python 3)</i><br /><i><br /></i>MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-56024102581592709262016-04-19T21:29:00.000+01:002016-04-19T21:29:26.928+01:00Republished for Better FormattingI've republished the <a href="http://www.amazon.co.uk/dp/B01EET6WUE">kindle</a> and <a href="https://www.amazon.co.uk/dp/1500552968">print</a> book.<br /><br />The main reason is that a few people with older kindle devices didn't have great experiences with the formatting. For some images didn't show properly, for others, the margins were wonky, etc<br /><br />This is sad because it shouldn't be that hard to get right in 2016. The core problem is that ebook file formats are not open, stable and implemented in an interoperable way. It's like the web 20 years ago - with big companies not implementing web standards properly, and deliberately trying to pervert them to their own ends. Thankfully after 20 years - that's all settled down and usable.<br /><br />I took the decision to publish the ebooks using Amazon's new Kindle Textbook format. That promises to have much greater certainty over layout, even for complex content, ... like a PDF. This will be great for people who want to see a page more or less as it was intended., and certainly not mashed up.<br /><br />The following are screenshots from my Android phone's Kindle app - and it looks fantastic!<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-h5fD5a-_CRo/VxaUWXYRsWI/AAAAAAAAASE/UfVEmlC_wzYIiZrM7lH-WwWVNkevt275QCLcB/s1600/b.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://2.bp.blogspot.com/-h5fD5a-_CRo/VxaUWXYRsWI/AAAAAAAAASE/UfVEmlC_wzYIiZrM7lH-WwWVNkevt275QCLcB/s200/b.jpg" width="200" /></a> <a href="https://1.bp.blogspot.com/-Z8IUXVvdqBo/VxaUWMrQphI/AAAAAAAAASA/WYDrWFABVQ0Dp6NIae4ccQwrOSoGY0SzACKgB/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://1.bp.blogspot.com/-Z8IUXVvdqBo/VxaUWMrQphI/AAAAAAAAASA/WYDrWFABVQ0Dp6NIae4ccQwrOSoGY0SzACKgB/s200/a.jpg" width="194" /></a></div><br />There is a down side - those with older Kindles that can't support this new Textbook format, won't be able to buy the book. So happier readers, but fewer of them. I didn't take that decision lightly but not having unhappy readers was a priority for me. MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-87967485127794281202015-03-03T16:59:00.001+00:002015-03-03T16:59:27.909+00:00London Python GroupI was lucky enough to present a flash talk on <a href="http://www.amazon.co.uk/Make-Your-Mandelbrot-Tariq-Rashid-ebook/dp/B00JFIEC2A">Make Your Own Mandelbrot</a> at the <a href="http://www.meetup.com/The-London-Python-Group-TLPG/events/220469734/">London Python Grou</a>p.<br /><br />One of the great things about such grassroots groups is the openness, honestly and generousness - unlike corporate events. I picked up some pointers on things I didn't know:<br /><br /><ul><li>The <a href="http://cyrille.rossant.net/ipython-cookbook-released/">IPython Cookbook</a> has some content on interactive UI elements (widgets) for IPython Notebooks. Something I always wanted to know how to do.</li></ul><ul><li>An <a href="http://nbviewer.ipython.org/github/root-11/CUDA_mandelbrot_numbapro/blob/master/CUDA_mandelbrot_numbapro.ipynb">example </a>of GPU accelerated computation in IPython notebooks for generating Mandelbrot fractals. </li></ul><br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-LkOSnwVMEAs/VPXoB8vJcQI/AAAAAAAAARU/84YuuiqoYdg/s1600/mandel_cuda.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-LkOSnwVMEAs/VPXoB8vJcQI/AAAAAAAAARU/84YuuiqoYdg/s1600/mandel_cuda.png" height="232" width="400" /></a></div>MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-22767930992920468072015-02-08T15:02:00.001+00:002015-02-08T15:03:34.579+00:00Make Your Own Neural NetworkI'm now focussing on my next ebook Make Your Own Neural Network.<br /><br />The central idea is the same, to make sure that anyone with interest and nothing more than school-level maths can understand how neural networks work, and appreciate the pretty cool concepts on the way! Again we'll use Python and assume no previous knowledge of programming.By the end of the guide, you'll have built a simple neural network that recognises human handritten numbers. <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://makeyourownneuralnetwork.blogspot.co.uk/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-S2vXA89S6Gk/VNd6Qj5lY6I/AAAAAAAAAQ0/8ohJW9bSjhg/s1600/brain.jpg" /></a></div> <br />You can follow progress and discussions at: <a href="http://makeyourownneuralnetwork.blogspot.co.uk/">http://makeyourownneuralnetwork.blogspot.co.uk/</a> and <a href="https://twitter.com/myoneuralnet">@myoneuralnet</a>MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-5261904737813960532014-10-24T00:13:00.000+01:002014-10-24T00:13:49.362+01:00LinuxVoice MagazineI'm really pleased that <a href="http://www.linuxvoice.com/">LinuxVoice </a>Magazine has published the first of my 2-part series on Python and the Mandelbrot fractals.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-RcZartzyE2g/VEmKNlJhU2I/AAAAAAAAAQg/ziMCgIhWn68/s1600/IMG_20141023_233616_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-RcZartzyE2g/VEmKNlJhU2I/AAAAAAAAAQg/ziMCgIhWn68/s1600/IMG_20141023_233616_FotoSketcher.jpg" height="320" width="245" /></a></div><br />I hope the series will inspire those completely new to programming to try it - the tutorials require no previous experience at all.<br /><br />And I also hope the mathematics - which is no more difficult than school maths - will inspire young and old by showing that it can be surprising, exciting and beautiful!<br /><br />I'd like to thank Graham, the editor of LinuxVoice, for being so accommodating, helpful and patient with me.<br /><br />By the way, I've been reading computer magazines for over 20 years and LinuxVoice has refreshed enthusiasm, community spirit, and quality content - best wishes for its future!<br /><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-2zHI5rADDUQ/VEmKNbjEjUI/AAAAAAAAAQY/askkZ_gpvrc/s1600/IMG_20141023_233934_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-2zHI5rADDUQ/VEmKNbjEjUI/AAAAAAAAAQY/askkZ_gpvrc/s1600/IMG_20141023_233934_FotoSketcher.jpg" height="236" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-OjLUI0F1JL8/VEmKNGBjSUI/AAAAAAAAAQU/AiElontEwFE/s1600/IMG_20141023_234019_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-OjLUI0F1JL8/VEmKNGBjSUI/AAAAAAAAAQU/AiElontEwFE/s1600/IMG_20141023_234019_FotoSketcher.jpg" height="236" width="320" /></a></div><br /><div class="separator" style="clear: both; text-align: center;">Grab a copy of issues 009 and 0010 - out now and next month!</div><div class="separator" style="clear: both; text-align: center;"><br /></div><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-26828521467853785982014-09-27T00:12:00.001+01:002014-09-27T00:12:51.404+01:00Oil Painting FractalsI was exploring artistic filters in image editing software - you know the kind that make an image look like it was really sketched with an ink pen or painted in watercolours.<br /><br />The usual software wasn't doing it for me because the effects looked very fake, so I explored further and found the free <a href="http://www.fotosketcher.com/"><b><span style="font-family: inherit;">FotoSketcher</span></b></a>. Its focus is purely on such effects - and it's brilliant. I particularly like the Painitng 5 (watercolour) and Painting 6 (oil) effects - they are very realistic.<br /><br />Then it struck me - what if I applied these filters to fractal images? The results, in my opinion, are fantastic! Enjoy .... and do try it yourself!<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-oJK2d2XWrQM/VCXr9Gx9mWI/AAAAAAAAAPM/QlqGhRaxhXc/s1600/3_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-oJK2d2XWrQM/VCXr9Gx9mWI/AAAAAAAAAPM/QlqGhRaxhXc/s1600/3_FotoSketcher.jpg" height="320" width="319" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/--06DtFdzRIw/VCXr8K4Pl9I/AAAAAAAAAPA/59nuTrhBjog/s1600/2%2B(2)_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/--06DtFdzRIw/VCXr8K4Pl9I/AAAAAAAAAPA/59nuTrhBjog/s1600/2%2B(2)_FotoSketcher.jpg" height="263" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-CJZ-MLobquw/VCXsCgnTBOI/AAAAAAAAAPc/SExByTtAdio/s1600/fract0_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-CJZ-MLobquw/VCXsCgnTBOI/AAAAAAAAAPc/SExByTtAdio/s1600/fract0_FotoSketcher.jpg" height="186" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Cm2VnJeVZQg/VCXsECKpVQI/AAAAAAAAAPo/UBTbQTRCWIw/s1600/fract3_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-Cm2VnJeVZQg/VCXsECKpVQI/AAAAAAAAAPo/UBTbQTRCWIw/s1600/fract3_FotoSketcher.jpg" height="186" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-vZiNyoNkmtA/VCXxcdM90tI/AAAAAAAAAP8/cGtUWv-OMIs/s1600/m2_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-vZiNyoNkmtA/VCXxcdM90tI/AAAAAAAAAP8/cGtUWv-OMIs/s1600/m2_FotoSketcher.jpg" height="224" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-L0YOPYpMWN4/VCXr_AQPnRI/AAAAAAAAAPU/dFb9XN4U1kc/s1600/box1_www2_FotoSketcher.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-L0YOPYpMWN4/VCXr_AQPnRI/AAAAAAAAAPU/dFb9XN4U1kc/s1600/box1_www2_FotoSketcher.jpg" height="220" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div>MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-5587777618865218602014-08-27T00:52:00.002+01:002014-09-02T00:04:56.907+01:00Pure Web Mandelbrot ExplorersI love tools that are purely web based.<br /><br />The benefits are huge - you don't need to install any software, the software is automatically updated by the supplier, it works across any operating system or device or brand as long as it supports modern open web standards. You can carry on working between devices, from different location, and you don't lose your work if your local device breaks.<br /><br />You can do quite a lot with pure web technologies - Google's office productivity suite is a great example, so is wakari.io's IPython in the cloud.<br /><br />You can explore the Mandelbrot fractals purely with a web browser too.<br /><br />I love the following tools I discovered recently:<br /><br /><ul><li><b><a href="http://davidbau.com/mandelbrot/">http://davidbau.com/mandelbrot/</a></b></li></ul><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://davidbau.com/mandelbrot/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-UPtfxlyj2vo/U_0dKIVwdjI/AAAAAAAAANs/rAaZg3KJ-30/s1600/www1.png" height="236" width="400" /></a></div><br /><br /><ul><li><b><a href="http://mandelbrot-set.com/">http://mandelbrot-set.com/</a></b></li></ul><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://mandelbrot-set.com/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-2m1UJ-IiBPI/U_0dUH_zyBI/AAAAAAAAAN0/b1Tbxvbr0wo/s1600/www2.png" height="235" width="400" /></a></div><br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-2599411762260342612014-08-26T18:21:00.000+01:002014-08-27T00:08:47.452+01:00The Complex Plane And Plottable ArraysSome readers have asked me to explain the slightly complicated translation between the complex plane (where the Mandelbrot set really lives) and the Python arrays used to plot the images.<br /><br />The reason for the complexity is that:<br /><ul><li>The complex plane is continuous, just like the real number line.</li><li>Python arrays are discrete, filled with finite boxes. </li><li>What's more, the elements of python arrays are labelled using integers starting from zero. You can have <b><span style="font-family: "Courier New",Courier,monospace;">array[2, 3]</span></b> but not <span style="font-family: "Courier New",Courier,monospace;"><b>array[-2.34, </b><b>+4.3398]</b>.</span> </li><li>We have to plot arrays, even though we really want to see the complex plane. This is the core reason we need to translate between the complex number plane world, and the python array world.</li></ul><br />The translation itself is simple. We divide up the complex plane into equally spaced and sized sections. There are an integer number of these - and so they can be represented by the elements of an array.<br /><br />So when we choose an element n out of N along a section which started at x1 and ended ay x2, the element n corresponds to x1 + (x2-x1)*(n/(N-1)). You can see here that n/N is the proportion between x1 and x2 that n lies.<br /><br />If this expression looks complicated to you - it's just working out how far from x1 towards x2 we need to go in the same proportion as n out of N pieces. <br /><br />Ah - and don't forget n starts at 0 and ends at N-1, which makes sense so that when n=0 we have the position x1. Similarly when n is the last N-1, it corresponds to x2.<br /><br />The following diagram shows our explanation visually: (click to enlarge)<br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-JA2ITW3gopg/U_zA6DGtatI/AAAAAAAAANc/1CLpsJpsG_c/s1600/image91.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-JA2ITW3gopg/U_zA6DGtatI/AAAAAAAAANc/1CLpsJpsG_c/s1600/image91.png" height="147" width="400" /></a></div><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-70425671709860698112014-08-26T17:17:00.000+01:002014-09-14T23:46:18.454+01:00The Deep Connection Between Julia and Mandelbrot FractalsThe Julia and Mandelbrot fractals are intimately connected.<br /><br />They are both generated by iterating the simple function <b>z<sup>2</sup> + c</b>. <br /><br />For the Mandelbrot set, z starts as the value of the point being tested on the complex plane, and c is zero. In effect the function becomes <b>z<sup>2</sup></b> because c is zero.<br /><br />For the Julia sets, c is set to a contant value throughout all the calculations. In thisway, c uniquely defined that particular Julia fractal. That same c always generates that same pattern.<br /><br />If you've explored the Julia and Mandelbrot sets, you may suspect that there is a connection between the two. In fact there is:<br /><br /><ol><li>Julia sets whose unqiue c value falls inside the Mandelbrot set are connected - that is, they are all one piece.</li><li>Julia sets whose unique c value fall outside the Mandelbrot set are not connected - that is, they consist of many disconnected pieces. </li><li>Julia sets whose c lies further away from the Mandelbrot set have greater fragmentation, until they become almost dust like.</li></ol><br />The following digram summarises this deep connection: (click to enlarge) <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-rBYrTMcPFoo/VBYanQ2I0XI/AAAAAAAAAOU/Wdb31aCoa_I/s1600/box1_manjulia.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-rBYrTMcPFoo/VBYanQ2I0XI/AAAAAAAAAOU/Wdb31aCoa_I/s1600/box1_manjulia.png" height="243" width="400" /></a></div><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-53794490394993747242014-08-09T02:40:00.001+01:002014-08-09T02:40:30.203+01:00Slides.com for PyData London MeetupI'll be presenting a five minute flash presentation on Make Your Own Mandelbrot on the 2nd September for the <a href="http://www.meetup.com/PyData-London-Meetup/">London PyData Meetup</a>.<br /><br />A perfect excuse to try out alternative slide presentation tools!<br /><br /><a href="http://prezi.com/">Prezi</a> was nice but it's expensive. <a href="http://bartaz.github.io/impress.js/#/bored">Impress.js</a> is flexible but not great if you don't want to hand edit code.<br /><br /><a href="http://slides.com/">Slides.com</a> is great! Easy, beautiful, and with a free option too.<br /><br />He's the current iteration:<br /><div style="text-align: center;"><br /></div><div style="text-align: center;"><iframe allowfullscreen="" frameborder="0" height="420" mozallowfullscreen="" scrolling="no" src="//slides.com/makeyourownmandelbrot/make-your-own-mandelbrot/embed" webkitallowfullscreen="" width="576"></iframe></div>MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-7863055681865589642014-08-02T15:49:00.001+01:002014-08-02T22:52:32.524+01:00Home SchoolingI was pleased to hear a friend of mine bought the <a href="http://www.amazon.co.uk/dp/B00JFIEC2A/">Make Your Own Mandelbrot</a> ebook to inspire his child who was struggling to be excited by mathematics.<br /><br />He hoped that the easy, conversational, approach and the connection with unusual behaviours, and some fantastic images would excite his secondary school boy.<br /><br />He also hoped the introduction to Python would ease the path into computer literacy, addressing a fear of the "technical stuff that happens under the hood". I found this suprising because most boys, including this one, were avid computer and games console users - but upon reflection that is different from playing with programming and electronics, and ultimately computational thought.<br /><br />I wish him well and I hope others will too! The summer holidays are an ideal time to play with mathematics and computer programming in a fun recreational way, and not have the pressure of any teacher marking your work!<br /><br /><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-phTfeh2K5DE/U9z6ZRQwyjI/AAAAAAAAAM4/eMZofxwU9_Y/s1600/back-to-school_lzn.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-phTfeh2K5DE/U9z6ZRQwyjI/AAAAAAAAAM4/eMZofxwU9_Y/s1600/back-to-school_lzn.jpg" height="266" width="400" /></a></div><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-66177941500842802542014-07-20T23:44:00.000+01:002014-07-22T00:17:37.450+01:00Errata #1Thanks to the generous person who submitted the following error in the ebook.<br />It is in the section on mathematical operations on complex numbers.<br /><br /><b><span style="font-family: "Courier New",Courier,monospace;">In the book (a + bi) + (c + di) = <span style="background-color: #f9cb9c;">(a + b) + (c + d)i</span></span></b><br /><b><span style="font-family: "Courier New",Courier,monospace;">Should be (a + bi) + (c + di) = <span style="background-color: #cfe2f3;">(a + c) + (b + d)i</span></span></b><br /><b><span style="font-family: "Courier New",Courier,monospace;"><br /></span></b><b><span style="font-family: "Courier New",Courier,monospace;">In the book (a + bi) – (c + di) = <span style="background-color: #f9cb9c;">(a - b) + (c - d)i</span></span></b><br /><b><span style="font-family: "Courier New",Courier,monospace;">Should be (a + bi) – (c + di) = <span style="background-color: #cfe2f3;">(a - c) + (b - d)i</span></span></b><br /><br />I'll update the ebook asap and you should be able to request Amazon Kindle to get an updated version at no extra cost. I understand the updates aren't always automatically pushed out by Amazon.<br /><br />UPDATE: Amazon Kindle ebook is now updated with this correction.<br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-48332267023235868662014-07-17T23:14:00.002+01:002014-07-17T23:14:17.867+01:00CreateSpace PaperbackMake Your Own Mandelbrot is now available as a paperback from <a href="https://www.createspace.com/4908787">CreateSpace</a>. You'll be able ot get paperbacks from Amazon soon.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://www.createspace.com/4908787" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-d_NQ82YGGnw/U2AfFv_2B8I/AAAAAAAAAHM/pwGkX8wXvPE/s1600/a.jpg" height="320" width="207" /></a></div><br />Thanks for the feedback from those of you who prefer a real book in your hands over a glowing electronic thing! MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-15210423936171158452014-07-02T22:39:00.000+01:002014-07-02T22:39:16.878+01:00Google IPython?IPython is great.<br /><br />It's a full Python, with many of the most useful and popular extensions for numerical computing and visualisation.<br /><br />For many, it is the place to do both Python programming, numerical computing and data science.<br /><br />Even better, IPython can be pure web. That is, you can work with it, fully and interactively, using only a modern web browser. No need to install and configure any software at all. This is immensely powerful, because you can keep your work in the cloud, leave and carry on at a later time from any device with a browser, be that a laptop or a tablet, or even a smartphone.<br /><br />Now imagine Google with its vast compute and storage resources offered an IPython service. That would be an immensely powerful combination.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/--uabVGL3nrY/U7R75EdVlWI/AAAAAAAAAMg/aOEjPHIkVJM/s1600/googleapps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/--uabVGL3nrY/U7R75EdVlWI/AAAAAAAAAMg/aOEjPHIkVJM/s1600/googleapps.png" height="193" width="320" /></a></div>And Google could. They love Python, their App Engine runs it. There's a "numerical compute and cloud programming" gap in their web app range.<br /><br />Plus they'd love the social sharing of IPython notebooks.<br /><br />When, not if?<br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-56812513729162914122014-07-02T00:24:00.002+01:002014-07-02T00:24:42.010+01:00Raspberry Pi for Younger LearnersThe <a href="http://www.raspberrypi.org/">Raspberry Pi</a> is perfect for younger learners. It's simple, cheap, fun and a great way to learn about computer hardware and programming. For all these reasons the Pi is increasingly popular in schools and for home education.<br /><br />The Raspberry Pi, and much of tutorial ecosystem around it, promotes Python as an ideal programming language - and quite right too!<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-B9z-MtbDKbo/U7NDDT3EcKI/AAAAAAAAAMQ/7M4DrvfKR2U/s1600/Raspi_Colour_R.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-B9z-MtbDKbo/U7NDDT3EcKI/AAAAAAAAAMQ/7M4DrvfKR2U/s1600/Raspi_Colour_R.png" height="200" width="165" /></a></div><br />I intend to get a Pi for my own child, and will confirm that the content of the ebook works, and I'll explain any special steps you have to take to install IPython, if any at all.<br /><br />Of course, you're still encouraged to use the cloud based IPython, from <a href="http://continuum.io/wakari">continuum.io</a> for example, because all you need is a browser, with no need for software installation of configuration.<br /><br />Perfect for the Pi!<br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-34129051684203418352014-06-21T16:00:00.000+01:002014-06-21T16:00:22.247+01:00Mindmup: Organising Your ThoughtsWhether you're writing a book, code, or a school essay, I really recommend visually planning out your thoughts.<br /><br />The problem with pen and paper is that correcting and re-arranging your ideas gets messy, and defeats the original idea.<br /><br />There are many software tools to do mindmapping, and honestly, the few that I've tried have been more of a pain than a help.<br /><br />I recentl found <a href="http://www.mindmup.com/">mindmup</a>. I love it! And recommend it. It's free. Open source. Works with Google Docs seamlessly. Exports useful formats like PNG and PDF.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-bfxo3cqNgms/U6WdZ_BME4I/AAAAAAAAAL4/4KgiKVYyjrY/s1600/mindmup.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-bfxo3cqNgms/U6WdZ_BME4I/AAAAAAAAAL4/4KgiKVYyjrY/s1600/mindmup.png" height="156" width="320" /></a></div><br />And more to the point, it is really friction free. For me it has been the best tool, just stays out of the way like a good tool should.MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-76116971227026235562014-06-08T01:34:00.001+01:002014-06-08T21:36:49.594+01:00Complex Numbers Are More Complete Than RealsWe've previously explained what complex numbers are, and how to work with them.<br /><br />What we perhaps didn't explain so clearly is why we need complex numbers. Sure they've turned out to be very very useful for simplifying calculations about the real world, but what's a good motivation for them?<br /><br />A great explanation came from this fantastic book: <a href="http://www.amazon.co.uk/Elliptic-Tales-Curves-Counting-Number/dp/0691151199">Elliptic Curves</a>.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://www.amazon.co.uk/Elliptic-Tales-Curves-Counting-Number/dp/0691151199" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-q-CFxUhCKxs/U5Oiyvn67mI/AAAAAAAAALM/oeB-iV-c6go/s1600/k9665.gif" height="320" width="210" /></a></div><br />The book itself aims to do what Make Your Own Mandelbrot wants to do - share some of the most amazing and beautiful mathematics to as wide an audience as possible by taking readers through the concepts gently using clear English. I've just finished Chapter 2 and I can't wait to get through the rest of it.<br /><br />Anyway, this book's explanation is super simple:<br /><ol><li>It is nice to have a system of numbers, or things like "numbers" where a set of operations (like add, subtract, multiply, divide) on any of these numbers results in numbers that are also in the same system.</li><li>The normal number system we all learned about at school, and use everyday, seems to be complete in this sense. That's the system of "<a href="http://en.wikipedia.org/wiki/Real_number">reals</a>" such as 1.0, 3.44, -5.6, 999.22 and so on. We can add two of these numbers and the result is also in this system.</li><li>The problem arises when we look at polynomials whose coefficients are also taken from this same system, the real numbers. We would like the roots of these polynomials to also be found within this same system of reals. The polynomial (x-1)(x+2)(x-3) has roots that are x=1, -2 and 3. But some polynomials like x<sup>2</sup> + 1 don't have roots from the real numbers. </li><li>So we have to extend the real number system so that these polynomials have roots that are always within the extended number system. That extended number system is the complex numbers (a+bi).</li><li>The nice thing about this system that we appear to have invented is that polynomials with complex coefficients, always have roots also in the set of complex numbers. This now means we have a more "complete" system. The real numbers weren't complete (<a href="http://en.wikipedia.org/wiki/Algebraically_closed_field">algebraically closed</a>) in this sense - polynomials built from real coefficients sometimes didn't have roots in the real numbers.</li></ol><br />I'm really excited by this super clear explanation. <b>Why don't more authors do this?</b><br /><br />Anyway, here's a summary:<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/---Q8fdQjBbo/U5OvH_gHT1I/AAAAAAAAALo/SUdSOrjFLqo/s1600/summary.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/---Q8fdQjBbo/U5OvH_gHT1I/AAAAAAAAALo/SUdSOrjFLqo/s1600/summary.png" height="181" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-jCExPpFJn3I/U5OtoJDRZFI/AAAAAAAAALg/exy_tMizdlc/s1600/summary.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div><div class="separator" style="clear: both; text-align: center;"></div><ol></ol>MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-44024944582352660772014-06-06T23:50:00.001+01:002014-06-06T23:53:42.546+01:00(Fixing) Kindle Ebooks Wth Google DocsThere are many tutorials out there on making ebooks. The truth is that right now there are no good tools, the technical file formats for ebook are not great, in flux, and on top of this not well or consistently supported. Even lots of money won't buy you good tools - the Adobe Indesign plugin doesn't magically transform your works of art into perfect ebooks.<br /><br />I used <a href="https://drive.google.com/">Google Docs</a> (now called Drive) to type my material, and insert diagrams and images. I did use titles, headings, subtitles to give the documenty some structure. The great thing about Google Docs is that it's free, accessible from almost anywhere with no need to install software, ... very convenient and efficient. Your content in Google Docs can be exported in a range of useful formats, including Microsoft Office, ODF, PDF, and HTML.<br /><br />The steps for making a Kindle ebook is simple:<br /><ol><li>Export your doument as HTML. This will give you a zippled folder with the content and any images that you used.</li><li>Import the main HTML document into <a href="https://code.google.com/p/sigil/">Sigil</a>. Use Sigil to add a cover, book metadata such as title and author, and contents. You might like to split up a long document into separate HTML sections. This is also your opportnity to clean up the content, remove additional spaces, blank lines, centre things that weren't.</li><li>Export an epub from Sigil. This is an open file format for ebooks, and quite well supported by many readers but not perfectly, as I said above. </li><li>Amazon doesn't like epubs so they convert it to their own format when you upload it to their site. </li></ol>Note that I didn't use the Calibre software much recommended. I suspect that as Sigil is not actively developed, I will eventuallyhave to learn to use Calibre. My experiments with it weren't great - all the epubs I could get out of it were not as good as the straight HTML to epub conversion by Sigil.<br /><br />You might want to use preview <a href="http://pressbooks.com/blog/tools-for-testing-your-ebooks-aka-what-will-your-epub-look-like-in-the-wild">tools</a> to check your epub file works and get an indication of what it might look like on real physical readers.<br /><br />Just this week I fixed an annoying problem which seemed to only affect Android Kindle readers which seemed to force very wide margins, meaning the content was squished into a very thin column. The usual internet search led to messing about CSS styles to override the margin, border and padding settings. It didn't work. The answer was actually to go back to the Google Docs document and use the page setup menu to zero the page margins...voila! That worked!<br /><br />Hope this helps someone else.<br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-68265274548101857152014-06-01T16:00:00.001+01:002014-06-01T16:04:47.743+01:00FeedbackThanks for the feedback on the <a href="http://www.amazon.co.uk/dp/B00JFIEC2A">Make Your Own Mandelbrot ebook</a> - keep it coming.<br /><br />So far the main requests have been:<br /><ul><li>A super simple walkthrough of working with complex numbers with clearer examples. Perhaps as an Appendix. Someone also asked why we avoided talking about dividing complex numbers. </li></ul><ul><li>A discussion of why the 3D section extends the 2D fractals into 3dimesnions but doesn't actually use 3D versions of complex numbers. It seems that several readers have naturally asked the question we discussed in a previous post. </li></ul><br />Great ideas! I think a second edition is starting to form ... And please do keep your suggestions coming in, they all contribute to an even better second edition.<br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-12917152614083229302014-05-31T00:07:00.002+01:002014-05-31T00:07:36.482+01:00Colouring The Inside #2And taking the idea of the last post to Julia sets produces some wonderful images.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-j6JKObuUv9o/U4kO718cDbI/AAAAAAAAAKo/uNXhEP-Opds/s1600/fract7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-VR3ZN4tWPzg/U4kO6bvKyKI/AAAAAAAAAKc/yMipeMFV3rY/s1600/fract0.png" height="116" width="200" /> <img border="0" src="http://1.bp.blogspot.com/-j6JKObuUv9o/U4kO718cDbI/AAAAAAAAAKo/uNXhEP-Opds/s1600/fract7.png" height="116" width="200" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-QR_Yx3_1jMI/U4kO7aB4pLI/AAAAAAAAAKk/BFWjL8F3-r4/s1600/fract10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-dJE6_3f4TdM/U4kO9cMlMJI/AAAAAAAAAK0/B3rAJpA4qmA/s1600/fract8.png" height="116" width="200" /> <img border="0" src="http://2.bp.blogspot.com/-QR_Yx3_1jMI/U4kO7aB4pLI/AAAAAAAAAKk/BFWjL8F3-r4/s1600/fract10.png" height="116" width="200" /></a></div><br />Try it yourself with Xaos! <br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-77893972204627117572014-05-30T23:50:00.001+01:002014-05-30T23:50:58.538+01:00Colouring The InsideThe most common visualisations of the Mandelbrot set have the set itself coloured black, and the regions outside coloured. The colouring scheme usually reflect how quickly the points outside the set diverge.<br /><br />But what would happen if we applied similar logic to colouring the inside of the set, and left the outside black?<br /><br />The following images show the results. They provide an interesting insight into the dynamics of the set. It's a perspective you don't often see.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-SfHICpwpaFE/U4kKFBS1bkI/AAAAAAAAAJ4/JKe_BND31uM/s1600/fract2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-F1R2lFL9Dkw/U4kKDdqTdFI/AAAAAAAAAJ0/DSQBCnBA2bw/s1600/fract1.png" height="115" width="200" /> <img border="0" src="http://4.bp.blogspot.com/-SfHICpwpaFE/U4kKFBS1bkI/AAAAAAAAAJ4/JKe_BND31uM/s1600/fract2.png" height="115" width="200" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-Ff4H5fBiADw/U4kKG1Dg_QI/AAAAAAAAAKM/v1quLtJ8CXM/s1600/fract4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-3owGDTZGa7A/U4kKELGBHfI/AAAAAAAAAJ8/UWcPTWchcTo/s1600/fract3.png" height="116" width="200" /> <img border="0" src="http://2.bp.blogspot.com/-Ff4H5fBiADw/U4kKG1Dg_QI/AAAAAAAAAKM/v1quLtJ8CXM/s1600/fract4.png" height="116" width="200" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-gdMHRkSnydg/U4kKVrRb1LI/AAAAAAAAAKU/8xGH6OVIIMQ/s1600/fract6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-z7jW2sslr58/U4kKG5p6vjI/AAAAAAAAAKI/cmu2h52FD_I/s1600/fract5.png" height="116" width="200" /> <img border="0" src="http://1.bp.blogspot.com/-gdMHRkSnydg/U4kKVrRb1LI/AAAAAAAAAKU/8xGH6OVIIMQ/s1600/fract6.png" height="116" width="200" /></a></div> You can create these yourself using <a href="http://matek.hu/xaos/doku.php">Xaos</a> by setting the in-colouring and out-colouring options.<br /><br /><br />I personally love the liquid metal look of some of the images!<br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-28323318558462195062014-05-26T15:26:00.001+01:002014-05-26T15:26:07.455+01:00Last Interview with Benoit MandelbrotThe last interview with Benoit Mandelbot himself, who disocered the Mandelbrot Set and coined term fractal.<br /><div style="text-align: center;"><br /></div><div style="text-align: center;"><iframe allowfullscreen="" frameborder="0" height="293" src="//www.youtube.com/embed/Ehwy4Gq27uY" width="480"></iframe></div><div style="text-align: center;"><br /></div><br />Benoit is much respected for having the determination to explore outside the mainstream, and it paid off.MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-37022133141224177352014-05-24T23:42:00.002+01:002014-05-24T23:42:48.343+01:00Beautiful BBC Documentary on Fermat's Last TheoremThe BBC has put up some of its best Horizon documentaries online to watch again.<br /><br />I would recommend everyone to watch the beautifully made, and at times, emotional documentary on Fermat's Last Theorem and Andrew Wiles' jounrey to crack it.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://www.bbc.co.uk/iplayer/episode/b0074rxx/horizon-19951996-fermats-last-theorem" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-rllLTp5pz_4/U4EfiFgcBLI/AAAAAAAAAJY/xQ6MGCDMyxU/s1600/p01gyvvd.jpg" height="225" width="400" /></a></div><br />The BBC does a fantastic job of giving us a taste of the stunning simplicity of the Theorem, the intricate battles of mind and will to prise open insights and make connections across the fields of mathematics, and the very human travails. The story of a quiet unassuming man who hid a determination and passion to solve the deceptively simple Theorem that had eludes so many for so long.<br /><br />Inspiring! I'd recommend all students watch it!<br /><br />If you can't receive IPlayer, because you're outside the UK, there's a version on YouTube too: <br /><div style="text-align: center;"><br /></div><div style="text-align: center;"><iframe allowfullscreen="" frameborder="0" height="293" src="//www.youtube.com/embed/7FnXgprKgSE" width="480"></iframe></div><div style="text-align: center;"><br /></div>MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-20068043215420517852014-05-22T22:06:00.002+01:002014-05-22T22:07:02.948+01:00FREE eBook on Bank Holiday Monday<a href="http://www.amazon.co.uk/dp/B00JFIEC2A/">Make Your Own Mandelbrot</a> will be FREE again on Bank Holiday Monday 26th.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://www.amazon.co.uk/dp/B00JFIEC2A/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-d_NQ82YGGnw/U2AfFv_2B8I/AAAAAAAAAHM/pwGkX8wXvPE/s1600/a.jpg" height="320" width="207" /></a></div><br />Make sure you grab your copy!<br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0tag:blogger.com,1999:blog-2319844292304540463.post-68444580860968032812014-05-18T16:46:00.000+01:002014-05-19T23:18:50.148+01:00Complex Numbers Explained<span style="font-size: large;"><b>Impenetrable Jargon </b></span><br /><br />I really displike how too many thngs in mathematics are not explained clearly and simply. Too often really cool things are kept out of the reach of normal people - because the explanations are written in some alien inaccessible language.<br /><br />What the mathematics community need to realise is - writing stuff in a language only a few of them understand is not big and it's not clever. I'm not impressed.<br /><br />What is clever - what is hard - is being able to explain those ideas so that the maximum number of people can understand and appreciate them. That should be the measure of success.<br /><br />If research grants and teaching salaries were based on this measure I wonder how quickly the profession, and the texts it publishes, would change?<br /><br />Anyway, I'm going to try to demystify complex numbers.<br /><br /><br /><span style="font-size: large;"><b>Complex Numbers Are Not Complex</b></span><br /><br />Complex numbers are not complex. That's a really unfortunate name which scares people. It's an accident of history. They should have been called composite or 2-part numbers, or anything that doesn't put barriers up straight away.<br /><br />Normal numbers, like 2, 3, 4.5, 9.332 are 1-dimensional. That is they describe one thing and only one thing. They could be the length of a rope, or the time it took to finish a race. They can't describe two things at the same time. That is, you can't use a single 1-dimensional number to describe both the width and length of a swimming pool - you have have to have two numbers, one for the width and one for the length.<br /><br />Complex numbers are 2-dimensional. They have 2 parts. These two parts are independent of each other. One part can do what it likes and is not in any way influenced or constrained by the other. The two parts of a complex numebr are like apples and oranges. You can't mix them up, an apple will always be an apple and not an orange. This is an important thing to keep im mind when we combine complex numbes later.<br /><br />The following shows the two parts of a complex number. They just happen to be called the real part and the imaginary part. Again, don't let these names put you off, they have been settled on without anyone really considering the best names for these parts.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-O2mXfWrr5xE/U3jH5MK5rHI/AAAAAAAAAI4/aF6H-6F-yhk/s1600/complex_number_parts.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-O2mXfWrr5xE/U3jH5MK5rHI/AAAAAAAAAI4/aF6H-6F-yhk/s1600/complex_number_parts.png" height="237" width="320" /></a></div><br />We could have written these two parts in a different way. For example, (2,3) or (2,3i) or (3i,2) or even (3i+2) ... but the convention is (2+3i) and sometimes without the brackets when it is clear enough what we mean 2+3i. Again, this is just a convention that we arrived at through history becuase it worked well for lots of people. If you are an engineer, you may have seen the symbol j used instead of i. That's ok becuase those engineers often use i to mean other things - they use j to avoid ambiguity. So they might write (2+3j), but most people use i.<br /><br />What are these numbers good for? Well they are in fact really useful for lots of things in science and engineering, not just for making fractal images!<br /><br />For now let's just notice that these 2-part complex numbers are very similar to coordinates locating points on a flat 2-dimensional surface. Just like a map grid reference or the familiar (x,y) coordinates when we work with graphs. We can in fact think of comlex numbers as points on a flat surface becuase they have two independent parts. Look at the following diagram and you'll see they aren't that different to the normal (x,y) coordinates for points on a graph.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-XFSfZtVDqu8/U3jI6le_M3I/AAAAAAAAAJA/yDIo04bsav0/s1600/complex_plot_2examples.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-XFSfZtVDqu8/U3jI6le_M3I/AAAAAAAAAJA/yDIo04bsav0/s1600/complex_plot_2examples.png" height="176" width="400" /></a></div><br />The first diagram shows the complex number (3+2i). You can see the horizonal distance is 3 and th evertical distance is 2. This is just like (3,2) on the more familiar (x,y) graphs. The second digram shows (-2-2i) which is just like (-2,-2) on (x,y) graphs.<br /><br />Ok so complex numbers can very easily represent points on a flat surface, just like (x,y) graph coordinates.<br /><br />That was easy enough! <br /><br /><span style="font-size: large;"><br /></span><span style="font-size: large;"><b>Add, Subtract, Multiply with Complex Numbers</b></span><br /><br />What about the normal rules of arithmetic? Adding, subtracting, multiplying? Do they make sense for these strange objects we seem to have invented called complex numbers? Let's deal with adding and subtracting first because they are really easy.<br /><br /><b>Adding </b>complex numbers is really really really easy! Remember when we said the real and imaginary parts of a complex number are like apples and oranges. We said that these were independent because and you can't change an apple into an orange, and the number of apples doesn't influence the number of oranges at all. Well that's really handy. Because if we want to add two complex numbers we simply add up all the apples from the two numbers to tell us how many apples should be in the answer. The same for oranges. Another way os saying this is that we combine the real and imaginary parts separately.So (2+3i) added to (4+5i) means we combine the 2 and 4 (real parts) and also combine the 3 and 5 (imaginary parts). The answer is (6+8i).<br /><br />If you're still struggling, think of adding the 2 apples to the 4 apples to make 6 apples. Then adding 3 oranges to the 5 organges to make 8 oranges. These are the two parts of the answer:<br /><br /><div style="text-align: center;"><b><span style="color: #cc0000;">(2 apples</span></b>, <b><span style="color: orange;">3 oranges</span></b>) + (<b><span style="color: #cc0000;">4 apples</span></b>, <b><span style="color: orange;">5 oranges</span></b>) = (<b><span style="color: #990000;">6 applies</span></b>, <b><span style="color: orange;">8 oranges</span></b>)<br /> </div><div style="text-align: center;">(<b><span style="color: #cc0000;">2</span></b> + <b><span style="color: orange;">3i</span></b>) + (<b><span style="color: #cc0000;">4</span></b> +<b><span style="color: orange;">5i</span></b>) = (<b><span style="color: #cc0000;">6</span></b> + <b><span style="color: orange;">8i</span></b>)</div><br />TIP: Did you know that Google can do maths with complex numbers for you. Try it! Type <a href="https://www.google.co.uk/search?q=%282%2B3i%29+%2B+%284%2B5i%29">(2+3i) + (4+5i)</a> into the Google search box and you'll get the answer!<br /><br />What about <b>subtraction</b>? It's the same. You combine the independent real and imagines parts by subtracting them instead of adding them. Or if you prefer, you subtract the apples, then you subtract the oranges. So (2+3i) - (4+5i) = (-2 -2i). Yes, these have negative parts because 2-4 is -2, and 3-5 is also -2. Again <a href="https://www.google.co.uk/search?q=%282%2B3i%29+-+%284%2B5i%29">Google</a> can do this too.<br /><br />Actually this is just like adding and subtracting the familiar (x,y) coordinate vectors if you know about those already.<br /><br />What about <b>multiplication</b>? This is again just like the normal maths that we know, exceot for one tiny special difference. In fact, to make sure no-one is put off by special differences, we'll tell you know that this single tiny difference is the ONLY difference you need to know about. Once you get it, there are no more hidden suprises later on. That single difference is the only thing you need to remember when working wih complex numbers<br /><br />So how do we multiply complex numbers? Well remember the familiar matrix multiplication? Multiplying (a + b) by (c + d) was done my multiply each combination of things inside the brackets. So to make the answer you'd have to work out a*c, a*d, b*c and b*d ... and once you'd done all t he laborious work you'd collect terms that were similar.<br /><br />Let's illustrate this with an example (2x + 3y) * (4x + 5y). We've chosen to include x and y bits because of we didn't the example would be too easy and not illustrate collecting like terms: (2+3) * (4+5) is just 5*9 which is just 45. So let's expand those brackets out. The bits we will collect are 2x*4x, 2x*5y, 3y*4x and 3y*5y. Nothing new here, just what we would normally do. Do the multiplications and we get 8x<sup>2</sup> + 10xy + 12xy + 15y<sup>2</sup>. We have collected all the similar terms yet, there are "xy" bits. Once we've tidied it all up we get 8x<sup>2</sup> + 22xy + 15y<sup>2</sup>. Notice there are 3 kinds of animal here, the x<sup>2</sup> bit, the y<sup>2</sup> bit and the xy bit. We can't simplify any further because the xy bit can't become x<sup>2</sup> as they are indepdnent different animals - just like apples and oranges are independent. <br /><br />Noe let's do this familiar multiplication of brackets with complex numbers. Let's try (2+3i) * (4+5i). The answer will have to have the combinations 2*4, 2*5i, 3i*4 and 3i*5i. Lets do the multiplications to get 8 + 10i + 12i + 15i<sup>2</sup>. Let's carry on tidying up by collecting the similar terms to get 8 + 22i + 15i<sup>2</sup>. This just like the example above which used x and y instead of real and imaginary parts - that's why we get the same numbers 8, 22, 15.<br /><br />So (2+3i) * (4+5i) gives 8 + 22i + 15i<sup>2</sup>. But we don't stop there. That one single special rule we mentioned for complex numbers allows us to replace the i<sup>2</sup> with something simpler.<br /><br /><div style="text-align: center;"><span style="font-size: large;"><b>The rule is i<sup>2</sup>= -1. </b></span></div><br />So i*i an always be replaced by -1. You don't have to but it helps simplify the expressions. This is a bit magical - combining two imaginary bits creates a real bit. The oranges multiplied together became a negative apple!<br /><br />Before you think complex numbers will have all sort os such crazy exceptions and rules - stop worrying now. That's the only rule you have to know - and it's really easy to remember.<br /><br />So if we apply it to the expression we replace 15i<sup>2</sup> by -15 .... to get the final answer: (2+3i) * (4+5i) = 8 - 15 + 22i or more simply <b>(-7 + 22i)</b>. Again you can check with <a href="https://www.google.co.uk/search?q=%282%2B3i%29+*+%284%2B5i%29">Google</a>. <br /><br />That's it! Easy peasy!<br /><br />We didn't do division because it's just a tinsy bit more complex in terms of messing about with algebra and doens't introduce new ideas, so we left it out to avoid distraction.<br /><br /><div style="text-align: center;">---</div><br />You can find a fuller explanation, slower in pace, and with more examples in the <a href="http://www.amazon.co.uk/dp/B00JFIEC2A">ebook</a>.<br /><br />MakeYourOwn Mandelbrothttps://plus.google.com/117559090770191530616noreply@blogger.com0