# Pythagorean Theorem

04-May-2023

# Definition

Given $a$, $b$, $r$ real numbers.

$r^2 = a^2 + b^2$

# Insights

Any square numbers can be decomposed into two square numbers

Length scales proportionally

Euclidean geometry needs to have Pythagorean theorem to be true

If in a geometry, Pythagorean theorem holds true. Then Pythagorean theorem will also applies for the n-th derivative of the metric.

# Collection of proofs sketches

## Einstein’s proof

This is an interesting proof because it doesn’t require any image or drawing. Only definition and set relationship.

Given a right triangle, one of its side is a hypothenuse $r$. The other side is $a$ and $b$. A triangle is defined by 3 angles $\alpha$, $\beta$, $\gamma$ and its hypothenuse. All by definition.

A hypothenuse can be dissected with equal parts of right triangle, so any right triangle is composed of two right triangles. Call the dissected triangles $A$ and $B$. Call original triangle as $R$

All these triangles is guaranteed to be similar because two of the angles are the same for all triangles.

Assume a function called $Area(\alpha,\beta,\gamma,r)$. It doesn’t matter what the formula to calculate the area is. By function mapping, it should be possible to map these parameter to a certain area.

Angle $\gamma$ can be calculated from $\alpha$ and $\beta$ because the total has to be constant for all kind of triangles. (can be set to 180 degrees, although any value won’t matter)

Angle $\beta$ is definitely determined to be a constant for any right triangles. (can be set to 90 degrees, although any value won’t matter)

For angle $\alpha$ it has to be the same for triangle $A$, $B$, and $R$.

So, actually the entire setup is invariant to above parameters, and only dependent **solely** on the length of $r$.

$Area(\alpha,\beta,\gamma,r) = Area(r)$

Key insight is that:

$Area(r) = Area(a) + Area(b)$

Any area of triangle should be proportional to a square rectangle of one of its sides. This is because making the square bigger should also make the triangle bigger the same way.

All these triangles uses the same square grid, so the proportionality has to be the same. So just call it $k$.

Finish the proof

$Area(r) = Area(a) + Area(b) \\ kr^2 = ka^2 + kb^2 \\ r^2 = a^2 + b^2$

## Proof by differential

Suppose that this holds true

$r^2 = a^2 + b^2$

Then we want to proof it that it was necessary for this to be a right triangle.

For ease of convention, rename $a=x$ and $b=y$. Let $x$, $y$, and $r$ be arbitrary function that depends on a shared parameter $t$.

Inspect derivative with respect to $t$

Multiply by $r$ and substitute $r^2$ again

Taking a look at how the terms organized in the left side and right side. Coefficient of $x$ and $y$ must each corresponds. So we got two equations:

$x\frac{dr}{dt} = r \frac{dx}{dt} \\[8pt] \frac{dr}{dx} = \frac{r}{x} \\[8pt]$

And

$y\frac{dr}{dt} = r \frac{dy}{dt} \\[8pt] \frac{dr}{dy} = \frac{r}{y} \\[8pt]$

If we subsitute this back, we can also get

$y\frac{dx}{dt} = x \frac{dy}{dt} \\[8pt] \frac{dy}{dx} = \frac{y}{x}$

There should be no preferences between $x$ and $y$. Each must changes wrt to $r$ the same way. So this satisfy scaling property. If this satisfy scaling property, then $x$ and $y$ are completely normal/independent/perpendicular. If $x$ and $y$ has to be perpendicular, then it has to be a right triangle. So it completes the proof.

To illustrate this, use contradiction. I can think of several alternatives.

### Contradict the shape of the triangle

Suppose at $t=0$ all $r_0$,$x_0$,$y_0$ form a Pythagorean triplet and a right triangle. Call the ratio of the sides that is not hypothenuse as $k$, written:

$\frac{y_0}{x_0}=k$

Now, claim that when $x$ and $y$ changes, even though it satisfies Pythagorean triplet, the triangle after the changes is not a right triangle.

From the differential equation of $y$ and $x$ we can derive $y$ as a function of $x$ alone.

$C$ is just a constant so it essentially the same as $k$.

Because the ratio is the same even when the sides changes, then it had to be similar triangle with the initial triangle. Since the initial triangle is a right triangle, then after the changes it has to be a right triangle again.

So the claim is contradictory and Pythagorean triplet has to be true for all right triangles, with any initial constant $k$.

### Contradict the independence of the axis

For a right triangle to work, $x$ and $y$ has to be always perpendicular.

Given an independent parameter $t$, it must change $x$ and $y$ independently.

Now, claim that $x$ and $y$ is independent. Meaning, the partial derivatives has to be as follow:

The equation above can be understood this way:

Left side has to be non-zero expression (we already derive it before). If we express $y$ and $x$ using only $t$, it will mean the right hand side, first term has some expression. But $\frac{\partial y}{\partial x}=0$ if $y$ and $x$ is independent.

Meanwhile, using the previous result of the total derivative of Pythagorean theorem, we add extra constraint that $r$ **doesn’t** change.

This is because we want to check only the relation between $x$ and $y$ given parameter $t$. This will cause $\frac{dr}{dt}=0$

The above differential equation is total and can be solved. But it didn’t tell us much. If we integrate it, we are back to Pythagorean equation. So, we showed it to be dependent (contradiction), but not conclusive because the dependency are back to the original equation.

We try a different approach. Manipulate the equation further, but substitute the constancy of $r$ later.

From the original derivation, we subsitute $\frac{x}{r}$ and $\frac{y}{r}$. For sufficient reason, let be $r$ a constant non-zero, so we can divide it.

Unrelated with the proofing method, this is actually quite an interesting corollary. If Pythagorean theorem is true, it was direct consequences that the derivative of each variables with respect to independent parameter $t$ is also a Pythagorean triplet. Applying this statement to itself, if the n-th derivative exists, it will also form a Pythagorean triplet. That means Pythagorean theorem is invariant to derivative operator in Euclidean geometry. Then by Fundamental Theorem of Calculus, it would mean that it is also invariant to integral.

Now back with the proof. Since $r$ is constant, it cause $\frac{dr}{dt}=0$. The consequence is quite surprising.

This is a square function. In the domain of real number, there is no solution. Meaning $x$ and $y$ can’t be independent, because we already assume Pythagorean triplets were real numbers. This completes the proof by contradition.

However, there is another way to proof it.

Suppose that Pythagorean theorem can be applied in complex numbers. Proofing it will also proof it in the real numbers. If all $r$, $x$, and $y$ complex numbers, then we can solve equation above. One of the solution is just rearranging and taking the square roots. Other solution is just a difference in sign due to absolute values.

The difference with the proof is that we directly proof that $y$ is dependent on $x$ in a very particular way. In complex number, multiplication by $i$ means it rotate the number by 90 degrees.

In other words, $y$ is always perpendicular to $x$. So it is dependent in such a way that it guarantees the orthogonality of $x$ and $y$, hence it is always a right triangle.

The problem with this line of reasoning is because the construction of Complex numbers usually **uses** Pythagorean theorem itself.
If we have alternative construction using only group theory and definition of $i$ from a square root, then it can be used to prove Pythagorean theorem.

## Proof by matrix

I found it from Terrence Tao’s article.

I think it is quite fascinating. The first proof is essentially the same with “Einstein’s proof”.

The second part is interesting because it is handwaived from matrix construction without prior assumption!

Let a matrix exists like this (call it $M$):

The determinant of the matrix is conveniently $a^2+b^2$

Now choose a second matrix like this (call it $C$):

The determinant of the matrix is $c^2$

Now claiming $a^2+b^2=c^2$ (the Pythagorean theorem) is equivalent in saying that there exists a matrix $R$ such that if multiplied in any direction, it will cause both sides to be true, because the determinant is the same. Meaning, these will work:

But for any matrices with non-zero determinant, you can always find $R$ by inverting, like this:

Given actual numbers $a$, $b$, $c$, then this is just a numerical works.

The proof is then to cover that these operation is always possible.

First, note that $C$ is a diagonal matrix. It will always have an inverse as long as $c$ is not zero.

Second, it is always possible to do matrix multiplication.

So $R$ will exists.

Third, the determinant can be calculated easily. Meaning determinant of $R$ is always 1, following the rule below:

Lastly, if we want to define matrix $R$ from a more generic function, there are only some restricted class of function with determinant to be always 1, and always invertible. This is called the rotation matrix which has a more generic form like this:

However, note that it doesn’t really necessary to define the trig function. Just knowing that $R$ always exists is enough for the proof. The key to the proof is how we make sure that the matrix imply that each basis is orthogonal from each other (so it became a right triangle).