layer8 a year ago

This reminds me of the time I wrote a class for representing mutable arrays of any dimension, where you could add/remove dimensions at runtime on those array objects. It confused me for a while that when removing the last dimension, the now 0-dimensional array would always contain one cell (because x^0 = 1), so be a singular value, whereas for an n-dimensional array with n > 0 I could set one of the dimensions to length 0, resulting in no values. But with 0 dimensions, you couldn’t get to no values, it was always 1 value.

The final insight was that setting the length of a dimension to 1 basically removes that dimension (if you ignore the change in element indexing), so setting the length to zero doesn’t really makes sense. In the context of shapes in continuous space, the analogon of setting the dimension to one is setting it to zero: if you set the length of a rectangle to zero, you get a line, and you can’t reduce the dimension to below zero, because it has already vanished. In the array case, setting it to below 1 (so to 0) removes all elements, so arguably there is no array anymore, and shouldn’t be a mutation allowed within an array.

  • _kulang a year ago

    This is why I dislike NumPy, sizes (100,) and (100,1) are different.

    I understand conceptually representing it as a “slice” but this is in contrast to something like MATLAB where slicing a 100x100 for a column gives you (sensibly) a 100x1 array

    • layer8 a year ago

      One difficulty is, if (100,) and (100,1) are the same, then (100,1) and (1,100) arguably are also the same, as well as (1,100,1), etc. (They all have the same shape, a “stick” of size 100.) You could disallow dimensions of size 1, but then why disallow (100,1) and (1,100) being different if (2,100) and (100,2) are allowed and different?

      One way to see it is that you always have infinitely many dimensions, almost all of which have size 1, and you just choose which index positions you use for those that are not size 1. Hence (100,) is really (100,1,1,1,1,1,…), and so is (100,1), while (1,100) is really (1,100,1,1,1,1,…), same as (1,100,1), but different from (1,1,100), and so on. But it’s not entirely intuitive, because (1,100) and (100,1) have still the same shape. It’s just that, as soon as you have two non-singular dimensions, there’s the incidental necessity that you have to choose a defined order for the dimensions somehow, because [1,2] is a different element from [2,1].

      The problem arguably falls away if the dimensions are named instead of numbered.

sdwr a year ago

The triangle numbers sold me. Just have to come up with a use for it, uh, discover the intrinsic beauty of the universe.

Looking at degrees of freedom doesnt really help. A point is picked on a line by constraining it along 1 dimension, and a line on a plane can be picked the same way. So a -1D object should be pickable in a point by constraining on 1 dimension. But a point doesn't have any dimensions.

Maybe take a cue from imaginary numbers? i is orthogonal to the regular number line. Can't go beyond -1D though, to keep the triangle numbers intact.

Is it some kind of identity operation or metadata? Based on the table, every dimensional object has one -1D nega-line.

If it's a line, it could plausibly be time (thanks, Einstein!). Some kind of update history/version control.

What happens when you combine dimensional objects? A 0D point and another 0D point defines either a point (if theyre the same) or a 1D line. Even if you define the points in higher dimensional space, they simplify to a line.

A point combined with a line, either the point is on the line, along the line segment, or creates a 2D plane.

Line and a line can define up to a 3D space.

The table for that is:

___-1D__| 0D | 1D | 2D

-1D

0D_____| 1D | 2D | 3D

1D_____| 2D | 3D |

2D_____| 3D |

Does this mean a line + plane can be used to stake out a 4D hyperplane?

Filling it in for -1D, adding a -1D object to anything doesn't change its dimensionality.

And each object only has one -1D component (from the OG triangle table).

So far nothing against the -1D being a history of the object on a universal timeline. That works when combining objects too - a point with its own -1D history combined with a line with its -1D history makes a new line or plane with a -1D shared history.

But looking at it from the perspective of information theory + minimal encodings is probably going to ** all that up.

A line is easily definable, with just a length, or with 2 points in a 2D space etc. But it can hold an infinity of points that take infinite storage space to keep track of.

peter_d_sherman a year ago

Wow!

Brilliant, Excelsior! ("Ever Upward!")

Roly Drower / Hugh Duncan -- is onto something big mathematically here!

I have never, repeat, never -- seen Pascal's Triangle mapped to attributes of various geometric shapes in different dimensions -- but what I'm (now!) seeing is absolutely amazing!

There is definitely a (previously!) hidden, beautiful mathematical correspondence there!

This article has to be in my favorite Top 10 math articles of all time!

Thank you, JNRowe, for submitting this excellent article to Hacker News!

jtsiskin a year ago

This dimension is just called “existence”

  • layer8 a year ago

    It’s the empty property, constant-true.

thomassmith65 a year ago

It would sound less surprising if we had chosen a different naming convention for dimensions. Then we'd refer to "Dimension -1" as "Dimension 0". It's not like the math would change.