I don't think it's correct to see the n-sphere as poking out of the sides of the cube; the sphere has constant curvature so it has no protrusions. Rather, the n-cube gets more and more spiky so the constraining spheres get (relatively) smaller and further away from the centre, so constrain the central sphere less and less.
The spikiness of n-cubes is apparent when you look at the (solid) angle at each vertex; it starts constant (1/2 pi radian in 2D, 1/2 pi steradian in 3D) but reduces thereafter at an increasing rate (1/8 pi^2, 1/12 pi^2, 1/64 pi^3, etc.).
The spiky view of n-spheres is due to all of their volume getting concentrate next to the axes - the proportion of volume which is less than ε away from an axis to the entire volume of the sphere tends to 1 exponentially with n, which leads to the spiky visualization as we imagine 3d but with more axes.
I don't think this is the right way to process this intuitively. When you use words like "volume getting concentrated" it sounds like there is some non-uniformity in the sphere, but the non-uniformity is really in our intuition about space.
What's weird isn't the sphere, it's distance, and I think that's easier to process.
Going from a (1d) sidewalk to a (2d) football field to a (3d) ocean, it's easier to see our intuitions about distances slowly breaking down.
That's not accurate either. Neither the cube nor the sphere "bend" in any way. Irrespective of the number of dimensions, the cube's surfaces remain (hyper)planar, and the sphere retains its convex shape and constant curvature.
The diagram on the web page is just wrong. The enclosed sphere does not poke out with "spikes".
The error in the diagram is that it shows the corner cubes "filled" with spheres, but this is not what happens in the higher-dimensional analogues. If you take a cube-shaped cross section of a 4D example (through the center), you wouldn't see the corner spheres at all.
Think of a 2D slice through the middle of the 3D example: You'd just see a square, no circles!
They're the same. So square + circle, cube + sphere, 4D hypercube + 4D hypersphere, etc...
But cross-sections don't look the way you think they do. So if you draw a 3D intersection through the 4D case, it looks much like the 2D intersection of the 3D case, etc...
In all such "intersection" diagrams you don't see the spheres in the corners of the cubes. The conceptual diagram on that page showing the high-dimensional case shows the corner spheres and the middle sphere somehow "squished out" in a spiky way.
I'm not certain I know what you mean, but it doesn't seem to work. If you mean to take epsilon neighborhoods in Euclidean norm of the axes, then I'm skeptical that that contains most of the mass of the sphere, since simulating random points on a thousand dimensional sphere doesn't seem to give points near these axes.
If instead you mean most of the mass of the ball is in the points which have all but one coordinate within epsilon of zero, then the intuition doesn't follow. It's equally true that you get most of the mass considering just points with all coordinates within epsilon. And for that you get that the mass of the ball is concentrated in an epsilon cube at the origin, which excludes exactly the spikes that you were basing the intuition on. The weird thing in this thought experiment is the epsilon cube not the sphere. For example the epsilon cube contains points much further than epsilon from the origin and so it's maybe not surprising that it contains most of the sphere.
If you want to define volume in D-dimensional space then you need to choose what the unit volume is, for example that a unit hyper cube has unit volume one. (That choice is relevant for these discussions and you could equally have chosen a unit ball to have volume one since you're defining D-dimensional volume you get to choose.) But a probability distribution is always normalized to integrate to one, which means either choice of volume definition will give you the same uniform probability distribution on the ball. So there's an extra arbitrary constant to choose for volume that isn't important in the probability distribution even though you define the probability density in terms of the volume.
But there is an alternative visualization where the sides of the unit (hyper)cube are deformed because the location of the vertices gets further and further away from the origin. Of course neither is a true representation of the hyperdimensional case.
> The result, when projected in two dimensions no longer appears convex, however all hypercubes are convex. This is part of the strangeness of higher dimensions - hypercubes are both convex and “pointy.”
Yes. Hence the quotes, I guess. But hyperspheres are convex and their projections are also convex. So it's not really appropriate either to say that they are "spiky" as in https://news.ycombinator.com/item?id=29969613
> the (solid) angle at each vertex; it starts constant (1/2 pi radian in 2D, 1/2 pi steradian in 3D)
Unstudied curiosity: steradians seem to be defined in terms of the point of a cone. But the corner of a cube is the intersection of several (for a cube, 3) planes, not a cone. How do you do the calculation of steradians?
Cone is one scenario to think about, but what it really comes down to is the fraction of the full sphere that your solid angle includes.
To make a 2D analogy, you can think of 2D angles as a portion of a circle represented as a fraction of 2pi radians. Cut it in half and you have pi radians, cut that in half (so a quarter of the circle) and you have pi/2 radians, or 90 degrees.
That 90 degrees "quarter of a circle" example is looking at it as the "point of a pie slice", but it's the same 90 degree 2D angle as you have in the corner of a square.
You can look at the corner of a cube the same way. The full sphere of solid angle is 4pi, a hemisphere is 2pi. Now take that hemisphere and cut it into quarters (1/8ths of a sphere). Each of those quarters is pi/2 steradians, and the solid angle at the center is the same solid angle represented by 1/8th of the sphere is the same solid angle you have at the corner of a cube.
Or to put it another way, you could pack the corners of 8 cubes around a point and it would leave no empty gaps, so the corner of each cube is occupying 1/8th of a "full" 4pi steradians.
Now that I've thought about it, I don't think we're on solid ground measuring pointiness in n-dimensional radians. A perfectly non-pointy angle in 2D is half the circle, or π radians. A perfectly non-pointy angle in 3D is half the sphere, or 2π steradians. π is less than 2π, but the straight-line 2D angle is not sharper than the flat-plane 3D angle. What's relevant to the pointiness is the proportion of the sphere, not the numeric value of the surface area.
It corresponds to area if and only if you're talking about a unit sphere.
In the same way that an angle of pi radians corresponds to pi length around the perimeter of a unit circle, but if you're measuring on the perimeter of a larger circle you'll have a correspondingly larger length.
The "4pi steradians in a sphere" comes from the area of a unit sphere (4×pi×r^2 = 4×pi). I've never had cause to use 4+ dimensional solid angle for anything, but you'd determine full n-dimensional radians the same way, I guess with a 4-dimensional sphere the "surface area" is a 3D volume on the perimeter of the 4D unit sphere's space?
> In the same way that an angle of pi radians corresponds to pi length around the perimeter of a unit circle, but if you're measuring on the perimeter of a larger circle you'll have a correspondingly larger length.
I understand this. It's not what I'm talking about.
There was a claim upthread that the corner of a square and the corner of a cube are equally sharp because (1) one of them is π/2 radians; (2) the other is π/2 steradians; and (3) π/2 is equal to π/2, hence equally sharp.
I'm saying I don't think this can be right, because when we consider two angles that we know are equally sharp, the 2D flat line and the 3D flat plane, one of them is π and the other is 2π, so unit-free radian measurements cannot be a valid measure of sharpness. The radian measurement needs to be normed against the full sphere in an equal number of dimensions, so that the flat line equals 1/2 (of a circle) and the flat plane equals 1/2 (of a sphere). I want to conclude that these two angles are equally sharp because 1/2 is equal to 1/2. But even if I can't do that, I need to avoid concluding that a flat line is twice as sharp as a flat plane, because I know that's untrue.
But my reasoning would tell us that the corner of a cube is twice as sharp as the corner of a square, 1/8 to 1/4.
Ah gotcha. I'm not even sure it's meaningful to compare the "relative pointiness" of angles between different dimensions. It's like trying to compare whether the area of a circle is bigger or smaller than the volume of a sphere. And then what if I only have 70% of a circle, but 80% of the sphere?
You could make up some metric like "the unit sphere occupies a greater volume fraction of the unit cube compared to the area fraction of a unit circle in a unit square", and compare like that if you only have some fraction of each circle/sphere instead of the whole thing, but is there any value in making that comparison?
> I'm not even sure it's meaningful to compare the "relative pointiness" of angles between different dimensions.
I think this is actually something we can't avoid. The problem with dodging the question this way is that it's really, really easy to translate a low-dimensional angle up into a higher-dimensional space.
Imagine I have two 2D vectors, U and V, with an angle between them. I can think of them as representing an infinite 1D surface consisting of the points (m·u_1 + n·v_1, m·u_2 + n·v_2) for all nonnegative real m and n.
It's trivial to define a 2D surface in 3D space representing exactly the same angle: it is the points (m·u_1 + n·v_1, m·u_2 + n·v_2, a) for all nonnegative real m and n and all real a. When the angle between U and V is θ radians, this surface will always express an angle of 2θ steradians. I don't think it's a stretch to say that the two angles, θ radians and 2θ steradians, must be equally sharp. (And indeed, the flat-line / flat-plane example is a special case of this one.)
I need to correct myself: I've defined my surfaces as linear combinations of the vectors forming the angle, which is wrong. Rather, the 1D surface expressing the 2D angle consists of the points in the set (mU ∪ nV) for all nonnegative m and n, and the 2D surface extending the angle into 3D space consists of the set [(m·u_1, m·u_2, a) ∪ (n·v_1, n·v_2, a)] for all nonnegative m, n and all a.
This phenomenon has been written up many times, and some of those have been submitted here previously, with some discussion. For those who might be interested to see those previous discussions, here are two of them:
To add to this list: Richard Hamming includes a section on this in his n-dimensional spaces talk from "The Art of Doing Science and Engineering" lectures [0]. Stripe Press also recently re-published a beautiful copy of the print version of these lectures [1].
Yes. As the number of dimensions n increases above 3, the interior angles at each vertex of an n-cube get smaller and smaller[a], while the n-cube's hypervolume gets more and more concentrated near its hypersurface, which is itself a hypervolume of n-1 dimensions.[b]
Lines and areas are different animals; we cannot reason about them apples-to-apples; we know this intuitively. Areas and volumes are different animals too; we cannot reason about them apples-to-apples; we know this intuitively. Similarly, n-dimensional objects and (n+1)-dimensional objects are different animals; we cannot reason about them apples-to-apples.
As human beings, we find it so difficult to reason "visually" about higher dimensional spaces, in part, I believe, because our puny little brains have spent a lifetime learning to model three dimensions (with a fourth dimension, time, flowing only in one direction).
[b] See this old thread for intuitive explanations about how and why this happens with n-spheres as we increase the number of dimensions n: https://news.ycombinator.com/item?id=15676220
It’s not just our brains that are evolutionarily unsuited to the task, but almost all of us except the few mathematicians who study these higher dimensional spaces, have basically no experience or exposure to higher dimensional spaces.
If you spend a year playing 4D Minecraft (I assume without googling that this exists), I suspect your intuition would be very much improved.
Back in the 70's, Martin Gardner published an article in his Mathematical Games column in the SciAm, about visualising rotating hyperspheres and hypercubes. The way I remember it, his imaginary friend Dr. Morpheus (or something) had shown him colour animations of these rotating objects. There were a couple of stills in the article. The 4D objects were of course projected down to 2D.
I've played with an animation of a wireframe hypercube that you could rotate around different axes. It was quite mind-boggling. But Gardner particularly raved about the mind-altering effect of viewing a rotating hypersphere. I've always wanted to view that, but I never heard anything about it again. It seems to me that a 2D projection of a hypersphere must look to all intents and purposes like a sphere.
Does anyone know where that article might be archived? Or where I can view an animation of a rotating hypersphere?
Just think of the high dimension n-cube like a spiky sea urchin. It has 2^n spikes, and the spheres live in those spikes near the ends. The central sphere is large because it extends out to those spheres, extending outside the sea urchin's "body".
But ... it's not. It's not concave anywhere. If you draw a line from any point of the n-cube to any other point, it never passes outside the body of the cube. Perhaps your model gives better intuition in "curse of dimensionality" cases like this one, but it's clearly worse in other ways, right? It's simply not at all an accurate description of the shape.
It depends on how you define "concaveness". A cube is concaver than a square in a sense. The travel from the center of a unit square to its side takes 0.5, and to its vertex ~0.7. For a cube, 0.5 and ~0.87. For a 100d cube, 0.5 and 5. (For completeness, for 1d cube it's 0.5, 0.5). Of course that is not a true concaveness, but it gives a nice sense of inside distances, especially with spheres, which are defined as equidistant.
We are just used to project a cube in a way that prevents to see its linearly-spatial configuration (a projection messes up lengths), but if you preserve these lengths and "flatten" them instead, a cube will flatten out to a sort of a shuriken.
> It depends on how you define "concaveness". A cube is concaver than a square in a sense.
Yup. Even a regular 3D cube (and 2D square) has concave faces if you're viewing it from a polar perspective. As I stand in the center of the cube, measuring distances from me to the surface, I'll see that measurement follow a concave pattern.
Yeah, I know that's not the definition of concavity or whatever, but when relating a sphere to a cube, and trying to get an intuition of higher-dimensional spaces, I think it helps to look at it from the sphere's perspective rather than a Cartesian one.
Thank you! This comment solidified for me that the increasing ratio of distances from origin to vertex/side together with the fact that the hypercube surface is still not curved in any way whatsoever is the major thing my spatial intuition (unsurprisingly) struggles with.
There’s a certain way in which a cube “feels sharper” or “feels spikier” than a square. Trying to formalize that, you can compare the edge of a 3d box where two faces meet to the point where three faces meet. I’d rather step on the two-face edge than the three-face corner, and there’s definitely a sense in which the cube is spikier.
It seems reasonable to extend that same intuition to n-D sharpness/spikiness in an accurate way. Adding an extra “face” just chops more off making those vertices sharper and sharper, at least relative to the high dimensional space around it.
I think that's a great insight; I especially like comparing the sharpness of an two-face edge to a three-face corner; we could expect stepping on a seven-face corner to be slightly worse than stepping on a six-face. I think that "sharpness" idea surely must be related to this phenomenon. However, one should be careful not to let that "increasing sharpness" idea lead to the mental image of a concave shape, especially not a sea urchin. That would be a false resolution to this "paradox" and that image of a N-cube would lead to all sorts of other incorrect ideas, e.g. regarding where the volume of the shape is.
Maybe the right intuition is a sea urchin that is, due to high dimensional unintuitive properties, still convex. It’s almost entirely extremely pointy corners, and yet they’re “magically” connected to each other in an entirely convex manner.
It works if you aren't rigid about your mental representations. Pull an inverse wittgenstein on the intuitions. Instead of stool, chair, recliner all being instances of the general category "chair" -- sea urchin, cube, dodecahedron are all partially accurate descriptions of the specific 10D cube.
Maybe? I'm not claiming there's no way to have a good intuition about 4D space -- in fact articles like this make me want to figure out how to achieve such a thing. But it seems likely to me that even if your brain is somehow capable of visualizing 4D things, it would be just as weird to move to 5D as it is for normal people to move to 4D. Did Stott have any special intuition about 5+D? And we're talking about making that cognitive jump five more times to get to 10D.
However, it's clear the "starfish" intuition is simply not accurate. That's not what N-cubes look like. The point of this post is that we should have cognitive dissonance when we try to think about 10-cubes, because it's weird that (A) the "inner sphere" pokes out of a shape that is (B) convex everywhere. You can resolve the cognitive dissonance easily by simply ignoring or rejecting B -- sure, it's not weird that such a sphere would poke out of a starfish. But you are wrong. It's not a starfish! It's convex everywhere! So you can't say "why do y'all have cognitive dissonance about this?"
It is accurate, just not completely accurate. You only get cognitive dissonance if you try to resolve it all the way.. stack multiple imperfect intuitions to approximate the real thing.
Is there some obvious way (that I seem to be missing) to see that the centrally inscribed D-sphere must touch all of the other spheres in high dimensions?
That's probably a stupid question, but while that fact is intuitively obvious for D={2,3} -- as this problem tries to demonstrate -- higher dimensions are unintuitively WEIRD.
You can argue by symmetry that if the central sphere touches one of the corner spheres, it must touch them all. And it must touch one because otherwise you would increase it's radius until it did.
Well we can calculate the touch point for one sphere, and we know that it would overlap that sphere if it was radius sqrt(D).
And all the other spheres are simple symmetrical mirrors, so how could it not touch all of them at the same time it touches one? That should scale to an arbitrary number of dimensions, right?
I also found it very weird, but here's my intuition.
There are 2^k > 512 spheres stuck to eachother across k-d (pretend k=9). The line from the center to the point where the inner sphere touches one of outer spheres has to shortcut through all k dimensions to get from the center to the sphere.
This distance has been massively inflated due to the number of dimensions. But the distance to the edge of the box hasn't been inflated - it's just constant, so the inner sphere breaks out.
OK, Another reference is [1], that agrees with the result given by the OP.
I'm not trying to do research here, I'm just boggling at the unintuitive result, and trying to see if there might be a flaw in the chain of logic. The fact that this is "well known" is enough to scare me off from barking up this particular tree.
Substep 6 is not obvious to me. It is not clear that the point where the inner sphere and the space-filling spheres intersect must be along the line from the center of the cube to the center of each sub-cube.
To put it another way, it's not obvious to me that the point of contact between the inner pink circle and the outer black circle is along the green line.
Both spheres are symmetric around this line, so a point on intersection anywhere but on the line would give you a circle of intersection (and so a disk, by convexity) ...
I think this is a property spheres. It seems to me that any two spheres that are touching have a straight line from one center to the other center exactly through the point of contact. Try thinking of just two spheres and adding more in step-by-step.
Then the result follows because all the spheres are defined as centered on the cube/sub-cubes respectively.
The inner sphere is not defined as centered on the cube; it is defined as touching all the other spheres.
That said, there is a symmetry argument that if it were centered anywhere else, something is wrong. But that only works if there is only one unique sphere that touches all the other spheres, which is also not obvious to me in higher dimensions.
You can go ahead and define it as centered on the cube. That still demonstrates the strange nature of high-dimensional spheres even if there wasn't a unique solution for touching all the other spheres.
Not obvious for higher dimensions or even D=2? Surely you agree the center of both circles (regardless of dimension) occur along the line from the center of the cube to one of the corners. Therefore, if you just radially grow these spheres they must touch for the first time along this line. To be clear, this is nothing special about the cube, if you draw a line between the center of any two circles, the first time they touch will be somewhere along this line. In this case, the inner circle is obviously along the diagonal and it doesn't take much to see that the outer circles are as well by their construction. Therefore, the diagonal is the line that connects the centers.
I don't agree that the center of both circles needs to lie along that line. The space-filling ones do by definition, but I don't see why the center one has to be on that line. It seems like it must in D=2, of course, but I couldn't prove that it must for D=9, or even that it is unique.
Ah, ok, I will try to appeal to symmetry while giving geometric intuition. I think the best way to visualize this (and explains a little what exactly is going on) consider cutting a plane through the hypercube through diametric corners. For instance, (2,2,2,...,2) and (-2,-2,-2,...,-2). This will reduce down to a 2-dimensional problem but things are no longer square. The vertical edges of the quadrants are 2 but the horizontal lengths are 2sqrt(D-1). To see this, calculate it for 3-dimensions as you can still draw it out. By construction, the circle inside the quadrant kisses the top and bottom and is centered horizontally. That is, there is a gap between the edges of the circle horizontally and the quadrant. Again, to visualize, picture how the plane is cutting in 3-dimensions. Now, since you seem to accept that the circle is on the origin in two dimensions, the circle is on the origin in this plane. Repeat this procedure for all diametric corners and, by symmetry, the inner sphere is always centered at the origin. For completeness, because the inner sphere is centered at the origin, the radius must grow along the diagonal. So, we can use our squished quadrant again to calculate the radius, r, of the inner sphere. It is going to be sqrt(2^2 + (2sqrt(D-1)^2)-2 = 2r, where the subtraction is the outer sphere. Some arithmetic gets you to r = sqrt(D)-1 which is of course what they got in the post.
Hopefully this was the correct amount of words and equations that you can reconstruct this on paper. I think doing it this way shows you that the outer spheres get increasingly smaller relative to their containing "quadrant". For me, it also elucidates that the final drawing in the post is very misleading because the hyperspheres don't spike like that. Rather, they look more like 4-leaf clovers and that is what allows it to escape the cube in the additional "horizontal space" of the aforementioned quadrant.
The line goes from the center of the cube to the corner. The central sphere is concentric with the cube. Therefore the center of the central sphere is on the line from the center to the corner. In fact, it the center of that sphere is on any line from the center of the cube to anywhere.
I've got a couple, maybe (depends on your intuition i guess):
In 4d a (topological) sphere can be knotted.
Hyugens's principle: When a wave is created in a field in N-dimensional space, if N is even, it will disturb an ever-expanding region forever (think a pebble hitting a pond's surface) whereas if N is odd the wavefront will propagate forever but leave no disturbances in its wake (think of a flashbulb, or of someone shouting in an infinite space full of air but no solids to echo off of).
Measure a group of humans on N traits and take the individual average of each trait. For surprisingly small N (think 10-ish, but obviously depending on your group size), it's highly likely that no human in your group (or even in existence) falls within 10% of the average in every trait. This is roughly equivalent to the statement that less and less of the volume of an N-sphere is near the center as N increases.
Sometimes called "the flaw of averages". Of course I learned about this from another HN post recently:
Arguably you can do that in 3D, if you accept the horned sphere as a knot. Though I suppose that does raise the question of what you are willing to call a sphere.
Regardless it's an embedding of a sphere that cannot be deformed into a unit sphere so I think the analogy holds.
For example the volume (hypervolume) gets concentrated close to the surface of the sphere when dimension grows. For example, if you have symmetric multidimensional probability distributions around the zero it becomes weird.
True, a huge volume with low density will contain more mass than a small volume with large density. But we can say that it gets “concentrated” far from the origin only in the same sense that Japan’s population is “concentrated” outside of Tokio…
In lower dimensional projections the inner sphere will be so big that it overlaps with the smaller spheres. So much so that it intersects with the enclosing cube too. It will not develop the weird spike protein things like in the illustration in any projection.
There's a key difference between how we perceive and think about two dimensional space and 2+n dimensional space. If you want to seal in one geometric object with other geometric objects like in this example then in 2D it's sufficient to let the enclosing objects touch each other at their widest points, but in higher dimensions they have to touch each other at their narrower points, overlapping into each other in many cases. And in the first example which was the 2D example the outer objects touch each other at their outmost points. In 2D it looks like a full enclosure with no way for the inner circle to get through. But our brains assume that the higher dimension versions will be 100% sealing it off as well, because we saw it in the first example, right?
This is an example of a misleading first example. What actually will happen and what you expect will happen are not the same, because you got tricked by the first example.
and you can see the inner circle is much smaller than the surrounding circles in 2d, the difference is a little less so in 3d? which would continue until the so-called 'inner' circle is friggn _huge_.
I mean, everyone knows that everything is super far apart in higher dimensions, it surprises me that it takes up to 10D before he slips out-- perhaps more intuitive when i keep in mind that n-spheres are the most compact shape?
Vitali Milman apparently drew high-dimensional convex bodies as "spiky" to try to get at this intuition. So the n-dimensional cube in this case would look like a starfish, with the balls inscribed in the subdivided cubes way out in the tentacles. When you draw it this way, of course the middle ball is not contained in the cube (it is hard to reason precisely about this picture, it does not encode an obvious precise analogy).
"This means that as the dimension grows, the central sphere will grow in radius,"
Am I missing something? It to me that only r*D grows as we increase the dimension, not r by itself. Since we don't seem to get r > 2a for any D, I don't really get the conclusion that it's sticking out of the cube
Does anyone have further references to pieces that examine this property? I read the linked paper from Strogatz which showed a similar geometry for the basins of coupled oscillators. Though it was interesting it did not provide more insight.
For the orthoplices, the kissing sphere in the middle pokes through the facets in dimension 12.
I don't know when that happens with the simplices. I assume the middle sphere pokes thru before it does with the hypercubes, since the simplices are pointier.
I think that isn't the case. The simplices are pointier, which means that the "corner spheres" don't go so far into their corners.
If I've done my calculations right, putting n+1 n-spheres in the corners of an n-simplex with unit sides so that they're tangent to one another gives them a radius of 1 / (sqrt(2n(n+1)) + 2), and then if you put a sphere in the middle tangent to all those it has radius [sqrt(2n/(n+1)) - 1] times this.
So for very large n, the "corner spheres" have radius of order 1/n, and the "centre sphere" has radius about sqrt(2)-1 times the radius of the "corner spheres", and both of these -> 0 as n -> oo.
(But! "If I've done my calculations right" is an important condition there. I make a lot of mistakes. If you actually care about the answer then you should check it.)
I understand better this way.
Consider a large circle in the middle in 2-D that exceeds the size of the square . The circles on all four sides will be smaller. In higher dimensions(>9), it means it has to be a similar shape.
I have my doubts that anything changes by adding another dimension, does the distance really change from 2d to 3d?
I'm no good at activley imagining larger dimensions than that tho.
None the less, it's a fun thought excercise! Thanks
nvm - this doesnt look like it cares about distance from center points at all (what I cared about) and instead care's whether the surface area spills from the contained square 4a square at any dimension, opps.
The Mahalanobis distance is a measure of the distance between a point P and a distribution D, introduced by P. C. Mahalanobis in 1936. It is a multi-dimensional generalization of the idea of measuring how many standard deviations away P is from the mean of D. This distance is zero for P at the mean of D and grows as P moves away from the mean along each principal component axis. If each of these axes is re-scaled to have unit variance, then the Mahalanobis distance corresponds to standard Euclidean distance in the transformed space. The Mahalanobis distance is thus unitless, scale-invariant, and takes into account the correlations of the data set.
Mahalanobis distance is just a way of stretching Euclidian space to achieve a certain sort of isotropy (it normalizes an ellipsoid to the unit sphere). It is built on top of Euclidian distance and is not an alternative to it.
Euclidian distance works well in 2D and 3D as special cases. I would say Mahalanobis distance is its generalization (yes, built on top of it), which works better in the multidimensional (multivariate) case.
No. Mahalanobis distance is not an alternative to Euclidian distance because it's not even measuring the same kind of distance. The are incommensurate, both figuratively and literally: Mahalanobis distance is unitless while Euclidian distance is not.
Euclidian distance measures the distance between two points, while Mahalanobis measures the distance between a distribution (canonically multivariate normal) and a point. Mahalanobis distance is not a generalization if Euclidian distance, it's an altogether different concept of distance that doesn't even make sense without talking about a distribution with mean and covariance matrix.
I agree about your larger relevant point but the following that you say is bit of a red herring
> Euclidean distance measures the distance between two points, while Mahalanobis measures the distance between a distribution (canonically multivariate normal) and a point
In a discussion about metric and metric spaces we dont care about those things, its abstracted out and considered irrelevant. All that matters is that we have a set of 'things' and a distance between pairs of such things that satisfies the properties of being a distance (more precisely, properties of being a metric).
@CrazyStat (I cannot respond to your comment so leaving it here)
I think you overlooked
> things that satisfies the properties of being a distance (more precisely, properties of being a metric).
that I wrote. Of course it has to satisfy the properties of being a metric. The red herring, as far as dimensionality is concerned, is the complaint that Mahalanobis is defined over distributions while Euclidean is over points.
The part about MD that you get absolutely right is its nothing but Euclidean distance in a space that has been transformed by a linear transformation. MD (the version with sqrt applied) and ED aren't that different, especially so in the context of dimensionality
@CrazyStat response to second comment.
It indeed isnt, its just Euclidean distance under linear transformation. I was just quoting you, you had said
> while Mahalanobis measures the distance between a distribution
My point was even it is defined for distributions its not really relevant.
> Mahalanobis "distance" is more closely related to a likelihood function than to a true distance function.
That's a subjective claim, and open to personal interpretation. Mathematically MD is indeed a metric (equivalently a distance) and it does show up in the log likelihood function. Mahalanobis was a statistician, but MD is a bonafide distance in any finite dimensional linear space, with possible extensions to infinite dimensional spaces by way of a positive definite kernel function (or equivalently, the covariance function of a Gaussian process)
A function that measures the distance between two different classes of 'things' (distribution and point, in this case) is necessarily not a distance metric. It trivially fails to satisfy the triangle inequality, because at least one of d(x,y), d(x,z), d(y,z) will be undefined--no matter how you choose x, y, z you'll end up either trying to measure the distance between two points or the distance between two distributions, neither of which can be handled.
This is not a red herring, it's a fundamental issue.
MD isn't defined over distributions, though. There are perfectly good distance metrics defined over distributions, but MD isn't one of them. It's a "distance" between one distribution and one point, not between two distributions or two points.
Mahalanobis "distance" is more closely related to a likelihood function than to a true distance function.
Mahalanobis distance isn't that different from euclidean distance at all as far as effects of dimensions is concerned it just applies a stretch, rotation or more accurately a linear transformation to the space.
In short, much that I love Mahalanobis distances' many properties it does zilch for dimensionality.
Oh you are mixing Physics and Maths. You are asking whether the space we live in has many dimensions, this article about is about the mathematics of spaces that does have many dimensions. One can use the mathematics of such spaces to, for example, find stored images nearest to a query image, nearest document to a query document and so on.
Higher dimensional geometry can show up in lower dimensional problems. This numberphile video (https://www.youtube.com/watch?v=6_yU9eJ0NxA) involves a puzzle about throwing darts at a dart board which is solved by using the volumes of 4+ dimensional spheres.
doesn't 4th just include time with a 3d object.
Would things like waves/pulses fall under that?
5th seems to be used in the Kaluza-Klein theory[0] for gravitation and electromagnetism.
The spikiness of n-cubes is apparent when you look at the (solid) angle at each vertex; it starts constant (1/2 pi radian in 2D, 1/2 pi steradian in 3D) but reduces thereafter at an increasing rate (1/8 pi^2, 1/12 pi^2, 1/64 pi^3, etc.).