I have found interesting problem in Gilbert's Strang book, ,,Introduction to Linear Algebra'' (3rd edition):

How many corners does a cube have in 4 dimensions? How many faces? How many edges? A typical corner is $(0,0,1,0)$

I have found the answer for corners:

We know, that corner is $(x_1,x_2,x_3,x_4)$. For every $x_i$ we can use either $1$ or $0$. We can do this in $2 \cdot 2 \cdot 2 \cdot 2 = 2^4 = 16$ ways.

The same method can be used for general problem of cube in $n$ dimensions (I suppose):

Let's say, we have $n$-dimensional cube (I assume, that length of edge is $1$, but it can be some $a$, where $a \in \mathbb{R}$ [1]). Here, corner of this cube looks like this: $(x_1,x_2, \ldots , x_n)$. For every $x_i$ there are $2$ possibilities: $x_i = 0$ or $x_i = 1$ ($x_i = a$ in general). So, this cube has $2^n$ corners.

It was pretty simple, I think. But now, there are also faces and edges. To be honest, I do not know, how to find the answer in this cases.

I know, that solution for this problem is:

A four-dimensional cube has $2^4 = 16$ corners and $2 \cdot 4 = 8$ three-dimensional sides and $24$ two-dimensional faces and $32$ on-dimensional edges.

Could You somehow explain me, how to figure out this solution? I have found solution for corners by myself, using Linear Algebra methods & language. Could You show me, how to find the number of edges and faces, using Linear Algebra methods?

Is there other method to find these numbers? (I suppose, that answer for this question is positive)

I am also interested in articles/textbooks/etc. about space dimensions, if You know some interesting positions about that, share with me (and community).

As I wrote: I am interested in mathematical explanations (in particular using Linear Algebra methods/language but other methods may be also interesting) and some intuitions (how to find solution using imagination etc. [2]).

Thank You for help.

[1] I am not sure of this assumption, because:

(a) I am not sure, how edges (and faces) behave in $n$ dimensions

(b) I am not sure, how should I think about the distance in $n$ dimensions. I mean, I know, that my intuition may play tricks here

[2] I am not asking, how to imagine $4$ dimensional cube, but I think, that there is a way to find the solution, using reasoning, not only Linear Algebra.


My definition of face (there was a comment about that) is the same as definition here: http://en.wikipedia.org/wiki/Face_(geometry), especially:

In geometry, a face of a polyhedron is any of the polygons that make up its boundaries.

  • $\begingroup$ You are right that cubes have the same shape (number of faces) regardless of the side length. The usual distance is $\sqrt{(x_1-y_1)^2+(x_2-y_2)^2 \ldots +(x_n-y_n)^2}$ The article that Joseph Malkevitch cites is a good combinatorial approach. $\endgroup$ Commented Jan 6, 2011 at 3:10
  • $\begingroup$ @Ross Millikan: I know, that using this formula I can find length in $n$ dimensions. But I can't figure out, how to imagine this, like 1,2,3 dimensions... $\endgroup$
    – exTyn
    Commented Jan 6, 2011 at 15:30
  • $\begingroup$ Gilbert Strang has his lectures on line for free at: ocw.mit.edu/courses/mathematics/… $\endgroup$
    – Tpofofn
    Commented Jan 7, 2011 at 3:26

4 Answers 4


To calculate the number of edges: as you say there are $2^n$ corners. Each one is connected to n other corners. Adding all of these up counts each edge twice, so there are $2^{n-1}n$ edges, which equals $32$ for $n=4$. Another way to count edges is to define $E(n)$ as the number of edges in $n$ dimensions. If you think of the $n+1$ dimensional cube as connecting the corresponding corners of two $n$ dimensional cubes, the recurrence is $E(n+1)=2E(n)+2^n$

Square faces are made by starting with a square in the one of the two $n$ cubes plus the translation of the edges of the $n$ cube in the new dimension. So $S(n+1)=2S(n)+E(n)$.

$3$-cube faces are made by starting with a $3$-cube in one of the two n-cubes plus translation of the squares in the new dimension. So $C(n+1)=2C(n)+S(n)$.

  • 5
    $\begingroup$ An expository article about how to think about n-cubes from a combinatorial point of view can be found here: york.cuny.edu/~malk/tidbits/n-cube-tidbit.html $\endgroup$ Commented Jan 5, 2011 at 1:23
  • $\begingroup$ @Joseph: Thanks. It shows that the recurrence will be the same for all dimensions of boundary: points, lines, squares, etc. $\endgroup$ Commented Jan 5, 2011 at 3:36

As you mentioned, a vertex (or a 0-face) is just a choice of string $(x_1,\ldots, x_n)$, where $x_i\in \{0,1\}$. If you think back to dimensions 2 or 3 (or even 1!), you'll see that an edge (i.e., a 1-face) is determined by two vertices which differ in a single slot. So e.g. on the unit square, the left edge goes between $(0,0)$ and $(0,1)$ -- we may name this edge more succinctly as $(0,*)$. This method generalizes, too: the bottom square (2-face) of the 3-cube is $(*,*,0)$, etc. Note that the $n$-cube will have $k$-faces for $0\leq k\leq n$. See if you can find a formula for how many there are!

This isn't exactly linear algebra, it's more like combinatorics. Also, this problem is actually a decent introduction to the idea of higher dimensions, if you try to visualize things in 4 dimensions. Search the internet for some representations of 4-cubes, and try to understand why they look the way they do.


This is the 27th problem in Exercises 1.1 of the book, Introduction to Linear Algebra, Gilbert Strang. I hope my answer will be helpful for future readers.

Question 1: How many corners does a cube have in 4 dimensions?

Solution: A corner of a cube in $N$ dimenison(s) can be written as $(x_1, x_2, \cdots, x_N)$ and for each $x$, the choice is either $1$ or $0$. Then the number of corners equal to $2^N$. Therefore, the number of corners in 4 dimesions is $16$.

Question 2: How many edges does a cube have in 4 dimensions?


Notice that there are two useful invariants.

  • Each edge is shared by exactly $2$ corners.
  • Each corner is connected to $N$ corners.

Then the number of edges of a cube in $N$ dimensions is $2^N \cdot N \cdot \frac{1}{2} = 2^{N-1}\cdot N$. Therefore, the number of edges is $2^{4-1} \cdot 4 = 32$.

Question 3: How many 3D faces does a cube have in 4 dimensions?

Solution: Let's first consider the question, "How man 2D faces does a cube have in 3 dimensions?" This answer is $3 * 2 = 6$. $3$ means 3 dimensions and $2$ means positive and negative directions.

Now, by a similar reasoning, the number of 3D faces is $4*2=8$.

Question 4: How many 2D faces does a cube have in 4 dimensions?


Notice that there are two useful invariants.

  • Starting from a corner, the number of faces between edges is $C_{N}^{2}$.
  • Each face is shared by $4$ corners.

Then the numebr of 2D faces of a cube in $N$ dimensions is $C_{N}^{2} \cdot 2^{N} \cdot \frac{1}{4} = C_{N}^{2} \cdot 2^{N-2}$. Therefore, the number of 2d faces of a cube in 4 dimensions is $6*16/4=24$.


First you need to be clear about what you mean by face, edge, vertex, etc. In my view if we have an $n$ dimensional cube, then $n-1$ dimensional cubes form its faces, and $n-2$ dimensional cubes form its edges. Vertices as you define above are 0-D points. We do not have names for $n-3$, $n-4$ dimensional boundaries so I will not attempt to name them here.

If you are looking for an intuitive way to build up the relations you can define inductive relationships using the method of extrusion. You can start with $n=1$ if you like. In this case we have one 1-D cube (i.e. a segment) with two 0-D faces (i.e. points). So

$$C_1 = 1$$ $$F_1 = 2$$ $$E_1 = 0$$ $$V_1 = 2$$

Where $C_1$ is the number of cubes in 1-D space, $F_1$ is the number of faces, $E_1$ is the number of edges (not defined here), and $V_1$ is the number of vertices.

We create a 2-D cube (i.e. a square) by extruding this 1-D cube in a direction orthogonal all current dimensions. By doing this two things happen:

1) Every object is copied maintaining its current dimensions. We had one segment, now we have two, we had two vertices, we now have four.

2) Every object extruded into the new direction creates one object of one more dimension. The 1-D segment is extruded over a second dimension to form a square (i.e. 2-D object). The vertices (0-D) are extruded to become lines.

So the number of cubes, faces, edges, vertices becomes

$$C_2 = 1$$ $$F_2 = 2C_1 + E_1 = 4$$ $$V_2 = 2V_1 = 4$$ $$E_2 = V_2$$

Repeat the process for a 3-D cube. Again we have two sources for new objects, copying and extrusion.

$$C_3 = 1$$ $$F_3 = 2C_2 + E_2 = 6$$ $$E_3 = 2F_2 + V_2 = 12$$ $$V_3 = 2V_2$$

Continue the process to get to higher dimensions.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .