Mathematics is profoundly effective at describing the world around us. It is the language physicists use to formulate theories about our universe, neurologists use to model our brain, and economists use to model the stock market. This naturally leads us to ask the question why mathematics is so effective at describing our universe- a question asked many times before by a number of great minds.
The universe appears to have been designed by a pure mathematician – James Jean (1877 -1946)
How is it possible that mathematics, a product of human thought that is independent of experience fits so excellently to objects of reality? – Albert Einstein (1874 -1955) 
The miracle of the appropriateness of the language of mathematics for the formulation of the laws of physics is a wonderful gift which we neither understand, nor deserve - Eugene Wigner (1902 -1995) 
To understand these peoples fascination with this enigma, we have to understand the origins of mathematical reasoning and their relationship with logic, before we start speculating the relationship between mathematics and nature itself. I would like to note at this point that the (very brief) history of scientists and philosophers I will be providing is tailored to the context of this article, and that I knowingly, and purposefully omit a lot of information central to understanding these characters’ work, and role in history.
Mathematical contemplation has its roots in Antiquity. Even though we can be certain humanity has had the ability to count for a lot longer than just a few thousand years- it was only in ancient Greece that philosophers started concerning themselves with mathematics as we would define it today. It began with geometry- the study of shapes, and arithmetic- counting. Important insights into these disciplines had been made by Pythagoras of Samos (ca. 570BC – ca. 496BC) and followers of his school of thought (the Pythagoreans). Rational and Irrational numbers were defined, and geometrical relationships were discovered- however more importantly there was the pioneering Pythagorean insistence on mathematical proof- a procedure based entirely on logical reasoning, by which starting from some postulates, the validity of any mathematical proposition could be unambiguously established . For the first time it wasn’t enough to know that something worked- as it had done for the Babylonian mathematicians- the Greeks were beginning to care about why it worked. This set the stage for the next generation of philosophers to build upon what would become the foundations of our Western thinking. Among this next generation was the famous Plato (ca. 428BC – 347BC) who is often credited with formerly establishing the discipline of philosophy, by bringing together topics ranging from mathematics, science, and language to ethics, art and religion. Plato’s main contribution to this article is a concept appropriately called Platonism. In its broadest sense, this is a belief in an abstract eternal and immutable reality, independent of the world perceived by our senses. In this reality, perfect mathematical forms reside- such as the perfect square, natural numbers, and all other purely mathematical objects . This includes all ‘objective truths’ – things which are true, whether we know them to be or not.
Fermat’s last theorem is a mathematical statement which has been known to be true since its conjecture in 1637. It simply says that the equation:
can not be satisfied for any three values, provided the value of n is greater than 2. However, finding a proof for this theorem turned out to be an immense challenge, one which was only overcome in 1994 by mathematician Andrew Wiles – over 350 years after it had been formulated! So at which point can it be said that the theorem was a truth? In 1637? In 1994? or was is true all along? The Platonists answer would be that is was true all the time, with this objective truth residing in the realm mentioned above. To the Platonists this realm is as valid as the universe around us. What is important here is that this is the first time the explicit belief is expressed that mathematics is a fundamental ingredient of this universe, which exists outside of the human experience. This is a very profound insight especially considering the period of human history this originates from- this is before physics had made so many of its ground breaking discoveries (based on mathematical modelling) and before humans discovered the universal applicability of mathematics. Since antiquity mathematics has been associated with the perfect and the divine- but as real as anything else in this universe.
The great philosopher and mathematician Rene Descartes (1596 -1650) invented/discovered what we now know as the Cartesian system of coordinates . This intimately linked geometry and algebra to be two sides of the same coin and allowed mathematicians the algebraically analyse the world around them (which, naturally, is full of geometrical shapes) leading to immense breakthroughs which would otherwise not have been possible. Even though Isaac Newton despised Descartes (so much, in fact, that he sometimes refused to write his name!) , and tried formulating his laws of motion without the Cartesian system. This he was not able to, having to eventually concede that the Cartesian coordinate system was the simplest and most logical way to map physical space. However this was still a time of alchemy and mysticism, and thus the power of mathematics at explaining the world around us was still seen as being inevitably linked with the divine.
This ‘divine’ link is part of the reason Euclidean geometry (as derived from Euclids axioms) was largely unquestioned for more than a thousand years, since it was defined around 300BC by Euclid of Alexandria.  Euclidean geometry is based on 10 postulates (statements which were taken to be indisputably true) from which he sought to prove a large number of geometrical propositions on the basis of logical deductions. The first four postulates were very easy to understand, for instance the first one read:
“Between any two points a straight line maybe be drawn”.
In contrast, the fifth axiom was considerably less self-evident and slightly more complicated:
“If two lines lying in a plane intersect a third line in such a way that the sum of the internal angles on one side is less than the two right angles, the two lines inevitably will intersect each other if extended sufficiently on that side.” 
Below in Figure 2, Euclid’s 5 postulates are visually represented.
Whilst nobody doubted its validity, it lacked the compelling simplicity of the other axioms. In fact, I am not convinced that Euclid himself was entirely happy with his fifth postulate; in his book The Elements the proofs for his first 28 postulates do not make use of it. Over the years many had tried to deduce an explicit proof for this postulate without any success, forcing the mathematical community to reconsider this divine status given to Euclidean geometry in the case that it did not hold true. In the Nineteenth century the breakthrough finally occurred when people realised that by choosing a postulate different from Euclid’s fifth, the result is an entirely different but equally valid geometry. This was huge.
The first to publish on the topic of this new, non- Euclidean geometry was Russian mathematician Nikolai Lobachevsky (1792 -1856). In his work, Lobachevsky laid out geometrical relationships on a hyperbolic surface- which simply means that instead of calculating relationships on a flat surface, they were calculated on a curved surface called a hyperbole. Different geometries can be seen in Figure 3 below.
However, Lobachevsky’s work went largely unnoticed because he published his findings in a rather obscure journal. Independently, Hungarian mathematician Janos Bolyai (1802 -1860) made the same findings. [10, 12]
I have found things so magnificent that I was astounded…. I have created a different new world out of nothing. – Janos Bolyai 
The existence of non- Euclidean geometries had been anticipated, and worked on by the great Carl Friedrich Gauss (1777 -1855). Gauss is widely regarded as one of the most influential mathematicians of all time, yet he feared that publishing this radically new geometry would be seen as philosophical heresy by Kantian philosophers of his time- who held firm the belief that geometry is somehow linked to the divine. Gauss sent a letter to Janos’ father about his son’s work, expressing his thoughts:
…Indeed the whole contents of the work, the path taken by your son, the results to which he is led, coincide almost entirely with my meditations, which have occupied my mind for the last thirty or thirty five years. …I have put little on paper, my intention was not to let it be published during my lifetime. On the other hand it was my idea to write down this later so at least it should not perish with me. It is therefore a pleasant surprise that I am spared this trouble… – Carl Friedrich Gauss. 
This was one of many instances in history in which a breakthrough in mathematics and/or physics had occurred completely independently at the same time. Another fantastic example is that Calculus was invented/discovered by Isaac Newton (1642 -1726) at the same time as it was being developed, independently, by Gottfried Leibniz (1646 -1716) in Germany . It seems as though certain breakthroughs in our understanding of the world seem almost inevitable- leading many to believe that we are indeed discovering mathematics- that mathematics is embedded in nature. However, what the advent on non-Euclidean geometry showed to many, is that postulates can be chosen to give rise to many different mathematical geometries. This no longer made mathematics seem as this divine, perfect model nature was based on. Instead, it had become rather arbitrary and susceptible to human manipulation which had the power not only to describe our universe but any universe. Surely this meant that mathematics was being invented, rather than discovered?
For a long time these non- Euclidean geometries were treated as non-physical, amusing curiosities. Nobody could have anticipated the incredible applications his work will have when Riemann published his works on non- Euclidean geometry in the 1800s - It wasn’t until Albert Einstein made use of these geometries over one hundred years later, in his famous theory of general relativity that non- Euclidean geometry was shown to have physical meaning. Besides the obvious fact that non- Euclidean geometry applies on the earths surface (which is round, not flat ) it turns out that the fabric of our entire universe itself has a shape- something Einstein, amongst others, showed.
This brings me onto one of the most curious aspects of mathematics; the fact that quite often theorems or, as Platonists would say, ‘objective truths’ are discovered in mathematics long before they are made use of by scientists. Non-Euclidean geometry is just one example of a mathematical ‘toy’ turning out to be useful for describing the physical world over one hundred years after its initial publication. Another fascinating example is Knot Theory . This was developed 1771 in order to support a now disproven theory about the structure of matter. According to that theory, atoms were tightly knotted tubes of ether- a mysterious substance which has now also been shown to not exist. The variety of chemical elements could therefore be accounted for by the variety of different knots in the ether. This nice, but false idea sparked a serious interest in classifying knots, finding out which knots are possible, and how many are there. Even after this aforementioned theory of atoms was shown to be false mathematicians remained interested in knots for no other reason than curiosity. This lead to a very rich understanding of knots, and a lot of conjectures based on them. Imagine then the delight when knot theory was found to be instrumental to understanding fundamental processes involving the molecules of life- DNA . DNA consists of two strands intertwined heavily- and therefore any empirical understanding how DNA makes copies of itself makes use of Knot theory- a mathematical curiosity from the 1700s! Furthermore, in the 1960s Knot theory found applications in string theory - a very mathematical and abstract branch of physics which postulates tiny strings to be at the centre of all matter.
There are countless examples of old mathematical models being put to use to understand the physical world- most of these in quantum mechanics. This relationship between the physical world and mathematics is described by Physicist Mario Livio as the “passive role of mathematics” at describing nature. He distinguishes this from the fact that physicists can develop mathematical models of a system in order to understand it- which he calls the ‘active role of mathematics’. These models are so successful that it makes us question whether we are inventing, or discovering them. It is the reason Physicist Eugene Wigner published a paper entitled “the unreasonable effectiveness of mathematics in the natural sciences” in which he argues that mathematics is inherent to nature. Other modern physicists such as Max Tegmark go even further and claim that the universe itself is maths, and lays out a good argument for it  (which I do not want to discuss here because I think this article is long enough as it is). An interesting point of view is voiced by mathematician Sir Michael Atiyah, in which he takes into account our brains evolutionary predisposition to make sense of the world around it:
If one views the brain in its evolutionary context then the mysterious success of mathematics in the physical sciences is at least partially explained. The brain evolved in order to deal with the physical world, so it should not be too surprising that it has developed a language, mathematics, this is well suited for its purpose. – Sir Michael Atiyah 
However Atiyah does recognise that this explanation does not address the “passive” effectiveness of mathematics discussed above. Even though natural selection could explain why we cope with physical phenomena on the human scale, it could not explain by mathematics successfully deals with all scales- from atoms to galaxies. Richard Hamming (1915 -1998) believed that this could be explained by the fact that humans select and continuously improve mathematics, to fit a given situation. What some might call an evolution and human selection of mathematical ideas- a large number of ideas are spawned, but only the ones fit for describing the world survive . Even though I do believe there is truth to this, I still do not see it sufficient to explain the “unreasonable effectiveness of mathematics in the natural sciences”.
Is mathematics invented, or discovered? The truth is that there is no convincing answer, which makes it even more tantalizing to think about. In so many years of mathematical history the general consensus has kept changing- for all the right reasons. If we are inventing mathematics, then it is astonishing that we’ve created a seemingly ultimate tool for describing nature, and we will have to ask ourselves how long mathematics will remain a valid description nature- where are its boundaries? However, if we are discovering something deeper and more profound about the universe itself it could imply that mathematics is unbound, and has no end to revelations it can provide. In this case performing mathematics is equivalent to reading God’s mind. There is a middle ground, which might seem like a compromise but I believe provides valuable insights into this topic: mathematics is an intricate combination of inventions and discoveries. First, humans have to invent a concept and declare it as such- for example prime numbers. Once this concept is declared, we can make all sorts of discoveries with it, as Euclid did when he proved that there is an infinite number of prime numbers. If one is to look at ancient Indian mathematics one will find that the concept of prime numbers had never been invented . This didn’t mean that their existence wasn’t known, it was just that the concept hadn’t been defined, making further ‘discoveries’ on that topic impossible. Another example of this is imaginary numbers; the square root of minus one. Even though this used to be a mathematical impossibility, once the concept of imaginary numbers had been defined all sorts of mathematics spawned from it- even their use in mechanics. This did not change anything about the nature of mechanics; we just invented a method for comprehending it. The reason we can even ask the question “is mathematics invented, or discovered?” is because of the consistency of mathematics. All branches are interlinked, and (most) paradoxes have been resolved over the years allowing us to fable at the consistency of mathematics. Its consistency is the reason we have so long wondered about its effectiveness, and I think the following quote by Dr. Ron Garrett helps us understand why mathematics is so effective at explaining reality.
“The Universe is comprehensible because large parts of it are consistent. This consistency allows us to understand our experiences in terms of stories whose explanatory power endures from one moment to the next. (When these stories are told using mathematics we call them scientific theories.) Some of these stories, like the idea of a material object, are hardwired into the human brain. Other stories, like the idea of a chemical or electricity, are not innate. One of the triumphs of the human species is that we are able to communicate these stories, so that a new story once constructed can be propagated without having to be encoded into our DNA. Consistency defines reality. We distinguish between the perceptions that we have while sleeping from those we have while awake precisely because our wakeful perceptions are more amenable to consistent storytelling. We call our wakeful perceptions “reality” and our sleepful ones “dreams” for precisely this reason. It is so deeply ingrained in our psyche to believe that the universe is consistent because reality is in some sense real that the suggestion that reality is simply a mental construct that our brains concoct to explain consistency in perception sounds preposterous on its face. For one thing, our brains are real. If they weren’t, they wouldn’t be around to do any concocting. I will defer this issue for now; for the moment let us simply accept that consistency and reality are intimately connected without making any commitments to which way the causality runs. The point is that the Universe is comprehensible because it is consistent. This is important because comprehensibility cannot be described mathematically, but consistency can.” 
Mathematics gives us this consistent tool, which allows us to probe reality itself.
 - Max Jammer, “Einstein and Religion”, 1921.
 - Mario Livio, “Is God a Mathematician?”, 2009.
 - Eugene Wigner, “The Unreasonable Effectiveness of Mathematics in the Natural Sciences,” , 1960
 -Walter Burkert, “Lore and Science in Ancient Pythagoreanism”, 1972
 – Karl Albert, “Griechische Religion und platonische Philosophie “, 1980
 – Simon Singh, “Fermats Last Theorem”, 1997
 - http://www-history.mcs.st-and.ac.uk/Biographies/Descartes.html
 - http://www.physics.wustl.edu/alford/general/newton.html
 - http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Euclid.html
 - http://mathworld.wolfram.com/EuclidsPostulates.html
 - https://geopolicraticus.wordpress.com/tag/non-euclidean/
 - http://www-history.mcs.st-and.ac.uk/HistTopics/Non-Euclidean_geometry.html
 - http://www-history.mcs.st-and.ac.uk/Biographies/Gauss.html
 - http://pages.cs.wisc.edu/~sastry/hs323/calculus.pdf
 – Albert Einstein, “The Speed of Light and the Statics of the Gravitational Field ”, 1912
 - http://solarviews.com/raw/earth/bluemarblewest.jpg
 - http://www-groups.dcs.st-and.ac.uk/~history/Biographies/Riemann.html
 - http://www.maths.ed.ac.uk/~aar/knots/
 - http://www.tiem.utk.edu/~gross/bioed/webmodules/DNAknot.html
 - http://www.maa.org/press/periodicals/convergence/unreasonable-effectiveness-of-knot-theory
 – Max Tegmark, “Our Mathematical Universe: My Quest for the Ultimate Nature of Reality” , 2014
 - http://www.comesaunter.com/2009/05/michael-atiyah-on-why-mathematics-is-successful-in-the-physical-sciences.html
 – David Mumford, “Mathematics in India: reviewed by David Mumford”, 2010
 – Ron Garrett, “Quantum mysteries disentangled”, 2001