Tivadar Danka Profile picture
I make math and machine learning accessible to everyone. Mathematician with an INTJ personality. Chaotic good.
30 subscribers
Oct 25 10 tweets 3 min read
The following multiplication method makes everybody wish they had been taught math like this in school.

It's not just a cute visual tool: it illuminates how and why long multiplication works.

Here is the full story: Image First, the method.

The first operand (21 in our case) is represented by two groups of lines: two lines in the first (1st digit), and one in the second (2nd digit).

One group for each digit.
Oct 21 18 tweets 5 min read
The way you think about the exponential function is wrong.

Don't think so? I'll convince you. Did you realize that multiplying e by itself π times doesn't make sense?

Here is what's really behind the most important function of all time: Image First things first: terminologies.

The expression aᵇ is read "a raised to the power of b."

(Or a to the b in short.) Image
Oct 20 16 tweets 5 min read
In calculus, going from a single variable to millions of variables is hard.

Understanding the three main types of functions helps make sense of multivariable calculus.

Surprisingly, they share a deep connection. Let's see why: Image In general, a function assigns elements of one set to another.

This is too abstract for most engineering applications. Let's zoom in a little! Image
Oct 19 17 tweets 5 min read
The Law of Large Numbers is one of the most frequently misunderstood concepts of probability and statistics.

Just because you lost ten blackjack games in a row, it doesn’t mean that you’ll be more likely to be lucky next time.

What is the law of large numbers, then? Read on: Image The strength of probability theory lies in its ability to translate complex random phenomena into coin tosses, dice rolls, and other simple experiments.

So, let’s stick with coin tossing.

What will the average number of heads be if we toss a coin, say, a thousand times?
Oct 15 15 tweets 4 min read
I have spent at least 50% of my life studying, practicing, and teaching mathematics.

The most common misconceptions I encounter:

• Mathematics is useless
• You must be good with numbers
• You must be talented to do math

These are all wrong. Here's what math is really about: Image Let's start with a story.

There’s a reason why the best ideas come during showers or walks. They allow the mind to wander freely, unchained from the restraints of focus.

One particular example is graph theory, born from the regular daily walks of the legendary Leonhard Euler.
Oct 14 15 tweets 5 min read
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
Oct 13 18 tweets 5 min read
Matrix factorizations are the pinnacle results of linear algebra.

From theory to applications, they are behind many theorems, algorithms, and methods. However, it is easy to get lost in the vast jungle of decompositions.

This is how to make sense of them. Image We are going to study three matrix factorizations:

1. the LU decomposition,
2. the QR decomposition,
3. and the Singular Value Decomposition (SVD).

First, we'll take a look at LU.
Oct 11 18 tweets 6 min read
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
Oct 9 16 tweets 5 min read
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
Oct 8 14 tweets 5 min read
Graph theory will seriously enhance your engineering skills.

Here's why you must be familiar with graphs: Image What do the internet, your brain, the entire list of people you’ve ever met, and the city you live in have in common?

These are all radically different concepts, but they share a common trait.

They are all networks that establish relationships between objects. Image
Oct 7 14 tweets 4 min read
One of the coolest ideas in mathematics is the estimation of a shape's area by throwing random points at it.

Don't believe this works? Check out the animation below, where I show the method on the unit circle. (Whose area equals to π.)

Here is what's behind the magic: Let's make this method precise!

The first step is to enclose our shape S in a square.

You can imagine this as a rectangular dartboard. Image
Oct 6 18 tweets 5 min read
The way you think about the exponential function is wrong.

Don't think so? I'll convince you. Did you realize that multiplying e by itself π times doesn't make sense?

Here is what's really behind the most important function of all time: Image First things first: terminologies.

The expression aᵇ is read "a raised to the power of b."

(Or a to the b in short.) Image
Oct 5 16 tweets 5 min read
In calculus, going from a single variable to millions of variables is hard.

Understanding the three main types of functions helps make sense of multivariable calculus.

Surprisingly, they share a deep connection. Let's see why: Image In general, a function assigns elements of one set to another.

This is too abstract for most engineering applications. Let's zoom in a little! Image
Oct 4 17 tweets 5 min read
The Law of Large Numbers is one of the most frequently misunderstood concepts of probability and statistics.

Just because you lost ten blackjack games in a row, it doesn’t mean that you’ll be more likely to be lucky next time.

What is the law of large numbers, then? Read on: Image The strength of probability theory lies in its ability to translate complex random phenomena into coin tosses, dice rolls, and other simple experiments.

So, let’s stick with coin tossing.

What will the average number of heads be if we toss a coin, say, a thousand times?
Oct 2 14 tweets 5 min read
What is common between the Fourier series and the Cartesian coordinate system?

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

I'll explain why: Image 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. Image
Sep 26 12 tweets 4 min read
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
Sep 25 14 tweets 5 min read
Understanding graph theory will seriously enhance your engineering skills; you must absolutely be familiar with them.

Here's a graph theory quickstart, in collaboration with @alepiad.

Read on: Image What do the internet, your brain, the entire list of people you’ve ever met, and the city you live in have in common?

These are all radically different concepts, but they share a common trait.

They are all networks that establish relationships between objects. Image
Sep 11 15 tweets 5 min read
Logistic regression is one of the simplest models in machine learning, and one of the most revealing.

It shows how to move from geometric intuition to probabilistic reasoning. Mastering it sets the foundation for everything else.

Let’s dissect it step by step! Image Let’s start with the most basic setup possible: one feature, two classes.

You’re predicting if a student passes or fails based on hours studied.

Your input x is a number, and your output y is either 0 or 1.

Let's build a predictive model! Image
Sep 8 16 tweets 5 min read
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
Sep 7 18 tweets 6 min read
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
Sep 7 18 tweets 5 min read
The way you think about the exponential function is wrong.

Don't think so? I'll convince you. Did you realize that multiplying e by itself π times doesn't make sense?

Here is what's really behind the most important function of all time: Image First things first: terminologies.

The expression aᵇ is read "a raised to the power of b."

(Or a to the b in short.) Image