Hypercube (n-dimensional cube)
An n-dimensional generalization of a square and cube: convex polytope with 2^n vertices, produced as a Cartesian product of intervals. Describes structure, counts of faces, history, and applications.
The hypercube, often called the n-cube, is the standard n-dimensional extension of a square (n=2) and a cube (n=3). It is a compact, convex polytope whose edges are arranged in n mutually perpendicular directions of equal length. A familiar model is the unit hypercube, the set of all n-tuples with each coordinate between 0 and 1; its vertices are the 2^n points whose coordinates are either 0 or 1. For background and basic definitions see geometry references.
Image gallery
3 ImagesStructure and combinatorial properties
Key combinatorial facts about the n-cube are simple and widely used. The number of vertices, edges and higher-dimensional faces follow explicit formulas. Important counts include:
- Vertices: 2^n.
- Edges: n·2^{n-1}.
- k-dimensional faces: there are C(n,k)·2^{n-k} faces of dimension k, where C(n,k) is the binomial coefficient.
These relationships reflect the hypercube's product structure: it is the Cartesian product of n unit intervals. Its symmetry group contains all coordinate permutations and sign changes, and it is centrally important in the study of regular and semi-regular polytopes; see related material on the cube family.
Geometric measurements and duality
For a unit hypercube (edge length 1) the longest diagonal has length sqrt(n). More generally, scaling the edge length scales all linear measures proportionally. The convex hull description (vertices with coordinates 0 or 1) and the product description ([0,1]^n) are equivalent and useful in different contexts. The dual polytope of the n-cube is the cross-polytope (also called the orthoplex), which interchanges vertices and facets in the polar operation.
Names, history and notation
The term "hypercube" or "n-cube" is standard; historically other names such as "measure polytope" appeared in older literature. The four-dimensional case is commonly called the tesseract. The hypercube appears in classical studies of higher-dimensional geometry and in influential works by geometers exploring regular polytopes and Coxeter groups; see further discussion at historical notes and Coxeter-type references.
Applications, examples and visualization
Hypercubes are more than theoretical curiosities. They play roles in computer science (hypercube network topologies and parallel algorithms), combinatorics (Boolean lattices and cube graphs), optimization (box constraints represented as hypercubes), and probability or statistics (uniform distributions on [0,1]^n). Visualizing or projecting a hypercube into two or three dimensions often uses Schlegel diagrams or orthogonal projections; these representations help convey adjacency and facet structure but necessarily lose some spatial intuition. For software tools and further examples see practical resources.
Regular cube construction
Regular cubes of edge length can be generated as follows:

- If a point is
moved in a straight line by the distance a , the result is a one-dimensional line, mathematically a one-dimensional hypercube.
- If this distance is
shifted perpendicular to its dimension by the distance , the result is a two-dimensional square, a surface, mathematically a two-dimensional hypercube.
- If this square is
shifted perpendicular to its two dimensions by the distance , the result is a three-dimensional cube, mathematically equivalent to a three-dimensional hypercube.
- General: Thus, if an
-dimensional cube is
shifted perpendicular to its dimensions
by distance , a
-dimensional hypercube is formed.
Boundary Elements
In a hypercube of dimension there are exactly
edges at each vertex. Accordingly, a hypercube is an undirected multigraph (see also: graph theory).
The -dimensional cube is bounded by zero-dimensional, one-dimensional, ...,
-dimensional elements. By example:
The 3-dimensional cube is bounded by nodes (points), edges (lines) and faces, i.e. by elements of the dimensions 0,1 and 2.
The number of individual boundary elements can be derived from the following consideration: Let be given a hypercube of dimension The
-dimensional boundary elements of this cube (
) can be generated from the boundary elements of an
-dimensional hypercube as follows: the
-dimensional boundary elements (
) double and all
dimensional elements
are expanded to
-dimensional ones. Thus, the sum gives a number of
.
Example
- The 2-dimensional hypercube is bounded by 1 face
, 4 edges
and 4 nodes
.
- The 3-dimensional cube is bounded by
faces
, bounded by
edges
and
Nodes
.
Another way to think about it is: If one places an -dimensional hypercube in a Cartesian coordinate system centered about the origin and aligned along the coordinate axes, there are to a
-dimensional boundary element there are
coordinate axes that are parallel to that boundary element. On the other hand, for each choice of
coordinate axes, there is not only one
-dimensional boundary element, but
because by each of the
axes perpendicular to the boundary elements, one doubles the number of boundary elements (there are the same boundary elements again parallel-shifted on the other side of the axis). Thus, the number of boundary elements is the product of the number of ways
axes to select from the
axes with the number of boundary elements for each selection, and is thus
(with the binomial coefficient
).
|
| Schläfli symbol | Number of boundary elements | ||||||||||||||
| 0-dim. | 1-dim. | 2-dim. | 3-dim. | 4-dim. | |
|
| |||||||||
| Item | | 1 | ||||||||||||||
| Route | | 2 | 1 | |||||||||||||
| Square | | 4 | 4 | 1 | ||||||||||||
| 3-dim. cube | | 8 | 12 | 6 | 1 | |||||||||||
| 4-dim. cube | | 16 | 32 | 24 | 8 | 1 | ||||||||||
| | ||||||||||||||||
|
| | | | | | | | | | |||||||
Each -dimensional boundary element of an
-dimensional cube of edge length
is, for
, a
-dimensional cube of the same edge length
. Thus a 4-hypercube has 16 vertices, an edge mesh of length
, is bounded by a surface mesh of total area
and by cells with total 3 volume (the 3-dimensional hypersurface) of
and has a 4 volume of
.
Questions and answers
Q: What is a hypercube?
A: A hypercube is an n-dimensional analogue of a square (n = 2) and a cube (n = 3). It is a closed, compact, convex figure whose 1-skeleton consists of groups of opposite parallel line segments aligned in each of the space's dimensions, perpendicular to each other and of the same length.
Q: What is the longest diagonal in an n-dimensional hypercube?
A: The longest diagonal in an n-dimensional hypercube is equal to n {\displaystyle {\sqrt {n}}}.
Q: Is there another term for an n-dimensional hypercube?
A: An n-dimensional hypercube is also called an n-cube or an n-dimensional cube. The term "measure polytope" was also used but it has now been superseded.
Q: What does "unit hypercube" mean?
A: A unit hypercube is a hypercube whose side has length one unit. Often, the unit hypercube refers to the specific case where all corners have coordinates equal to 0 or 1.
Q: How can we define a "hyperrectangle"?
A: A hyperrectangle (also called an n-orthotope) is defined as the general case of a hypercube.
Related articles
Author
AlegsaOnline.com Hypercube (n-dimensional cube) Leandro Alegsa
URL: https://en.alegsaonline.com/art/46157
Sources
- amazon.com : The Semiregular Polytopes of the Hyperspaces


