Tivadar Danka Profile picture
Dec 29 15 tweets 5 min read
This stone tablet from 1800-1600 BC shows that ancient Babylonians were able to approximate the square root of two with 99.9999% accuracy.

How did they do it?
First, let’s decipher the tablet itself. It is called YBC 7289 (short for the 7289th item in the Yale Babylonian Collection), and it depicts a square, its diagonal, and numbers written around them.

Here is a stylized version.
As the Pythagorean theorem implies, the diagonal’s length for a unit square is √2. Let’s focus on the symbols there!

These are numbers, written in Babylonian cuneiform numerals. They read as 1, 24, 51, and 10.
Since the Babylonians used the base 60 numeral system (also known as sexagesimal), the number 1.24 51 10 reads as 1.41421296296 in decimal.
This matches √2 up to the sixth digit, meaning a 99.9999% accuracy!
The computational accuracy is stunning. To appreciate this, pick up a pen and try to reproduce this without a calculator. It’s not that easy!

Here is how the ancient Babylonians did it.
We start by picking a number x₀ between 1 and √2. I know, this feels random, but let’s just roll with it for now. One such example is 1.2, which is going to be our first approximation.
Because of this, 2/x₀ is larger than √2.
Thus, the interval [x₀, 2/x₀] envelopes √2.

From this, it follows that the mid-point of the interval [x₀, 2/x₀] is a better approximation to √2. As you can see in the figure below, this is significantly better!

Let's define x₁ by this.
Continuing on this thread, we can define an approximating sequence by taking the midpoints of such intervals.
Here are the first few terms of the sequence. Even the third member is a surprisingly good approximation.
If we put these numbers on a scatterplot, we practically need a microscope to tell the difference from √2 after a few steps.
Were the Babylonians just lucky, or did they hit the nail right on the head?

The latter one. If you are interested in the details, check out the full version of the post here: thepalindrome.substack.com/p/how-did-the-…
If you have enjoyed this explanation, share it with your friends and give me a follow! I regularly post deep-dive explainers such as this.
One more thing. The YBC 7289 tablet is actually clay, not stone.

This is my secret engagement tactic: I plant a simple error, then let others point it out.

(Just kidding. Seriously though, I always let a silly mistake through the cracks accidentally.)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Tivadar Danka

Tivadar Danka Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @TivadarDanka

Dec 22
This single line of bash code will crash your system:

:(){ : | : &};:

It is a so-called fork bomb, duplicating itself with each call, eventually draining system resources dry.

Here is how it works, character by character.
In bash, functions are defined with the syntax

foo() {
# function body
}

Using this syntax, the fork bomb first defines the function `:`, then calls itself.
Thus, we have

:() {
: | : &
}

What is happening inside the function? There are two symbols here that need explaining: `|` and `&`.
Read 9 tweets
Dec 20
This is not a trick: the cosine of the imaginary number 𝑖 is (e⁻¹ + e)/2.

How on Earth does this follow from the definition of the cosine? No matter how hard you try, you cannot construct a right triangle with an angle 𝑖. What kind of sorcery is this?

Read on to find out.
First, the fundamentals.

In their original form, trigonometric functions are defined in terms of right triangles.

For an acute angle α, the sine and cosine are given by the ratio of the appropriate leg and the hypotenuse. (This is visualized below.)
Is this a proper definition? Doesn't it depend on the choice of the triangle?

Even though the sine and cosine formally depend on the sides, they remain invariant to translating, scaling, rotating, and reflecting the triangle.
Read 30 tweets
Dec 16
What is common in Fourier series and the Cartesian coordinate system?

More than you think: they are (almost) the same.

Let me explain why!
Let's start with the basics: the inner product.

In the Euclidean plane, it can be calculated using the "magnitude x magnitude x cosine" formula, also known as the geometric definition.
Now, let's project x to y!

With basic trigonometry, we can see that the inner product is related to the length of the projection.
Read 14 tweets
Dec 9
This will surprise you: sine and cosine are orthogonal to each other.

What does orthogonality even mean for functions? In this thread, we'll use the superpower of abstraction to go far beyond our intuition.

We'll also revolutionize science on the way.
Our journey ahead has three milestones. We'll

1. generalize the concept of a vector,
2. show what angles really are,
3. and see what functions have to do with all this.

Here we go!
Let's start with vectors. On the plane, vectors are simply arrows.

The concept of angle is intuitive as well. According to Wikipedia, an angle “is the figure formed by two rays”.

How can we define this for functions?
Read 19 tweets
Dec 1
If it is raining, the sidewalk is wet.

If the sidewalk is wet, is it raining? Not necessarily. Yet, we are inclined to think so. This is a preposterously common logical fallacy called "affirming the consequent".

However, it is not totally wrong. Why? Enter the Bayes theorem.
Propositions of the form "if A, then B" are called implications.

They are written as "A → B", and they form the bulk of our scientific knowledge.

Say, "if X is a closed system, then the entropy of X cannot decrease" is the 2nd law of thermodynamics.
In the implication A → B, the proposition A is called "premise", while B is called the "conclusion".

The premise implies the conclusion, but not the other way around.

If you observe a wet sidewalk, it is not necessarily raining. Someone might have spilled a barrel of water.
Read 9 tweets
Nov 16
Matrix multiplication is not easy to understand.

Even looking at the definition used to make me sweat, let alone trying to comprehend the pattern. Yet, there is a stunningly simple explanation behind it.

Let's pull back the curtain! Image
First, the raw definition.

This is how the product of A and B is given. Not the easiest (or most pleasant) to look at.

We are going to unwrap this. Image
Here is a quick visualization before the technical details.

The element in the i-th row and j-th column of AB is the dot product of A's i-th row and B's j-th column. Image
Read 18 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(