Four years ago I started pondering the tesseract and four-dimensional space. I first learned about them back in grade school in a science fiction short story I’d read. (A large fraction of my very early science education came from SF books.)
Greg Egan touched on tesseracts in his novel Diaspora, which got me thinking about them and inspired the post Hunting Tesseracti. That led to a general exploration of multi-dimensional spaces and rotation within those spaces, but I continued to focus on trying to truly understand the tesseract.
Today we’re going to visit the 4D space inside a tesseract.
If you’re not already familiar with them, that first post, Hunting Tesseracti, is required reading. It explains the progression of “square” shapes, from the square to the cube to the tesseract. This post assumes that knowledge.
It might also be helpful to also read my post, The 4th Dimension, which is mainly about rotation, but which does have more about tesseracts (the actual boring plural form, but I like tesseracti — makes me think of cacti, and I always loved the desert).
As a quick review, a tesseract is the 4D extension of a cube, which is the 3D extension of square (which is the 2D extension of a line segment). The basic concept of a square shape can be extended to any number of dimensions, but 4D is hard enough to think about. Beyond that it’s just math.
But with a little effort, it’s possible to (almost) visualize the fourth dimension.
The motivation for this post came from a comment conversation quite a few months ago. I don’t recall the rest of the conversation, but for whatever reason the notion of the inside of a tesseract came up, and that got me thinking about it.
What is the inside of a tesseract; how is it defined? More to the point, what constitutes the “walls” of a tesseract; how is it bounded?
The progression of line to square to cube to tesseract helps understand the shape of the tesseract (which is explained in that first post). That same progression turns out to also be the key to understanding its 4D innards.
Therefore we begin with a one-dimensional space, a line:
The very meaning of a one-dimensional space is that it takes just one number to exactly specify a location. If we arbitrarily designate a given location as 0.0 (the origin) then all other locations along the line are just some distance plus or minus from that origin.
This implies a metric — something that tells us how far +1 (or -1) is from the origin. In geometry, that metric is entirely arbitrary and abstract. We simply declare that this far is one step, a distance of 1.0.
That gives us a ruler that defines distances of +4.00 or -2.73 or whatever. Here we’ll be concerned only with distances from 0.0 to 1.0, but that can be scaled or shifted as desired.
Canonically, we call this single number X, and we call the line the X-axis.
In one dimension, there is only one kind of “shape” possible (if it even deserves the name), a line segment:
The notion of a shape involves a boundary, which I’ll call walls, and an interior, the inside of the shape. Therefore, a shape bounds a portion of the space. Here, a line segment bounds a portion of the line.
In one dimension, the walls of a shape are zero-dimensional points. This is a fundamental rule: The walls of a shape always have one less dimension than the space.
The inside of the shape is the list of points between (but not including) those delimiting points. The inside and the walls are separate. The walls are never part of the inside.
We can mathematically specify the walls and inside:
- Walls:  and 
- Inside: (, )
This requires a bit of explanation:
Defining parts of a geometric space requires specifying the coordinates of that space. A single location in a space requires a coordinate containing as many numbers as the space has dimensions. In this case, the space has one dimension, so only a single number is necessary for a coordinate.
Defining a bounded portion of a space requires a range of coordinates. (This will make more sense as we get into the higher dimensions.)
In this post, I’ll use square brackets to identify a coordinate, and I’ll use parentheses to identify a range. So the above definition of the line segment includes two coordinates specifying the walls and a range of coordinates specifying the inside.
There is a math notation in which (0.0, 1.0) means all the points between, but not including, 0.0 and 1.0, and in which [0.0, 1.0] means all the points including the end points. If we meant all the points including 0.0 and up to, but not including 1.0, we’d write [0.0, 1.0).
Because the inside of a shape does not include the walls, the parenthetical notation is exactly right here. The square brackets in this case simply identify a coordinate. (Again, this will make more sense as we continue.)
The one-dimensional line is so… one-dimensional. It has only the one shape, and that shape has no notion of “squareness” (i.e. of right angles) — we need at least two dimensions for angles of any kind.
We can add an orthogonal axis, the Y-axis, to give us a second dimension, and now our coordinates require two numbers, X and Y.
In two dimensions the “square shape” is the square itself:
Now the walls are one-dimensional line segments (walls have one less dimension, remember), and the inside is a region of [x, y] coordinates.
Astute readers might wonder about the corners of the square. Above, a line segment did not include the end points, so it seems the corners shouldn’t be included. And if we did, adjoining lines seem to share a corner point, which seems confusing.
Indeed, the corners are not included in the line specification but are specified separately. (If you look at the table in the Hunting Tesseracti post, you’ll notice a square is defined as: 1 square, 4 lines, and 4 points.)
So we define the square as:
- Walls: [0,0], [0,1], [1,0], [1,1] (corner points)
- …and ([0,0], [1,0]) (left line)
- …and ([0,0], [0,1]) (bottom line)
- …and ([0,1], [1,1]) (top line)
- …and ([1,0], [1,1]) (right line)
- Inside: ([0,0], [1,1]) (square interior)
Which is a lot to take in, I know. Math is like that.
What it amounts to is that, if we imagine being inside the square, then our coordinate is some [x, y] where both x and y are between zero and one.
We’re free to change that coordinate — to move around inside the square — so long as we never coincide with a wall. Our x and y coordinates can never be 0.0 or 1.0, only between them (and obviously, never below or above).
And, no, we’re not free to “jump over” walls. Doing so requires, at least momentarily, that our coordinates match the coordinates of some wall, and that is forbidden.
Now we add a third dimension, the Z-axis, which means we need three coordinates to specify a location (X, Y, and Z).
The square shape in 3D is a cube:
The obvious walls are the two-dimensional squares that bound the cube. Those squares don’t include their bounding lines, and those bounding lines don’t include the corner points.
So specifying a cube involves the single interior cube, 6 square faces, 12 bounding lines, and 8 corner points. To save space, I’ll only show you one of each:
- Wall: [0,0,0], etc. (corner points)
- …and ([0,0,0], [1,0,0]), etc. (edge lines)
- …and ([0,0,0], [1,1,0]), etc. (square faces)
- Inside: ([0,0,0], [1,1,1]) (cubic interior)
What you might notice is that points are a single coordinate, lines are ranges where one coordinate changes ([0,0,0], [1,0,0]), squares are ranges where two coordinates change ([0,0,0], [1,1,0]), and cubes are ranges where all three coordinates change ([0,0,0], [1,1,1]).
You can apply this to derive the other specifications. I’ll leave listing the other 5 squares, 11 edge lines, and 7 corner points as an exercise for the seriously bored reader.
Before we jump to tesserati, let’s take a closer look at the notion of the interior of these shapes, because that’s what we’re all about here.
Inside the cube, our location is some [x, y, z] where x, y, and z, are some number between 0.0 and 1.0. The various walls prohibit those values and any below zero or greater than one.
Say we’re in the dead center of the cube. Our coordinate is [0.5, 0.5, 0.5], and we can move around the interior by varying those numbers (so long as we don’t intersect any walls).
Moving very close to corner containing the origin, our location might be something like [0.01, 0.01, 0.01], or smaller numbers so long as they’re greater than zero. Moving to the opposite corner might give us a location like [0.99, 0.99, 0.99]. The other corners would be some mix of those numbers.
Given the progression, moving to four dimensions is mathematically trivial. It’s just more of what we’ve done already. The trick is trying to visualize it.
In 4D we add yet another axis, the W-axis, but in our 3D world there is nowhere for this axis to go. It’s not possible to have an axis at right angles to the three we’ve established.
Mathematically, all we’ve done is add a fourth number, W to our location. In our 3D world, everything has the same W coordinate — it never changes. (We never move along that extra red axis in the image above. We can’t even really imagine it.)
Unlike the other square shapes, the canonical rendering of a tesseract doesn’t indicate any interior at all — it’s essentially all walls. (Which is what got me wondering about the inside of a tesseract in the first place.)
The canonical tesseract rendering (see image at top) shows the inner cube as smaller than the outer cube, but it’s actually the same size (see Hunting Tesseracti). It’s essentially a perspective effect where the W-axis translates to size.
In comparison, consider two different ways to draw a cube:
On the left, a forced perspective isometric view. On the right, a front view with forced perspective. In both cases the rear wall of the cube is smaller than the front wall, although the reality is both are the same size.
Note also how the side walls are distorted in both, although they are also squares the same size as the front. Likewise the “side” cubes of the tesseract are distorted in the rendering.
If we unfold a 3D cube, the inside vanishes and we’re left with just the walls:
The curvy gray lines indicate the shared edge lines.
In similar fashion, we can unfold a tesseract into (what I call) a tesscross:
In which case the inside vanishes and we’re left with just the 8 cubes (and 24 squares, 32 lines, and 16 points) that comprise the tesseract walls. (The two gray cubes are the inner and outer cubes.)
So where is the inside of a tesseract?
Let’s go back to being inside the 3D cube in the center. In all six possible directions (±x, ±y, ±z) there is a bounding 2D square (with 1D edges which have 0D points).
We can’t escape the cube by moving in, say, the +x direction, because there’s a wall at x=1.0, and because that wall is the square, ([1,0,0], [1,1,1]), it blocks movement no matter what our y or z coordinate is.
To go around it we’d have to change our y or z coordinate to less than zero or more than one, which we can’t do for the same reason we can’t change our x coordinate to greater than one — walls block the way.
Now imagine being inside the center of a tesseract. It’s a four dimensional space, so our location is [½, ½, ½, ½], and we have eight directions we can look: (±x, ±y, ±z, ±w).
What we see are eight cube walls — remember walls have one less dimension. The cube had squares; the tesseract has cubes.
If we move in the +x direction, at x=1.0, we’ll hit the cube ([1,0,0,0], [1,1,1,1]), and that cube blocks movement in the +x direction no matter what our y, z, or w, coordinates are (because that cube blocks them all).
A similar situation exists in the other seven directions. We can shift around inside the 4D space of the tesseract, but some cube always blocks our escape.
We can make a door in one of the cube walls by carving out a 3D part of cube.
To put a door in that +x cube, let’s cut out a cubical corner. Say we cut out the cube ([1,0,0,0], [1, 0.2, 0.2, 0.2]). That would be a small corner section of that wall cube.
If we move next to the wall in the right location, [0.99, 0.1, 0.1, 0.1] we find we’re no longer blocked by the wall. We can move to [1.0, 0.1, 0.1, 0.1] because that space on the X-axis is empty now.
And from there we can move to [1.1, 0.1, 0.1, 0.1] which takes us outside the tesseract.
And with that, this post breaks 2000 words (and then some). It’s tempting to break this into more digestible pieces, but given what little interest my math posts usually get, I’ll let it stand for now.
If anyone is into it and has questions, the comment section awaits.
Stay multi-dimensional, my friends!