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. Arithmetic mean also minimizes the sum of Squared Euclidean from a set of points. Squared-Euclidean's properties are also the reason why the K-means algorithm (Lloyd's algorithm) is so simple.
Note that the squared part is important in that result although the squaring destroys the metric property.
A part of beauty of Euclidean metric (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 in the post, 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.
Most of the special properties can be traced back to its special relationship with the inner product. And inner products have somewhat more elementary properties, so in that sense it explains the special position of the euclidean norm.
This has nothing to do with the coordinates by the way. If you want a different norm you'll first have to figure out an alternative to the bilinearity that gives the inner product its special properties.
Though bilinearity is pretty special itself, given the link between the tensor space and the linear algebra equivalent of currying.
I think that's arguably an a posteriori explanation: you can find orthogonal coordinates with respect to which the L^2 norm has a nice form, but you can also single out the L^2 norm in various ways (for example, by its large symmetry group, or the fact that it obeys the parallelogram law) without ever directly referencing coordinates.
The special properties extend into statistics, where you have the Gaussian distribution which feels both magical and universal, and is precisely the exponential of a (squared) Euclidean distance, i.e. exp(-(x - x0)^2).
I have the same feeling, that Cartesian coordinates and Euclidian distances are inherently connected as a natural pairing that is uniquely suited for producing the familiar reality that we inhabit and experience.
In my opinion it holds the same place in mathematics that water holds in biology and chemistry.
I can't edit my comment anymore so let me elaborate a bit here.
What is this sneaky connection between squared Euclidean and Cartesian coordinates that I mentioned ? Why are they such a compatible pair ?
The answer is the Pythagorean theorem.
The squared Euclidean distances decomposes nicely along orthogonal (perpendicular) directions.
d^2 = x^2 + y^2.
The Cartesian coordinates decomposes a point along orthogonal (perpendicular) axes as well, which we know is special for squared Euclidean distances.
The other metrics considered in the blog post decompose as, for lack of a better name, Fermat's last theorem decomposition.
d^n = x^n + y^n
Now if we were to use a coordinate system that decomposes points like that, that would be interesting to explore. I don't know of coordinate systems that do that.
This much is true, forget about integral triples (lattice points) for integral n > 2.
One of these ways (from which Cauchy-Schwarz and the other Hilbert Space results follow) is that d_2 is the only metric that satisfies the Parallelogram Law [1]:
Is there a metric for distance on the surface of a sphere? I imagine it's not one of the metrics in the family in the article, but in such a metric wouldn't Pi be less than 3.14?
[I dropped my physics major in college in favor of computer science, mostly because I couldn't handle the math, so I acknowledge that this could be a stupid/non-sensical question.]
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.
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.
For point one the reason is of course that π(p) has a [global] minimum at 2. Actually showing that is not that easy because the involved integrals have no closed form solution but in principle it is not too hard. The circumference of the circles is 2 π(p) and equals four times the length of the quarter circle in the first quadrant which has all x and y positive and allows dropping the absolute values. The quarter circle is y(x) = (1 - x^p)^(1/p) with x in [0, 1]. Its length is the integral of ds over dx from 0 to 1 where ds is the arc length in the Lp norm ds = (dx^p + dy^p)^(1/p) which yields ds = (1 + (dy/dx)^p)^(1/p) dx. For dy/dx you insert the derivative of the quarter circle dy/dx = -x^(p - 1)(1 - x^p)^(1/p - 1) and finally you have to compute the derivative of the integral with respect to p and find the zeros to figure out where the extrema are. Well, technically you have to also look at the second and third derivative to confirm that it is a minimum and check the limiting behavior. The referenced paper works around the integral by modifying the function in a way such that it still agrees with the original function in some relevant points but yields a solvable integral and shows that using the modified function does not alter the result.
> 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.
> 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.
Good point. I just thought that a direct link or summary of the formal reasoning would have made it easier for readers unfamiliar with the topic. But fair enough, the linked paper does cover it.
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.
To be fair, as someone who has a similar view of physics that you have to math, some things in physics have a similar "deus ex machina" vibe to me. Potential energy and conservation of energy are the immediate one that spring to mind; it kinda feels like the only reason energy is "conserved" is because we defined a term to be exactly equal to the amount we need to have conservation of energy. It's extremely useful, and I imagine there might be some deeper truth to it that's apparent to an expert, but as a novice, it looks a lot like we just came to with a convenient way to do calculations, slapped a name on it, and declared it a scientific law.
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!
Can someone explain what d(3)=(|x|^3+|y|^3)^(1/3) would actually mean as the blog seems to suggest something more profound than the below?
If d=|x|+abs|y} is moving in 2 dimensions, one dimension at a time and d(2)=(x^2+y^2)^(1/2) is moving in 2 dimensions at the same time, d(3)=(|x|^3+|y|^3)^(1/3) would have to mean moving 3 dimensions at once in two dimensional space (as it is missing the 3th position z) and for all n moving n dimensions at once in two dimensional space.
Now pi comes down to the constant calculating circumference. The blog shows we can approximate it best ignoring all other dimensions but those two in two dimensional space. Seems obvious, but that has everything to do with the nature of pi, not with the math.
d=(|x|^3+|y|^3+|z|^3)^(1/3) would approximate pi better in 3 dimensional space than in any other, etc.
I've always found the approximation of a circle to the limit as n -> inf of a polygon of n equal sides to be interesting. I do have a question though: is it possible to extend this method of exploration to reconcile the irrational property of pi? Because I'm somewhat discomforted with being satisfied with approximating our "best pi" to 3.14.
Think of irrationality as a form of infinite precision, such that no matter how many numbers you write down it’s always an approximation because there is always a more precise form.
Now think of the number of sides as increasing your precision. Meaning there is an n such that every approximation after will read 3.14… and another for 3.141….
Aside: In the table relating n to pi, what’s with the baselines of the text in the second column? (“exact” and “you are here”.) Is some renderer treating the characters like mathematical symbols?
The post is using MathJax. If you long press (presumably right click on desktop?) you get a menu.
If weird fonts bother you, consider disabling custom fonts in your browser settings. I do it occasionally, but it also breaks fontawesome (and similar), so it's not a clear win.
That was fun, unexpected, learned something. I can barely calculate a restaurant tip but the thing I noticed was that our n=2 circle is smooth and continuous, the others have abrupt angle changes. Perhaps that is a clue to why "our" pi is the smallest.
What does `n` correspond to here? And why is it “ours”? (although the second I understand as euclidean space corresponds to n=2 and we seem to live in a locally euclidean space)
Surely it’s not dimensions, since all of these examples were two-dimensional (x and y). So I’m a little lost here.
It's an infinite family of metrics - you provide an n (a positive integer) and get back a metric.
So if you pick n=1 you get d(x, y) = |x| + |y|, which is the taxicab metric. You can apply this metric to a Euclidean space of whatever dimension you like, just substituting the appropriate definition of |x| and |y|. For 1-dimensional space you would use |x| = abs(x[0]), for 2-dimensional space you would use |x| = sqrt(x[0]**2 + x[1]**2), etcetera. Hope that helps.
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
To answer your question you need to define what a number is to you. There are many different kinds of numbers, naturals, integers, rationals, irrationals, computable reals, reals, infinitesimals... Not even getting into complex, quaternions, octonions etc.
Is sqrt(2) a number to you ?
If you accept computable reals as numbers then \pi is definitely a number. So is the golden ratio.
If you believe that real numbers are numbers, then, yes, pi is a number. Indeed because pi is computable, it’s actually "more" real than almost all real numbers because there is only a countable infinity of computable reals.
Anyway, in modern math what a real number is, is defined as the limit of a "process", namely a Cauchy sequence. Of course, for the rational subset of reals the limit is trivial.
There are mathematical definitions of the terms "real number", "rational number", etc., but there is no mathematical definition of the word "number".
> we can approximate it with better and better precision
In one of the three common formal definitions of the real numbers, that's what a real number is: a Cauchy sequence of rational numbers, which approximate that real number with increasing precision. (Well, a real is an equivalence class of such sequences.)
(The other two common definitions are the Dedekind reals and the reals as the unique complete ordered field.)
Ironically, that response runs into the standard problem that many "limit" arguments have.
Generally speaking just because something looks like it's converging from some angle, it doesn't mean that it actually has a well-defined limit, and if it does then it also does not mean that the limit shares the properties of the items in the sequence of which it is the limit.
Examples: 1/n is strictly positive for all n. Its limit for n going to infinity, while well-defined, is not strictly positive. Another example: You can define pi as the limit of a sequence of rational numbers. But it's not rational itself.
So, no, your argument does not prove that pi is a number.
(I'm not arguing that pi is not a number. It definitely is. It's just that the argument is a different one.)
Spheres and hyperbolic are also interesting. On a sphere Pi can be anything from 3.14... to 4, then decreasing to zero based on how big your circle is. Not sure about hyp space but would be interesting.
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.
This is certainly an interesting question; however, it's probably very hard. This is because the 'set of all possible metrics of the 2d plane' is extremely large, and I am not sure if we have a good characterization for it.
There are a bunch of very strange metrics, e.g. a metric for which d(x,x) = 0, d(x,y)=1, that is, all points are at a distance of 1 to each other (this satisfies all axioms).
The area of the Euclidean unit disk (area of a circle with radius 1) is equal to π. However, the volume of the unit ball (ball with radius 1, one dimension more) is larger, namely 4/3π ≈ 4.18879. So how does the hypervolume for unit n-balls change in higher dimensions, where the 1-ball is a circular disk and the 2-ball an ordinary ball?
Surprisingly, it first increases but then converges to 0. The maximum is achieved for a unit 5-ball with a hypervolume of about 5.2638. For higher dimensions the value decreases again.
However: If we allow fractional dimensions, the 5-ball isn't at the peak volume. The n-ball with the largest volume is achieved for n≈5.256946404860577, with a volume of approximately 5.277768021113401, which are slightly larger numbers.
Curiously, the paper above says that the area of the hyper surface of the n-ball (rather than its volume) peaks at n≈7.2569464048, while ChatGPT calculated it as n≈6.256946404860577, so exactly one dimension less than the paper. I assume the paper is right?
Also curiously, as you can see from these numbers, that fractional dimension with the peak hyper surface area is exactly two (according to the paper) or one (according to ChatGPT) dimension larger than the fractional dimension of the peak volume.
This is a nice analog but unfortunately I think it breaks down in a way the "π" calculation does not.
In the article 2π(d) = the ratio of the circumference to the radius. This is dimensionless, in the sense that the circumference and the radius are both lengths (measured in meters, or whatever), so 2π(d) is really just a number.
But the (hyper)volumes you're talking about depend on dimension, which is exactly why you say "hyper". In 2 dimensions the volume is the area, πr^2, which has dimensions L^2 [measured in m^2 or whatever]. But in 3 dimensions the volume is 4/3 πr^3, which has dimensions L^3. The 5 dimensional (hyper)volume has dimensions L^5, and so on.
So, "comparing" these to find out which is bigger and which smaller is not really meaningful---just like you shouldn't ask which is the bigger mass: a meter or a second? Neither is, they aren't masses.
Yeah, though they are somewhat similar. We could perhaps say the volume of the unit ball is (in some sense) "larger" than the area of the unit disk, because both are measured relative to a radius of 1. So the area of the disk is fewer "units" than the volume of the ball.
Anyway, it seems independently interesting that this value peaks for the 5-ball, or the ~5.2569-ball. The non-fractional difference between fractional dimension of peak hyper volume and peak hyper surface area seems also interesting. (I assume there is some trivial explanation for this though.)
No it doesn't work that way because the units of hyper-volume and length are different.
However, once you take appropriate roots of hypervolume to get same units you can safely compare. Or the otherway round take appropriate powers of length to get same units as hypervolume.
I agree; the fair comparison is the nth root of the hypervolume in n dimensions, (V(n))^(1/n). This monotonically decreases from n=0, which shows the counterintuitive point that people often want to make anyway: an n-sphere takes up less and less of an n-hypercube. The peak at n~=5 is illusory.
Another fair comparison is between dimension-dependent lengths is the ratio of the (hyper)volume to the surface (hyper)area V(n)/A(n). This monotonically decreases from n=1.
With that it would probably mean the units monotonically approach 0, rather than first increasing and then decreasing. At least for whole dimensions. I'm not sure about monotonicity with fractional dimensions.
If you want to go deeper, this is a subject with an immense number of connections. But to find them you'll probably have to know what people call them.
> Civilized man is surrounded on all sides, indoors and out, by a subtle, seldom-noticed conflict between two ancient ways of shaping things: the orthogonal and the round. Cars on circular wheels, guided by hands on circular steering wheels, move along streets that intersect like the lines of a rectangular lattice. Buildings and houses are made up mostly of right angles, relieved occasionally by circular domes and windows. At rectangular or circular tables, with rectangular napkins on our laps, we eat from circular plates and drink from glasses with circular cross sections. We light cylindrical cigarettes with matches torn from rectangular packs, and we pay the rectangular bill with rectangular bank notes and circular coins.
This column is included in one of Martin Gardner's books, which is where I read it in my childhood.
Viewed as level sets of vector norms (https://en.wikipedia.org/wiki/Norm_(mathematics)) these curves are called "balls": https://en.wikipedia.org/wiki/Ball_(mathematics)#In_normed_v.... Vector norms are fundamental to approximation theory, and because people often do math on measurements from the real world [citation needed] which are always imprecise [citation needed], approximation theory is pretty widely applicable. It's often convenient to use one of the alternative norms mentioned in Michał's article for your proofs.
Errr... a circle is a shape in Euclidean geometry. Pi is a property of that shape in that geometry system. The OP article steps outside of Euclidean geometry. It discusses "circles" that aren't really circles. Therefore, the "pi's" that it discusses also aren't really pi's.
My conclusion therefore isn't "we have the best pi", but is rather "we have the only pi", because pi is simply not applicable, as soon as you alter the rules of there being a 2-dimensional plane and there being real-world distance, that the definition of pi depends on.
Anyway, I am not a mathematician, maybe I'm just too stuck in the boring old real world to get it!
The definition of "circle" they are using is the set of points at an equal distance (the radius) from a given point (the centre). This definition works in any setting in which some sort of "distance" (metric) is defined. They are also using an implicit definition of "circumference" that works for the cases being considered here: split the "circle" into sections, measure the sum of their lengths according to the metric and take the limit as you use more and more, smaller and smaller sections. There are details that aren't covered in the article, but it works.
Having defined what a "circle" is and what its "circumference" and "radius" are, "pi" is defined: it's half the ratio of the circumference to the radius.
(I don't think it was very nice of whoever downvoted you, presumably because you're wrong, given you explicitly allowed that you might not be getting it.)
> (I don't think it was very nice of whoever downvoted you, presumably because you're wrong, given you explicitly allowed that you might not be getting it.)
I believe this is how this website works: if someone thinks you are wrong, they will downvote your comment. It's best not to think about in terms of niceness but more about getting the content most people agree with, or considered the most valuable by the majority, to the top so that more people can view and discuss it.
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. Arithmetic mean also minimizes the sum of Squared Euclidean from a set of points. Squared-Euclidean's properties are also the reason why the K-means algorithm (Lloyd's algorithm) is so simple.
Note that the squared part is important in that result although the squaring destroys the metric property.
A part of beauty of Euclidean metric (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 in the post, 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.
Most of the special properties can be traced back to its special relationship with the inner product. And inner products have somewhat more elementary properties, so in that sense it explains the special position of the euclidean norm.
This has nothing to do with the coordinates by the way. If you want a different norm you'll first have to figure out an alternative to the bilinearity that gives the inner product its special properties.
Though bilinearity is pretty special itself, given the link between the tensor space and the linear algebra equivalent of currying.
> This has nothing to do with the coordinates by the way.
I think it does. Both decompose along orthogonal directions. See my comment here https://news.ycombinator.com/item?id=45248881
I think that's arguably an a posteriori explanation: you can find orthogonal coordinates with respect to which the L^2 norm has a nice form, but you can also single out the L^2 norm in various ways (for example, by its large symmetry group, or the fact that it obeys the parallelogram law) without ever directly referencing coordinates.
The special properties extend into statistics, where you have the Gaussian distribution which feels both magical and universal, and is precisely the exponential of a (squared) Euclidean distance, i.e. exp(-(x - x0)^2).
I have the same feeling, that Cartesian coordinates and Euclidian distances are inherently connected as a natural pairing that is uniquely suited for producing the familiar reality that we inhabit and experience.
In my opinion it holds the same place in mathematics that water holds in biology and chemistry.
I can't edit my comment anymore so let me elaborate a bit here.
What is this sneaky connection between squared Euclidean and Cartesian coordinates that I mentioned ? Why are they such a compatible pair ?
The answer is the Pythagorean theorem.
The squared Euclidean distances decomposes nicely along orthogonal (perpendicular) directions.
The Cartesian coordinates decomposes a point along orthogonal (perpendicular) axes as well, which we know is special for squared Euclidean distances.The other metrics considered in the blog post decompose as, for lack of a better name, Fermat's last theorem decomposition.
Now if we were to use a coordinate system that decomposes points like that, that would be interesting to explore. I don't know of coordinate systems that do that.This much is true, forget about integral triples (lattice points) for integral n > 2.
One of these ways (from which Cauchy-Schwarz and the other Hilbert Space results follow) is that d_2 is the only metric that satisfies the Parallelogram Law [1]:
2 d_2(x) + 2 d_2(y) = 2 d_2(x + y) + 2 d_2(x - y)
[1] https://en.wikipedia.org/wiki/Parallelogram_law
Is there a metric for distance on the surface of a sphere? I imagine it's not one of the metrics in the family in the article, but in such a metric wouldn't Pi be less than 3.14?
[I dropped my physics major in college in favor of computer science, mostly because I couldn't handle the math, so I acknowledge that this could be a stupid/non-sensical question.]
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.
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.
For point one the reason is of course that π(p) has a [global] minimum at 2. Actually showing that is not that easy because the involved integrals have no closed form solution but in principle it is not too hard. The circumference of the circles is 2 π(p) and equals four times the length of the quarter circle in the first quadrant which has all x and y positive and allows dropping the absolute values. The quarter circle is y(x) = (1 - x^p)^(1/p) with x in [0, 1]. Its length is the integral of ds over dx from 0 to 1 where ds is the arc length in the Lp norm ds = (dx^p + dy^p)^(1/p) which yields ds = (1 + (dy/dx)^p)^(1/p) dx. For dy/dx you insert the derivative of the quarter circle dy/dx = -x^(p - 1)(1 - x^p)^(1/p - 1) and finally you have to compute the derivative of the integral with respect to p and find the zeros to figure out where the extrema are. Well, technically you have to also look at the second and third derivative to confirm that it is a minimum and check the limiting behavior. The referenced paper works around the integral by modifying the function in a way such that it still agrees with the original function in some relevant points but yields a solvable integral and shows that using the modified function does not alter the result.
There's a stackexchange thread that touches on the first two questions. It's got the integral form of the circumference calculation, but I doubt there's a closed-form solution in general: https://math.stackexchange.com/questions/2044223/measuring-p...
> 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.
Thanks
> 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.
If the author had provided links to explanations or additional materials for those who want to understand the formal reasoning more deeply.
And why does the linked paper not qualify as such a link?
Good point. I just thought that a direct link or summary of the formal reasoning would have made it easier for readers unfamiliar with the topic. But fair enough, the linked paper does cover it.
P.S. Sorry, I was wrong.
[dead]
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
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.
To be fair, as someone who has a similar view of physics that you have to math, some things in physics have a similar "deus ex machina" vibe to me. Potential energy and conservation of energy are the immediate one that spring to mind; it kinda feels like the only reason energy is "conserved" is because we defined a term to be exactly equal to the amount we need to have conservation of energy. It's extremely useful, and I imagine there might be some deeper truth to it that's apparent to an expert, but as a novice, it looks a lot like we just came to with a convenient way to do calculations, slapped a name on it, and declared it a scientific law.
A similar article, possibly was linked from Hacker News before: https://azeemba.com/posts/pi-in-other-universes.html
Very nice. Thank you.
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!
[edited]
Can someone explain what d(3)=(|x|^3+|y|^3)^(1/3) would actually mean as the blog seems to suggest something more profound than the below?
If d=|x|+abs|y} is moving in 2 dimensions, one dimension at a time and d(2)=(x^2+y^2)^(1/2) is moving in 2 dimensions at the same time, d(3)=(|x|^3+|y|^3)^(1/3) would have to mean moving 3 dimensions at once in two dimensional space (as it is missing the 3th position z) and for all n moving n dimensions at once in two dimensional space.
Now pi comes down to the constant calculating circumference. The blog shows we can approximate it best ignoring all other dimensions but those two in two dimensional space. Seems obvious, but that has everything to do with the nature of pi, not with the math.
d=(|x|^3+|y|^3+|z|^3)^(1/3) would approximate pi better in 3 dimensional space than in any other, etc.
I've always found the approximation of a circle to the limit as n -> inf of a polygon of n equal sides to be interesting. I do have a question though: is it possible to extend this method of exploration to reconcile the irrational property of pi? Because I'm somewhat discomforted with being satisfied with approximating our "best pi" to 3.14.
Think of irrationality as a form of infinite precision, such that no matter how many numbers you write down it’s always an approximation because there is always a more precise form. Now think of the number of sides as increasing your precision. Meaning there is an n such that every approximation after will read 3.14… and another for 3.141….
and hackernews' font has the worst pi :/
The font stack is just "Verdana, Geneva, sans-serif;" so either one of those or a system font is the culprit.
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.
"All norms define the same topology"
Memory from my Analysis 4 class in college.
Aside: In the table relating n to pi, what’s with the baselines of the text in the second column? (“exact” and “you are here”.) Is some renderer treating the characters like mathematical symbols?
The post is using MathJax. If you long press (presumably right click on desktop?) you get a menu.
If weird fonts bother you, consider disabling custom fonts in your browser settings. I do it occasionally, but it also breaks fontawesome (and similar), so it's not a clear win.
That was fun, unexpected, learned something. I can barely calculate a restaurant tip but the thing I noticed was that our n=2 circle is smooth and continuous, the others have abrupt angle changes. Perhaps that is a clue to why "our" pi is the smallest.
Popular-news version of this math, from the New York Times:
https://www.nytimes.com/interactive/2025/06/09/science/math-...
What does `n` correspond to here? And why is it “ours”? (although the second I understand as euclidean space corresponds to n=2 and we seem to live in a locally euclidean space)
Surely it’s not dimensions, since all of these examples were two-dimensional (x and y). So I’m a little lost here.
It's an infinite family of metrics - you provide an n (a positive integer) and get back a metric.
So if you pick n=1 you get d(x, y) = |x| + |y|, which is the taxicab metric. You can apply this metric to a Euclidean space of whatever dimension you like, just substituting the appropriate definition of |x| and |y|. For 1-dimensional space you would use |x| = abs(x[0]), for 2-dimensional space you would use |x| = sqrt(x[0]**2 + x[1]**2), etcetera. Hope that helps.
And this works for any positive n (need not be an integer, and I think the author has an example with 1.5). Normally the letter p is used instead.
I don’t think it’s a metric for 0 < p < 1 though.
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
To answer your question you need to define what a number is to you. There are many different kinds of numbers, naturals, integers, rationals, irrationals, computable reals, reals, infinitesimals... Not even getting into complex, quaternions, octonions etc.
Is sqrt(2) a number to you ?
If you accept computable reals as numbers then \pi is definitely a number. So is the golden ratio.
If you believe that real numbers are numbers, then, yes, pi is a number. Indeed because pi is computable, it’s actually "more" real than almost all real numbers because there is only a countable infinity of computable reals.
Anyway, in modern math what a real number is, is defined as the limit of a "process", namely a Cauchy sequence. Of course, for the rational subset of reals the limit is trivial.
There are mathematical definitions of the terms "real number", "rational number", etc., but there is no mathematical definition of the word "number".
> we can approximate it with better and better precision
In one of the three common formal definitions of the real numbers, that's what a real number is: a Cauchy sequence of rational numbers, which approximate that real number with increasing precision. (Well, a real is an equivalence class of such sequences.)
(The other two common definitions are the Dedekind reals and the reals as the unique complete ordered field.)
Is 2 a number?
Is 4 a number?
Is 4/2 a number?
Is 3 a number?
Is 3/2 a number?
etc...
All of these symbols represent precise points on the numberline. Pi also represents a precise point on the numberline, so is it not a number?
Ironically, that response runs into the standard problem that many "limit" arguments have.
Generally speaking just because something looks like it's converging from some angle, it doesn't mean that it actually has a well-defined limit, and if it does then it also does not mean that the limit shares the properties of the items in the sequence of which it is the limit.
Examples: 1/n is strictly positive for all n. Its limit for n going to infinity, while well-defined, is not strictly positive. Another example: You can define pi as the limit of a sequence of rational numbers. But it's not rational itself.
So, no, your argument does not prove that pi is a number.
(I'm not arguing that pi is not a number. It definitely is. It's just that the argument is a different one.)
I wonder if there is a nice formula for the pi from n plot (extended to real n-s). It looks "nice enough" on the first glance.
As for n=0, can't you prove that pi=inf for n=0 using limits?
Spheres and hyperbolic are also interesting. On a sphere Pi can be anything from 3.14... to 4, then decreasing to zero based on how big your circle is. Not sure about hyp space but would be interesting.
this would make a great yt video lesson
But remember that "we" chose the generalization which this all depends on.
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.
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)
This is certainly an interesting question; however, it's probably very hard. This is because the 'set of all possible metrics of the 2d plane' is extremely large, and I am not sure if we have a good characterization for it.
There are a bunch of very strange metrics, e.g. a metric for which d(x,x) = 0, d(x,y)=1, that is, all points are at a distance of 1 to each other (this satisfies all axioms).
Also interesting:
The area of the Euclidean unit disk (area of a circle with radius 1) is equal to π. However, the volume of the unit ball (ball with radius 1, one dimension more) is larger, namely 4/3π ≈ 4.18879. So how does the hypervolume for unit n-balls change in higher dimensions, where the 1-ball is a circular disk and the 2-ball an ordinary ball?
Surprisingly, it first increases but then converges to 0. The maximum is achieved for a unit 5-ball with a hypervolume of about 5.2638. For higher dimensions the value decreases again.
However: If we allow fractional dimensions, the 5-ball isn't at the peak volume. The n-ball with the largest volume is achieved for n≈5.256946404860577, with a volume of approximately 5.277768021113401, which are slightly larger numbers.
These were computed by GPT-5-thinking, so take it with a grain of salt. But the fractional dimension for peak volume is also reported here on page 34: http://lib.ysu.am/disciplines_bk/8d6a1692e567ede24330d574ac3...
Curiously, the paper above says that the area of the hyper surface of the n-ball (rather than its volume) peaks at n≈7.2569464048, while ChatGPT calculated it as n≈6.256946404860577, so exactly one dimension less than the paper. I assume the paper is right?
Also curiously, as you can see from these numbers, that fractional dimension with the peak hyper surface area is exactly two (according to the paper) or one (according to ChatGPT) dimension larger than the fractional dimension of the peak volume.
This is a nice analog but unfortunately I think it breaks down in a way the "π" calculation does not.
In the article 2π(d) = the ratio of the circumference to the radius. This is dimensionless, in the sense that the circumference and the radius are both lengths (measured in meters, or whatever), so 2π(d) is really just a number.
But the (hyper)volumes you're talking about depend on dimension, which is exactly why you say "hyper". In 2 dimensions the volume is the area, πr^2, which has dimensions L^2 [measured in m^2 or whatever]. But in 3 dimensions the volume is 4/3 πr^3, which has dimensions L^3. The 5 dimensional (hyper)volume has dimensions L^5, and so on.
So, "comparing" these to find out which is bigger and which smaller is not really meaningful---just like you shouldn't ask which is the bigger mass: a meter or a second? Neither is, they aren't masses.
Yeah, though they are somewhat similar. We could perhaps say the volume of the unit ball is (in some sense) "larger" than the area of the unit disk, because both are measured relative to a radius of 1. So the area of the disk is fewer "units" than the volume of the ball.
Anyway, it seems independently interesting that this value peaks for the 5-ball, or the ~5.2569-ball. The non-fractional difference between fractional dimension of peak hyper volume and peak hyper surface area seems also interesting. (I assume there is some trivial explanation for this though.)
No it doesn't work that way because the units of hyper-volume and length are different.
However, once you take appropriate roots of hypervolume to get same units you can safely compare. Or the otherway round take appropriate powers of length to get same units as hypervolume.
I agree; the fair comparison is the nth root of the hypervolume in n dimensions, (V(n))^(1/n). This monotonically decreases from n=0, which shows the counterintuitive point that people often want to make anyway: an n-sphere takes up less and less of an n-hypercube. The peak at n~=5 is illusory.
Another fair comparison is between dimension-dependent lengths is the ratio of the (hyper)volume to the surface (hyper)area V(n)/A(n). This monotonically decreases from n=1.
With that it would probably mean the units monotonically approach 0, rather than first increasing and then decreasing. At least for whole dimensions. I'm not sure about monotonicity with fractional dimensions.
If you want to go deeper, this is a subject with an immense number of connections. But to find them you'll probably have to know what people call them.
You can read more about the curves of Lamé plotted in this article at https://en.wikipedia.org/wiki/Superellipse. If you're in Sweden, the layout of https://en.wikipedia.org/wiki/Sergels_torg is a superellipse design by Piet Hein. Martin Gardner wrote a delightful column about this in the September 01965 Scientific American: https://www.scientificamerican.com/article/mathematical-game... "The superellipse: a curve that lies between the ellipse and the rectangle" which I don't have a copy of, except the slightly corrupted copy at https://piethein.com/superellipse/. It begins lyrically:
> Civilized man is surrounded on all sides, indoors and out, by a subtle, seldom-noticed conflict between two ancient ways of shaping things: the orthogonal and the round. Cars on circular wheels, guided by hands on circular steering wheels, move along streets that intersect like the lines of a rectangular lattice. Buildings and houses are made up mostly of right angles, relieved occasionally by circular domes and windows. At rectangular or circular tables, with rectangular napkins on our laps, we eat from circular plates and drink from glasses with circular cross sections. We light cylindrical cigarettes with matches torn from rectangular packs, and we pay the rectangular bill with rectangular bank notes and circular coins.
This column is included in one of Martin Gardner's books, which is where I read it in my childhood.
Superquadrics are a generalization of the three-dimensional case (see https://en.wikipedia.org/wiki/Superquadrics); Ed Mackey's 01987 "Superquadrics" screensaver is included in xscreensaver, which you can easily install if you're running Debian or Android with F-Droid: https://f-droid.org/en/packages/org.jwz.xscreensaver/
Viewed as level sets of vector norms (https://en.wikipedia.org/wiki/Norm_(mathematics)) these curves are called "balls": https://en.wikipedia.org/wiki/Ball_(mathematics)#In_normed_v.... Vector norms are fundamental to approximation theory, and because people often do math on measurements from the real world [citation needed] which are always imprecise [citation needed], approximation theory is pretty widely applicable. It's often convenient to use one of the alternative norms mentioned in Michał's article for your proofs.
Errr... a circle is a shape in Euclidean geometry. Pi is a property of that shape in that geometry system. The OP article steps outside of Euclidean geometry. It discusses "circles" that aren't really circles. Therefore, the "pi's" that it discusses also aren't really pi's.
My conclusion therefore isn't "we have the best pi", but is rather "we have the only pi", because pi is simply not applicable, as soon as you alter the rules of there being a 2-dimensional plane and there being real-world distance, that the definition of pi depends on.
Anyway, I am not a mathematician, maybe I'm just too stuck in the boring old real world to get it!
The definition of "circle" they are using is the set of points at an equal distance (the radius) from a given point (the centre). This definition works in any setting in which some sort of "distance" (metric) is defined. They are also using an implicit definition of "circumference" that works for the cases being considered here: split the "circle" into sections, measure the sum of their lengths according to the metric and take the limit as you use more and more, smaller and smaller sections. There are details that aren't covered in the article, but it works.
Having defined what a "circle" is and what its "circumference" and "radius" are, "pi" is defined: it's half the ratio of the circumference to the radius.
(I don't think it was very nice of whoever downvoted you, presumably because you're wrong, given you explicitly allowed that you might not be getting it.)
> (I don't think it was very nice of whoever downvoted you, presumably because you're wrong, given you explicitly allowed that you might not be getting it.)
I believe this is how this website works: if someone thinks you are wrong, they will downvote your comment. It's best not to think about in terms of niceness but more about getting the content most people agree with, or considered the most valuable by the majority, to the top so that more people can view and discuss it.