In
geometry
Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
, a hypercube is an
''n''-dimensional analogue of a
square
In geometry, a square is a regular polygon, regular quadrilateral. It has four straight sides of equal length and four equal angles. Squares are special cases of rectangles, which have four equal angles, and of rhombuses, which have four equal si ...
(
) and a
cube
A cube or regular hexahedron is a three-dimensional space, three-dimensional solid object in geometry, which is bounded by six congruent square (geometry), square faces, a type of polyhedron. It has twelve congruent edges and eight vertices. It i ...
(
); the special case for
is known as a ''
tesseract
In geometry, a tesseract or 4-cube is a four-dimensional hypercube, analogous to a two-dimensional square and a three-dimensional cube. Just as the perimeter of the square consists of four edges and the surface of the cube consists of six ...
''. It is a
closed,
compact,
convex figure whose 1-
skeleton consists of groups of opposite
parallel line segment
In geometry, a line segment is a part of a line (mathematics), straight line that is bounded by two distinct endpoints (its extreme points), and contains every Point (geometry), point on the line that is between its endpoints. It is a special c ...
s aligned in each of the space's
dimension
In physics and mathematics, the dimension of a mathematical space (or object) is informally defined as the minimum number of coordinates needed to specify any point within it. Thus, a line has a dimension of one (1D) because only one coo ...
s,
perpendicular
In geometry, two geometric objects are perpendicular if they intersect at right angles, i.e. at an angle of 90 degrees or π/2 radians. The condition of perpendicularity may be represented graphically using the '' perpendicular symbol'', � ...
to each other and of the same length. A unit hypercube's longest diagonal in ''n'' dimensions is equal to
.
An ''n''-dimensional hypercube is more commonly referred to as an ''n''-cube or sometimes as an ''n''-dimensional cube. The term measure polytope (originally from Elte, 1912) is also used, notably in the work of
H. S. M. Coxeter who also labels the hypercubes the γ
n polytopes.
The hypercube is the special case of a
hyperrectangle (also called an ''n-orthotope'').
A ''unit hypercube'' is a hypercube whose side has length one
unit. Often, the hypercube whose corners (or ''vertices'') are the 2
''n'' points in R
''n'' with each coordinate equal to 0 or 1 is called ''the'' unit hypercube.
Construction
By the number of dimensions
A hypercube can be defined by increasing the numbers of dimensions of a shape:
:0 – A point is a hypercube of dimension zero.
:1 – If one moves this point one unit length, it will sweep out a line segment, which is a unit hypercube of dimension one.
:2 – If one moves this line segment its length in a
perpendicular
In geometry, two geometric objects are perpendicular if they intersect at right angles, i.e. at an angle of 90 degrees or π/2 radians. The condition of perpendicularity may be represented graphically using the '' perpendicular symbol'', � ...
direction from itself; it sweeps out a 2-dimensional square.
:3 – If one moves the square one unit length in the direction perpendicular to the plane it lies on, it will generate a 3-dimensional cube.
:4 – If one moves the cube one unit length into the fourth dimension, it generates a 4-dimensional unit hypercube (a unit
tesseract
In geometry, a tesseract or 4-cube is a four-dimensional hypercube, analogous to a two-dimensional square and a three-dimensional cube. Just as the perimeter of the square consists of four edges and the surface of the cube consists of six ...
).
This can be generalized to any number of dimensions. This process of sweeping out volumes can be formalized mathematically as a
Minkowski sum: the ''d''-dimensional hypercube is the Minkowski sum of ''d'' mutually perpendicular unit-length line segments, and is therefore an example of a
zonotope.
The 1-
skeleton of a hypercube is a
hypercube graph
In graph theory, the hypercube graph is the graph formed from the vertices and edges of an -dimensional hypercube. For instance, the cubical graph, cube graph is the graph formed by the 8 vertices and 12 edges of a three-dimensional cube.
has ...
.
Vertex coordinates

A unit hypercube of dimension
is the
convex hull of all the
points whose
Cartesian coordinates are each equal to either
or
. These points are its
vertices. The hypercube with these coordinates is also the
cartesian product
In mathematics, specifically set theory, the Cartesian product of two sets and , denoted , is the set of all ordered pairs where is an element of and is an element of . In terms of set-builder notation, that is
A\times B = \.
A table c ...
of
copies of the unit
interval