English (unofficial) translations of posts at kexue.fm
Source

General Solution of Pythagorean Triples and Its Generalization

Translated by DeepSeek V4 Pro. Translations can be inaccurate, please refer to the original post for important stuff.

In a previous article, "Numbers of Geometry and Geometry of Numbers: A Shallow Exploration of Hypercomplex Numbers", we discussed quaternions. Quaternions originated from the high-dimensional generalization of the unique property of complex numbers: |(a+bi)(c+di)|=|a+bi|\times|c+di|. Why is this property so favored? Readers may already know some examples where this property of complex numbers is used, both in geometry and physics. This property brings wonderful convenience to dealing with problems related to the modulus. This article introduces its application in finding the general integer solution of ternary quadratic homogeneous Diophantine equations. This example also demonstrates the magic of this property of complex numbers, making us appreciate the ten years of effort Hamilton spent to generalize it to higher dimensions.

The Pythagorean Triples Problem

Readers may already know that Pythagorean triples, which are all natural number solutions satisfying x^2+y^2=z^2 are given by the following formulas: x=a^2-b^2, \quad y=2ab, \quad z=a^2+b^2 For now, we will not focus on the proof of sufficiency, but rather on how to derive this general solution. Similarly, we can pose similar questions, such as the natural number solutions for equations like x^2+2y^2=z^2 or x^2+xy+y^2=z^2. These equations share a common characteristic: they are ternary, quadratic, and homogeneous Diophantine equations. There is a similar general technique for deriving their general solutions, which involves using the modulus property of complex numbers mentioned at the beginning of the article.

First, considering the general solution of Pythagorean triples, we only need to notice that: (a^2+b^2)^2=|a+bi|^4=|(a^2-b^2)+2abi|^2=(a^2-b^2)^2+(2ab)^2 Amazing, isn’t it? The derivation using complex numbers is seamless; this is the power of the modulus property of complex numbers!

What if we want to consider the general solution for x^2+n \cdot y^2=z^2, \quad n \in \mathbb{N} There are two approaches. One is to directly transform the general solution of the Pythagorean triples mentioned above, which the reader can try personally. Alternatively, one can directly use the properties of complex numbers: \begin{aligned}(a^2+n b^2)^2=&|a+b\sqrt{n}i|^4=|a^2-n b^2+2ab\sqrt{n}i|^2\\ =&(a^2-n b^2)^2+n\cdot (2ab)^2\end{aligned} Perhaps the reader will continue to ask for the general solution of m\cdot x^2+n\cdot y^2=z^2, \quad m,n\in\mathbb{N}. Unfortunately, the above method cannot be used. In fact, for general m and n, the corresponding Diophantine equation does not necessarily have a general solution.

A More Beautiful Example

Next, let us consider the natural number solutions of z^2=x^2+xy+y^2 To derive the general solution, one could use the method of completing the square to transform it into a problem of the type x^2+n\cdot y^2=z^2, and then into a Pythagorean triple problem. However, this "roundabout" means is clearly not as direct and beautiful as the following technique!

Complex numbers can be viewed as a two-dimensional vector space over the field of real numbers. Its basis is \{1, i\}. However, since it is a finite-dimensional vector space, it is not mandatory to choose \{1, i\} as the basis. We can change the basis to \{1, \omega\}, where \omega=\frac{1+\sqrt{3}i}{2}. Then every complex number can also be uniquely written as a+b\omega If a and b are both integers, such numbers are called Eisenstein integers. For the basis \omega, it is one of the complex roots of the cubic equation x^3+1=0 (specifically, it satisfies \omega^2-\omega+1=0). We have the formula: \omega^2-\omega+1=0 We can calculate: |a+b\omega|^2=a^2+ab+b^2 Thus: \begin{aligned}(a+b\omega)^2=&a^2+b^2\omega^2+2ab\omega\\ =&a^2-b^2(-\omega+1)+2ab\omega\\ =&a^2-b^2+(2ab+b^2)\omega \end{aligned} Therefore: \begin{aligned}&(a^2+ab+b^2)^2=|a+b\omega|^4\\ =&|a^2-b^2+(2ab+b^2)\omega|^2\\ =&(a^2-b^2)^2+(a^2-b^2)(2ab+b^2)+(2ab+b^2)^2\end{aligned} Thus, we beautifully obtain the general solution: x=a^2-b^2, \quad y=2ab+b^2, \quad z=a^2+ab+b^2

The same technique can be used to solve for the natural number solutions of z^2=x^2+(2\alpha)xy+(\alpha^2+\beta^2)y^2 simply by using \{1, \alpha+\beta i\} as the complex basis.

Math Development Forum

I learned this beautiful technique four years ago while discussing a thread on the Math Development Forum (EMath). At that time, it felt like a masterpiece of craftsmanship. After understanding it then, I wanted to write about it on my blog to share with everyone, but for various reasons, I eventually forgot. Recently, a friend on the Math Development Forum asked a similar question again, so I picked it up to write and share with you all.

The Math Development Forum was probably the first math forum I encountered since I started using the internet. At that time, I also came across other math forums like Xilu, but the only one that has survived until now seems to be the Math Development Forum. I learned about the forum because of HugeCalc, a high-precision fast large number calculation tool developed by the forum master, Mr. Guo. When I first registered on the forum, it had just moved from Xilu to 5d6d. There weren’t many users, and I suppose I was among the first batch of people to join. A group of experts active on the forum are skilled in various fields such as mathematics and computer science, including number theory, analysis, and programming. I learned a lot of knowledge there, especially regarding number theory. For instance, the thread mentioned above taught me about Eisenstein integers and concepts like rings of integers. Later, when it became difficult to maintain on 5d6d, the forum became independent with its own server and exported all the original resources. In fact, the various mathematical posts in the Math Development Forum are among the most precious online Chinese mathematical resources.

When reposting, please include the original address of this article: https://kexue.fm/archives/2723

For more detailed information regarding reposting, please refer to: "Scientific Space FAQ"