How we use Pi, the most important number in the universe, every day

Happy Pi Day!

 

For math geeks like us, this is one very special national holiday.  It’s a celebration of one of the most important numbers in history.  3.14 and change – please read until the end, the ‘change’ is important.  Not only it’s important, but it’s also beautiful.  We use Pi almost every day, sometimes not realizing it.

 

Did you know that not only Pi is mentioned in the Bible, but it’s also calculated there?  We talk about it below.

 

We’ll talk about the history of Pi, the race for Pi’s decimals, and why Pi is important in Machine Learning.

 

 

History of Pi

 

To realize the importance of Pi, I’d like to start with a little bit of history.  We’re not going to use any math formulas in this article, which is a bit eerie – talking about math without formulas.

 

Most of us know of Pi as the exact (and therefore so elegant) ratio of a circle’s circumference to its diameter.  So anytime you think of a perfect circle, you must be thinking about Pi.

 

There were so many mathematicians in history who invented applications that use Pi that there is no way we could list all of them.  But let us try dropping a few names.

 

Before the circle, there was polygon, which is, of course, an imperfect representation of a circle. Polygon was analyzed around 250 BC by the Greek mathematician Archimedes.[ This polygonal algorithm dominated for over 1,000 years, and as a result, Pi is sometimes referred to as “Archimedes’ constant”.   Archimedes computed the upper and the lower bounds of Pi by drawing a regular hexagon inside and outside a circle, and successively doubling the number of sides until he reached a 96-sided regular polygon. By calculating the perimeters of these polygons, he proved that 223/71 < Pi < 22/7 (that is 3.1408 < Pi < 3.1429).

 

The discovery of calculus by English scientist Isaac Newton and German mathematician Gottfried Wilhelm Leibniz in the 1660s led to the development of many infinite series for approximating Pi. Newton himself used an arcsin series to compute a 15 digit approximation of π in 1665 or 1666, later writing “I am ashamed to tell you to how many figures I carried these computations, having no other business at the time.”  Perhaps the most famous infinite series, the Taylor series, is an infinite sum of terms that are expressed in terms of the function’s derivatives at a single point. Taylor series are named after British mathematician Brook Taylor who introduced them in 1715. Several infinite series are described using Pi, including series for sine, tangent, and cosine, which are now referred to as the Madhava series or Gregory-Leibniz series.

 

In 1656, British mathematician John Wallis developed the Wallis formula for Pi in his book Arithmetica Infinitorum.  He defined Pi as the product of an infinite string of ratios made up of integers.

 

Only over 350 years later, in 2015, American mathematician Tamar Friedmann and American particle physicist Carl Hagen, both at the University of Rochester, discovered the Wallis formula for Pi outside of mathematics –  in quantum mechanics, to be precise.  They derived the Wallis formula from the formula for the hydrogen atom’s energy states.  This discovery underscored Pi’s omnipresence in math and science.

 

As mentioned earlier, Pi represents the ratio of a circle’s circumference to its diameter.  The earliest known use of this formula was by Welsh mathematician William Jones in 1706.

 

Perhaps the most well-known use of Pi is in the Euler equation developed by the Swiss mathematician Leonhard Euler.  Often described as “the most beautiful formula in mathematics“, Euler seems never to have written it down – naming conventions in mathematics are a bit dodgy. Rather, it is a special case of Euler’s discovery that exponential growth and circular motion are equivalent, given by the following formula:  exp(i*theta) = cos(theta) + i*sin(theta).  Though, not explicit in this formula, Pi has an integral part in its derivation.  In fact, arguments for cos and sin functions are themselves functions of Pi.  An American theoretical physicist Richard Feynman called this “the most remarkable formula in mathematics”.  For cos and sin functions, Euler was using the concept of the arc length which provided a new way of representing the measure of an angle, and we now call this measure of angles “radian measure.” For example, 360 degrees = 2Pi radians, 180 degrees equals Pi radians, and 90 degrees would equal Pi/2 radians.  All these measures are always based on a special circle that has a radius of 1.  Cos and sin, and therefore Pi, are the key in modeling vibrating strings or radio waves.

 

The Euler equation has its applications in many fields of science.  It has been most widely used in fluid dynamics.  The Euler equation was first presented by Euler to the Berlin Academy in 1752.  The Euler equation was among the first partial differential equations to be written down, after the wave equation. In Euler’s original work, the system of equations consisted of the momentum and continuity equations, and thus was underdetermined except in the case of an incompressible flow. An additional equation, which was called the adiabatic condition, was developed by French mathematician Pierre-Simon Laplace in 1816.

 

During the second half of the 19th century, it was found that the equation related to the balance of energy must at all times be kept for compressible flows, and the adiabatic condition is a consequence of the fundamental laws in the case of smooth solutions. With the discovery of Albert Einstein’s special theory of relativity, the concepts of energy density, momentum density, and stress were unified into the concept of the stress-energy tensor, and energy and momentum were likewise unified into a single concept, the energy-momentum vector.

 

The fundamental equation of non-equilibrium systems developed by a French physicist Paul Langevin is called the Langevin Equation, or the Langevin Law.  It contains both frictional forces (explicitly dependent on Pi) and random forces. The fluctuation-dissipation theorem relates these forces to each other. The random motion of a small particle (about one micron in diameter) immersed in a fluid with the same density as the particle is called Brownian Motion. Early investigations of this phenomenon were made by Scottish biologist Robert Brown on pollen grains and also dust particles or another object of colloidal size. The modern era in the theory of Brownian motion began with Albert Einstein. He obtained a relation between the macroscopic diffusion constant D and the atomic properties of matter.  Once again, Pi is an important part of that formula.  The theory of Brownian motion has been extended to situations where the fluctuating object is not a real particle at all, but instead some collective property of a macroscopic system. This might be, for example, the instantaneous concentration of any component of a chemically reacting system near thermal equilibrium.

 

One important field of study that emerged from the Langevin Law is Stochastic Thermodynamics.  It is an emergent field of research in statistical mechanics that uses stochastic variables to better understand the non-equilibrium dynamics present in many microscopic systems such as colloidal particles, biopolymers (e.g. DNA, RNA, and proteins), enzymes, and molecular motors.

 

What does the Langevin Law have to do with Pi?  Pi is an integral part of this important equation.  For one thing, as already mentioned, Pi appears in the frictional term.  However, most importantly, the Pi comes through cosh, or hyperbolic cosine, which is derived from cosine using the Euler equation.

 

Named after a Polish-French physicist Marie Curie, the Curie Law is a special case of the Langevin Law.  The Curie Law describes the magnetic susceptibility of a ferromagnet in the paramagnetic region above the so-called Curie point, which is the temperature above which certain materials lose their permanent magnetic properties.

 

 

The Race to Compute Decimals of Pi

 

Evidence exists that the Babylonians approximated Pi in base 60 around 1800 B.C.E.  In fact, they believed that Pi = 25/8, or 3.125. The ancient Egyptian scribe Ahmes, who is associated with the famous Rhind Papyrus, offered the approximation 256/81, which works out to be 3.16049.  There’s even an implicit value of Pi given in the Bible. In 1 Kings 7:23, a round basin is said to have 30-cubit circumference and 10-cubit diameter. Thus, in the Bible, it implicitly states that π equals 3 (30/10).

 

Not surprisingly, as humankind’s understanding of numbers evolved, so did its ability to better understand and thus estimate π itself. In the year 263, the Chinese mathematician Liu Hui believed that Pi = 3.141014. Approximately 200 years later, the Indian mathematician and astronomer Aryabhata approximated Pi with the fraction 62,832/20,000, which is 3.1416. Around 1400, the Persian astronomer Kashani computed Pi correctly to 16 digits.

 

A Swiss mathematician Johann Lambert showed in 1761 that Pi is an irrational number, meaning it is not equal to the quotient of any two whole numbers, meaning that it has an infinite number of decimals with non-repeated sequences.  And the race for who get the largest number of decimals of Pi started…

 

German theoretical physicist Jörg Arndt concluded that a few hundred digits would suffice for any scientific application. Despite this, people have worked strenuously to compute Pi to thousands and millions of digits.  With the growth of computer power, the race to compute decimals of Pi has become more heated.  For example, in 1949, using an inverse tangent (arctan) infinite series, a team led by George Reitwiesner, and American mathematician and John von Neumann, a Hungarian-American mathematician that same year achieved 2,037 digits with a calculation that took 70 hours of computer time on the ENIAC computer.  von Neumann is, of course, famous for his work on the Manhattan Project during WWII, with a Hungarian-American theoretical physicist Edward Teller and a Polish-American mathematician Stanislaw Ulam.

 

In 2019, Emma Haruka Iwao and her colleagues at Google used the power of 25 Google Cloud virtual machines to calculate for 31,415,926,535,897 digits of Pi within 121 days.

 

In 2020, Timothy Mullican, a data scientist from Alabama, United States, calculated up to 50 trillion digits of Pi and was recognized for his work by the Guinness Book of Records.

 

In 2021, a team from the University of Applied Sciences Graubünden in Switzerland calculated for 62.8 trillion digits of Pi.  It took the team 108 days and 9 hours. That’s 3.5 times faster than Mullican’s record and almost twice as fast as Google’s efforts.

 

 

Why is Pi important in Artificial Intelligence and Machine Learning?

 

The topic is near and dear to my heart.  Let’s just say that without Pi, there won’t be artificial intelligence.  Here are just a few examples.

 

  1. Eigenvalues

 

Many of the appearances of Pi in the formulas of mathematics and the sciences have to do with its close relationship with geometry. However, Pi also appears in many natural situations having apparently nothing to do with geometry.  For example, Pi is the smallest singular value of the derivative operator on the space of particular functions on [0, 1] vanishing at both endpoints.  Lambda is an eigenvalue of the second derivative operator in the equation f’’(t) = -lambda*f(x).

 

Eigenvalues are a critical concept in Principal Component Analysis (PCA), Spectral Clustering (such as K-Means), Computer Vision and Gradient, the king of neural networks.

 

  1. Fourier Transform.

Pi also appears as a critical spectral parameter in the Fourier transform developed by a French mathematician Jean-Baptiste Joseph Fourier.  In 1807, Fourier showed that any waveform could be written as an infinite sum of sinusoids.

 

Fourier transform is a critical part of a neural network.  In particular, Fourier transform is used heavily in deep learning models such as Convolutional Neural Networks (CNNs).

 

  1. The Gaussian function.

 

The Gaussian function, which is the probability density function of the normal distribution with mean mu and standard deviation sigma, naturally contains Pi.  It was developed by German mathematician Johann Carl Friedrich Gauss and is perhaps the most well-known function in the fields of statistics and probability.  Pi is the unique constant making the Gaussian normal distribution exp(-Pix^2) equal to its own Fourier transform.

 

  1. Cauchy distribution.

 

Another well-known probability density function explicitly containing Pi is called The Cauchy distribution, named after a French mathematician Augustin-Louis Cauchy.  Unlike the Gaussian function and other probability models under the Central Limit Theorem, the Cauchy distribution has no finite moments of order greater than or equal to one and it has no moment generating function. This makes the Cauchy formula quite useful for analytical modeling of any field dealing with infinite exponential growth.

 

  1. Number Theory.

 

Euler’s results in infinite series led to the Number Theory result that the probability of two random numbers being relatively prime (that is, having no shared factors) is equal to 6/Pi^2.  The Number Theory was used in the early machine learning models to develop a pattern recognition algorithms.

 

 

We hope we convinced you that Pi is the most important constant in math, science and machine learning.

 

Please check out this and other latest WellAI blogs, articles, opinions, videos and press releases on AI trends and digital health innovations at https://wellai.health/blog/

 

Stay healthy!  Stay knowledgeable about your health.

 

WellAI Team

wellai.health

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: