Tivadar Danka Profile picture
Jun 21, 2021 8 tweets 3 min read Read on X
What you see below is a cube in four dimensions.

Because humans can't see in more than 3D, it is challenging to make sense of it for the first time. However, there is a simple yet beautiful pattern behind.

This is how the magic is done!
What is a cube in one dimension?

It is simply two vertices connected with a line of unit length.
To move beyond and construct a cube in two dimensions, also known as a square, we simply copy a one-dimensional cube and connect each original vertex with its copy.

(These new edges are colored blue.)
You can probably guess the pattern by now.

Copying a cube's graph and connecting each of its vertices with its corresponding copy brings it to the next dimension.

This is how it looks in 3D.
Repeating this process one more time, we obtain a tesseract, that is, a cube in four dimensions.

(I stretched the new edges a bit to make it easier to see the pattern.)
All 8 of its faces are 3D cubes.
I have always found this pattern quite beautiful.

Geometry intrigued me since I was a child, and when I discovered how to draw a tesseract, I was over the moon.

Small things such as this ignited my desire to be a mathematician, and I still enjoy playing around with fun math.
I regularly post deep dive threads about mathematics and machine learning, explaining (seemingly) complex concepts in a simple way.

If you also love to look beyond the surface and understand how things work, consider giving me a follow!

• • •

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

Jun 8
Differentiation reveals much more than the slope of the tangent plane.

We like to think about it that way, but from a different angle, differentiation is the same as an approximation with a linear function. This allows us to greatly generalize the concept.

Let's see why! Image
By definition, the derivative of a function at the point 𝑎 is defined by the limit of the difference quotient, representing the rate of change. Image
In geometric terms, the differential quotient represents the slope of the line between two points of the function's graph. Image
Read 12 tweets
Jun 6
Most people see neural networks as magic.

But at their core, they’re just graphs. And those are built from math so simple, you learned it in high school.

Here’s how computational graphs make deep learning possible, and why they’re the real MVP of machine learning. Image
Representing graphs as matrices unlocked new discoveries in both CS and math.

Similarly, viewing neural networks as computational graphs unlocked modern ML.

The magic is in the representation. Image
At a macro level, a neural network is a composition of a sequence of functions:

N(x) = Softmax(Linear₁(Relu(Linear₂(x))))

At a micro level:

A graph of operations + variables.

• Each variable becomes a node.
• Each operation becomes an edge. Image
Read 6 tweets
Jun 4
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. Image
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? Image
Read 18 tweets
Jun 3
In machine learning, we use the dot product every day.

However, its definition is far from revealing. For instance, what does it have to do with similarity?

There is a beautiful geometric explanation behind. Image
By definition, the dot product (or inner product) of two vectors is defined by the sum of coordinate products. Image
To peek behind the curtain, there are three key properties that we have to understand.

First, the dot product is linear in both variables. This property is called bilinearity. Image
Read 15 tweets
May 7
Behold one of the mightiest tools in mathematics: the camel principle.

I am dead serious. Deep down, this tiny rule is the cog in many methods. Ones that you use every day.

Here is what it is, how it works, and why it is essential. Image
First, the story.

The old Arab passes away, leaving half of his fortune to his eldest son, third to his middle son, and ninth to his smallest.

Upon opening the stable, they realize that the old man had 17 camels. Image
This is a problem, as they cannot split 17 camels into 1/2, 1/3, and 1/9 without cutting some in half.

So, they turn to the wise neighbor for advice. Image
Read 18 tweets
Mar 22
I am Hungarian, living in Hungary for 35 years. Everything is government propaganda in this thread.

Let me provide all the context.

Learn from this, and maybe your country can succeed in stopping an authoritarian takeover, in which Hungary have failed.

"1. No income tax for women with at least two children for life."

This is an election hack, meant to buy votes for the upcoming 2026 election. Fidesz (Hungary's ruling party) is significantly down in the polls after it was leaked that a convicted p*d*ph*le accessory was given a presidential pardon.

Hell, they even let a child p*rn*gr*phy wholesaler with 96000 images on his computer walk away with ~$1500 fine. (Check en.wikipedia.org/wiki/G%C3%A1bo… if you don't believe me.)

Thus, the government is scraping to buy back the trust of families.

Even if it wasn't an empty promise, waiving the income tax is unrealistic for budgetary reasons. Hungary's economy is in the toilet.
"3. Housing incentives for young couples.

Offers a low interest loan for couples raising or committing to having one child or more."

This loan is another propaganda trick. In practice, this loan resulted in the biggest housing crisis of the country's history, because all it did was raise the price of every real estate by the amount of the loan, making real estate ownership virtually impossible for the young generation.
Read 10 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!

:(