Introduction to Wolfram Mathematica programming

Mathematica is becoming an indispensable tool for doing all kinds of computation and it is important to know how to use it as it will leverage your problem-solving skills, allowing you focus on higher level issues of modelling solutions rather than focusing too much on calculational details.

I will be posting short lessons regularly and the good news is you don’t need to install anything locally as all examples can be run online. If you need to do any form of extensive programming you can always go to the Wolfram Cloud and click on Programming Lab and get access for free.

Instructions on running code

If you don’t have a Wolfram ID, create one as this will give you access to the Wolfram Cloud. After you have done this sign in. If you have one then simply sign into the Wolfram Cloud.

If you have downloaded the notebook file from the blog and saved it somewhere then do the following to upload it to the cloud so you can play with the code.…

By | May 9th, 2019|Level: Simple, Mathematica|0 Comments

Relativity, The Special and General Theory, 100th anniversary edition – by Albert Einstein

NB. I was sent this book as a review copy.

In 1917, two years after publishing his work on The General Theory of Relativity, Einstein published a popular science account of both The Special, and General Theories of relativity. It is with some embarrassment that I have to admit that I’d never read this before, despite taking a number of undergraduate and postgraduate courses in relativity. Einstein understood the importance that his results had on our understanding of the universe, but also that the profundity of them could not truly be grasped by the general public, despite the headlines which covered many newspapers around the world on his results, without a popular exposition. 1917 was the publication of the first edition of this explication, but he continued to update them up until 1954. This allowed him to extend the theoretical discussion with the experimental verifications and discoveries which occurred over the next decades, including that of the expanding cosmology, spearheaded by Hubble’s observations.…

By | April 19th, 2019|Book reviews, Reviews|1 Comment

Data Visualization, a practical introduction – by Kieran Healy, a review

NB. I was sent this book as a review copy.

I’m not an expert on the R programming language, but I have dabbled, which meant that while this book is perhaps aimed at slightly more advanced users (I’ve used it a half a dozen times for Coursera courses), I had enough to appreciate the value of this really lovely resource.

The book can be seen, I think, in two ways. One of the ways, which is the one which most interests me, is in explaining what it is that makes good data visualization captivating, clear and unambiguous. Interleaved in these ideas of aesthetics are the precisel methods to go about making such visualizations using the ggplot package in R.

The other way to look at the book is as a way to really get to grips with the advanced features of the ggplot package, which is taught via interesting examples of data visualization.…

By | March 27th, 2019|Book reviews, Reviews|1 Comment

Linear Algebra for the Memes

I recently saw a post on Quora asking what people generally find exciting about Linear Algebra, and it really took me back, since Linear Algebra was the first thing in the more modern part of mathematics that I fell in love with, thanks to Dr Erwin. I decided to write a Mathemafrica post on concepts that I believe are foundational in Linear Algebra, or at least concepts whose beauty almost gets me in tears (of course this is only a really small part of what you would expect to see in a proper first Linear Algebra course). I did my best to keep it as fluffy as I saw necessary. I hope you will find some beauty as well in the content. If not, then maybe it will be useful for the memes. The post is incomplete as it stands. It has been suggested that this can be made more accessible to a wider audience than as it stands by possibly building up on it, so I shall work on that, but for now, enjoy this!

By | March 10th, 2019|Uncategorized|0 Comments

All you’ve ever wanted to know about absolute values (and weren’t afraid to ask)

I’ve been getting a lot of questions about absolute values, and so I thought I would try and clarify things here as much as possible. I’ll give some basic definitions and intuition, and then go through some examples, from easier to harder.

The absolute value function is just….a function. You give it a number, and it returns a number. In the same way that f(x)=x^2 is a function. You give it a number and it returns that number multiplied by itself. So the absolute value function, which we write as f(x)=|x| takes a number and returns the same number if the number was positive, and the negative of the number if it was negative, thus returning always a positive number.

We can think of this as the function “how far away from the point 0 (the origin) on the real number line is x?”. It doesn’t care about what direction it is, only how far away it is.…

By | February 22nd, 2019|Courses, First year, MAM1000, Uncategorized, Undergraduate|3 Comments

How to Fall Slower Than Gravity And Other Everyday (and Not So Everyday) Uses of Mathematics and Physical Reasoning – by Paul J. Nahin, a review

NB. I was sent this book as a review copy.

This book is without a doubt the most enjoyable, stimulating book of mathematical physics (and occasionally more pure branches of maths) puzzles that I have ever read. It’s essentially a series of cleverly, and occasionally fiendishly put-together mathematics and physics challenge questions, each of which gets you thinking in a new and fascinating way.

The level of mathematics needed is generally only up to relatively basic calculus, though there is the occasional diversion into a slightly more complex area, though anyone with basic first year university mathematics, or even a keen high school student who has done a little reading ahead, would be able to get a lot from the questions.

I found that there were a number of ways of going through the questions. Some of them are enjoyable to read, and simply ponder. For me, occasionally figuring out what should be done, without writing anything down, was enough to be pretty confident that I saw the ingenuity in the puzzle and the solution and I was happy to leave it at that.…

By | January 10th, 2019|Book reviews, Reviews, Uncategorized|2 Comments

Millions, Billions, Zillions – Defending Yourself in a World of Too Many Numbers – by Brian W. Kernighan, a review

NB. I was sent this book as a review copy.

I have to admit that I was skeptical about this book when I first saw it, and even on browsing through it became more so (read on for the but…). I count myself as a highly numerate person who has a reasonable awareness of the world of numbers around me and I thought that the book probably wouldn’t help me to navigate through the world that I already feel comfortable in.

The book is essentially a series of short chapters which discuss some of the ways that numbers are used, misused and mistakenly used in the media, from errors in units, to orders of magnitude, to the ways that graphs can misrepresent data either intentionally or unintentionally to the improbable precision so often used online and in print. Each chapter uses news headlines and quotes to highlight how such mistakes come about and the examples are extremely clear.…

By | December 13th, 2018|Book reviews, Reviews|2 Comments

The Mathematics of Secrets – by Joshua Holden, a review

NB. I was sent this book as a review copy.

This is an extremely clearly, well-written book covering a lot of ground in the mathematics of cyphers. It starts from the very basics with simple transposition cyphers and goes all the way through to elliptic cyphers, public key cryptography and quantum cryptography. Each section gives detailed examples where you can follow precisely the mathematics of what underlies the encryption. Indeed the mathematics is non-trivial in a fair number of places, but it is always explained well, and I think that anyone with a first year university level of mathematics should be able to understand the bulk of it. I think that if you were to come at this book with a high-school level of mathematics, there would be some aspects which would be pretty hard work, but with some persistence, even those would be understandable, and perhaps the breakthroughs in understanding would feel like a great (though doable) achievement for the maths enthusiast.…

By | November 20th, 2018|Book reviews, Reviews|1 Comment

1.2 Properties of Groups

Recall the definition of a group:

A set G is “upgraded” into a group if it satisfied the following axioms under one binary operation (*) :

  1. Closure: \forall x, y \in  G, x*y \in G
  2. Associativity: \forall x, y, z \in G, (x*y)*z = x*(y*z)
  3.  Identity: \exists e \in G,  \text{ called the identity element  such that } \forall x \in G, x*e = e*x = x
  4. Inverse:  \exists y \in G, \text{ called the inverse of x, with } x*y = y*x = e  \forall x \in G

An Abelian group is a group that is follows the axioms 1 – 4 with the addition of one property: 

  1. Commutativity: \forall  x, y \in G,  x*y = y*x

 

In addition to the axioms, the following properties of groups are important to note:

  1. Uniqueness of the identity element
  2. Uniqueness of the inverse element
  3. Cancellation law
  4. Inverse property (extended)

Uniqueness of an element in mathematics means there exists only one such element with that property. We prove uniqueness by making an assumption that there are two elements in the set that satisfy the property, and show that if such a situation holds, then the two elements must be equal!

We use * to denote the binary operation between elements and “QED” to signal the end of the proof.

The remainder of the post aims to go through the proofs of these properties!…

By | October 28th, 2018|Uncategorized|0 Comments

1.1 Groups Introduction

Binary operations are operations such as addition, subtraction, multiplication, division, modulus etc. that are applied to two quantities.

example 1: 2+5 is an example of an expression with addition as the binary operation

example 2: Let f and g be functions defined on sets A to B. Then the composition of the functions \text{ f(g(x)) } is a binary operation

We will use * to denote an arbitrary (general) binary operation.

A set G is “upgraded” into a group if it satisfied the following axioms under one binary operation (*) :

  1. Closure: \forall x, y \in  G, x*y \in G
  2. Associativity: \forall x, y, z \in G, (x*y)*z = x*(y*z)
  3.  Identity: \exists e \in G,  \text{ called the identity element  such that } \forall x \in G, x*e = e*x = x
  4. Inverse:  \exists y \in G, \text{is called an inverse element of } x \in G \text{ with } x*y = y*x = e

An Abelian group is a group that is follows the axioms 1 – 4 with the addition of one property: 

  1. Commutativity: \forall  x, y \in G,  x*y = y*x

For the remainder of this post, we will explore these axioms and look at some examples

Closure: \forall x, y \in  G, x*y \in G

This means we can take any elements in the set G and perform the operation defined by * and the result will also be an element in the group.…

By | October 28th, 2018|Uncategorized|0 Comments