When the dimension of the lattice rises to four or more, rotations need no longer be planar; the 2D proof is inadequate. However, restrictions still apply, though more symmetries are permissible. For example, the hypercubic lattice has an eightfold rotational symmetry, corresponding to an eightfold rotational symmetry of the hypercube. This is of interest, not just for mathematics, but for the physics of quasicrystals under the cut-and-project theory. In this view, a 3D quasicrystal with 8-fold rotation symmetry might be described as the projection of a slab cut from a 4D lattice.
The following 4D rotation matrix is the aforementioned eightfold symmetry of the hypercube (and the cross-polytope):
Transforming this matrix to the new coordinates given by 
: will produce:
This third matrix then corresponds to a rotation both by 45° (in the first two dimensions) and by 135° (in the last two). Projecting a slab of hypercubes along the first two dimensions of the new coordinates produces an Ammann–Beenker tiling (another such tiling is produced by projecting along the last two dimensions), which therefore also has 8-fold rotational symmetry on average.
The A4 lattice and F4 lattice have order 10 and order 12 rotational symmetries, respectively.
To state the restriction for all dimensions, it is convenient to shift attention away from rotations alone and concentrate on the integer matrices . We say that a matrix A has order k when its k-th power (but no lower), A, equals the identity. Thus a 6-fold rotation matrix in the equilateral triangle basis is an integer matrix with order 6. Let Ord denote the set of integers that can be the order of an N×N integer matrix. For example, Ord = {1, 2, 3, 4, 6}. We wish to state an explicit formula for Ord.
Define a function ψ based on Eulers totient function φ; it will map positive integers to non-negative integers. For an odd prime, p, and a positive integer, k, set ψ(p) equal to the totient function value, 
φ(p), which in this case is p−p. Do the same for ψ(2) when k > 1. Set ψ(2) and ψ(1) to 0. Using the fundamental theorem of arithmetic, we can write any other positive integer uniquely as a product of prime powers, m = Π p; set ψ(m) = Σ ψ(p). This differs from the totient itself, because it is a sum instead of a product.
The crystallographic restriction in general form states that Ord consists of those positive integers m such that ψ(m) ≤ N.
For m>2, the values of ψ(m) are equal to twice the algebraic degree of cos(2&pi;/m); therefore, ψ(m) is strictly less than m and reaches this maximum value if and only if m is a prime.
These additional symmetries do not allow a planar slice to have, say, 8-fold rotation symmetry. In the plane, the 2D restrictions still apply. Thus the cuts used to model quasicrystals necessarily have thickness.
Integer matrices are not limited to rotations; for example, a reflection is also a symmetry of order 2. But by insisting on determinant +1, we can restrict the matrices to proper rotations.