In Math one encounters so many results that leave one with the impression that Squared Euclidean is special. One such example is Singular Value Decomposition, or equivalently the Eckart Young theorem.
Note that the squared part is important in that result although the squaring destroys the metric property. Arithmetic mean also minimizes the sum of Squared Euclidean from a set of points.
A part of beauty of Euclidean metrics (now without the squaring) is it's symmetry properties. It's level set, the circle (sphere) is the most symmetric object.
This symmetry is also the reason why the circle does not change if one tilts the coordinates. The orientation of the level sets of the other metrics considered, depend on the coordinate axes, they are not coordinate invariant.
Euclidean metric is also invariant under translation, rotation and reflection. It has a specific relation with notion of dot product and orthogonality -- the Cauchy-Schwarz inequality. A generalization of that is Holder's inequality that can be generalized beyond these Lp based metrics, to homogeneous sublinear 'distances' or levels sets that have some symmetry about the origin [0].
The Cartesian coordinate system is in some sense matched with the Euclidean metric. It would be fun to explore suitable coordinates for the other metrics and level sets, although I am not quite sure what that means.
[0] Unfortunately I couldn't find a convenient url. I thought Wikipedia had a demonstration of this result. Can't seem to find it.
whyandgrowth · 1h ago
This is very interesting, but I have 3 questions:
1. Why exactly n = 2 minimizes π. The article shows this graphically, but there is no formal proof (although the Adler & Tanton paper is mentioned). It would be interesting to understand why this is the case mathematically.
2. How to calculate π for n-metrics numerically. The general idea of "divide the circle into segments and calculate the length by the metric" is explained, but the exact algorithm or formulas are not shown.
3. What happens when n → 0. It mentions that "the concept of distance breaks down," but it does not explain exactly how and why this is so.
elsjaako · 54m ago
I think lcantuf has looked at the first two and decided that the answer is too complex for a post like this. He linked to the article.
The third one we can reason about: For all cases where x and y aren't 0, |x|^n goes to 1 as n goes to 0, so (|x|^n + |y|^n) goes to 2 , and 1/n goes to infinity, so lin n->0 (|x|^n + |y|^n)^(1/n) goes to infinity. If x and y are 0 it's 0, if x xor y are 0 it's 1.
To phrase this in a mathematically imprecise way, if all distances are either 0, 1, or infinite the concept of distance no longer represents how close things are together.
mistercow · 1h ago
> How to calculate π for n-metrics numerically. The general idea of "divide the circle into segments and calculate the length by the metric" is explained, but the exact algorithm or formulas are not shown.
I feel like that would have been a bit in the weeds for the general pacing of this post, but you just convert each angle to a slope, then solve for y/x = that slope, and the metric from (0,0) to (x,y) equal to 1, right? Now you have a bunch of points and you just add up the distances.
whyandgrowth · 57m ago
Thanks
srean · 55m ago
> The article shows this graphically, but there is no formal proof (although the Adler & Tanton paper is mentioned).
Well, if that interested you, you could have downloaded the paper and read it. To me your comment sounds a shade entitled, as if the blog author is under an obligation to do all the work. Sometimes one has to do the work themselves.
whyandgrowth · 50m ago
If the author had provided links to explanations or additional materials for those who want to understand the formal reasoning more deeply.
dpassens · 46m ago
And why does the linked paper not qualify as such a link?
Is π really a number or is it a computation? For example, fibbonaci(∞) is not a number, and π looks to be conceptually similar. Unlike fibonacci(∞), π has a limit, and we can approximate it with better and better precision, but in both cases the computation will never terminate
srean · 3m ago
To answer your question you need to define what a number is to you. There are many kinds of numbers, naturals, integers, rationals, computable reals, reals, infinitesimals... Not even getting into complex, quaternions, octonions etc.
Is sqrt(2) a number to you ?
isoprophlex · 1h ago
I love these little mathematical snippets, where I (as a math noob) can't tell if the result is trivial or deeply profound
At least to me it's provocative
BrandoElFollito · 39m ago
I had the same thoughts when studying physics (I have a PhD). Math was some kind of a toolbox for my problems - I used it without too many thoughts and a deeper understanding. Some of the "tools" were wonderful and I was amazed that it worked; some were voodoo (like the general idea of renormalisation, which was used as a "Deus ex machina" to save the day when infinities started to crawl up).
Math is very cool but I think it requires a special (brilliant) mind to go through, and a lot of patience at the beginning, where things seem to go at a glacial pace with no clear goal.
NooneAtAll3 · 1h ago
and hackernews' font has the worst pi :/
mellosouls · 38m ago
Yeah I noticed that too, and had to comment (now deleted) to test it was the website here, and not the original copied and pasted text.
skrebbel · 1h ago
I really suck at math, especially when continuous functions are involved (ie non-CS-y math). Usually when mathy articles are posted on HN, I quickly give up, but I just ate this article up. I'm really impressed with the clear explanation, it's quite something! Thanks for writing this!
amelius · 57m ago
But remember that "we" chose the generalization which this all depends on.
mjburgess · 52m ago
Well, it's pi parameterised by the distance metric, Pi(d)
You can parameterise it by other concerns if you wish, and other things follow. But as a matter of fact, this is how pi depends on the distance metric.
amelius · 17m ago
Yes, but we're looking at a specific set of distance metrics.
It'd be interested in the set where Pi(d) is constant and equal to Pi.
(disclaimer: IANAM and I haven't given it much thought)
Note that the squared part is important in that result although the squaring destroys the metric property. Arithmetic mean also minimizes the sum of Squared Euclidean from a set of points.
A part of beauty of Euclidean metrics (now without the squaring) is it's symmetry properties. It's level set, the circle (sphere) is the most symmetric object.
This symmetry is also the reason why the circle does not change if one tilts the coordinates. The orientation of the level sets of the other metrics considered, depend on the coordinate axes, they are not coordinate invariant.
Euclidean metric is also invariant under translation, rotation and reflection. It has a specific relation with notion of dot product and orthogonality -- the Cauchy-Schwarz inequality. A generalization of that is Holder's inequality that can be generalized beyond these Lp based metrics, to homogeneous sublinear 'distances' or levels sets that have some symmetry about the origin [0].
The Cartesian coordinate system is in some sense matched with the Euclidean metric. It would be fun to explore suitable coordinates for the other metrics and level sets, although I am not quite sure what that means.
[0] Unfortunately I couldn't find a convenient url. I thought Wikipedia had a demonstration of this result. Can't seem to find it.
1. Why exactly n = 2 minimizes π. The article shows this graphically, but there is no formal proof (although the Adler & Tanton paper is mentioned). It would be interesting to understand why this is the case mathematically.
2. How to calculate π for n-metrics numerically. The general idea of "divide the circle into segments and calculate the length by the metric" is explained, but the exact algorithm or formulas are not shown.
3. What happens when n → 0. It mentions that "the concept of distance breaks down," but it does not explain exactly how and why this is so.
The third one we can reason about: For all cases where x and y aren't 0, |x|^n goes to 1 as n goes to 0, so (|x|^n + |y|^n) goes to 2 , and 1/n goes to infinity, so lin n->0 (|x|^n + |y|^n)^(1/n) goes to infinity. If x and y are 0 it's 0, if x xor y are 0 it's 1.
To phrase this in a mathematically imprecise way, if all distances are either 0, 1, or infinite the concept of distance no longer represents how close things are together.
I feel like that would have been a bit in the weeds for the general pacing of this post, but you just convert each angle to a slope, then solve for y/x = that slope, and the metric from (0,0) to (x,y) equal to 1, right? Now you have a bunch of points and you just add up the distances.
Well, if that interested you, you could have downloaded the paper and read it. To me your comment sounds a shade entitled, as if the blog author is under an obligation to do all the work. Sometimes one has to do the work themselves.
Is sqrt(2) a number to you ?
At least to me it's provocative
Math is very cool but I think it requires a special (brilliant) mind to go through, and a lot of patience at the beginning, where things seem to go at a glacial pace with no clear goal.
You can parameterise it by other concerns if you wish, and other things follow. But as a matter of fact, this is how pi depends on the distance metric.
It'd be interested in the set where Pi(d) is constant and equal to Pi.
(disclaimer: IANAM and I haven't given it much thought)