In modern mathematical language, distance and angle can be generalized easily to 4-dimensional, 5-dimensional, and even higher-dimensional spaces. An n-dimensional space with notions of distance and angle that obey the Euclidean relationships is called an n-dimensional Euclidean space. Most of this article is devoted to developing the modern language necessary for the conceptual leap to higher dimensions.
An essential property of a Euclidean space is its flatness. Other spaces exist in geometry that are not Euclidean. For example, the surface of a sphere is not; a triangle on a sphere (suitably defined) will have angles that sum to something greater than 180 degrees. In fact, there is essentially only one Euclidean space of each dimension, while there are many non-Euclidean spaces of each dimension. Often these other spaces are constructed by systematically deforming Euclidean space.
In order to make all of this mathematically precise, one must clearly define the notions of distance, angle, translation, and rotation. The standard way to do this, as carried out in the remainder of this article, is to define the Euclidean plane as a two-dimensional real vector space equipped with an inner product. For then:
Once the Euclidean plane has been described in this language, it is actually a simple matter to extend its concept to arbitrary dimensions. For the most part, the vocabulary, formulas, and calculations are not made any more difficult by the presence of more dimensions. (However, rotations are more subtle in high dimensions, and visualizing high-dimensional spaces remains difficult, even for experienced mathematicians.)
A final wrinkle is that Euclidean space is not technically a vector space but rather an affine space, on which a vector space acts. Intuitively, the distinction just says that there is no canonical choice of where the origin should go in the space, because it can be translated anywhere. In this article, this technicality is largely ignored.
where each xi is a real number. The vector space operations on Rn are defined by
The vector space Rn comes with a standard basis:
Rn is the prototypical example of a real n-dimensional vector space. In fact, every real n-dimensional vector space V is isomorphic to Rn. This isomorphism is not canonical, however. A choice of isomorphism is equivalent to a choice of basis for V (by looking at the image of the standard basis for Rn in V). The reason for working with arbitrary vector spaces instead of Rn is that it is often preferable to work in a coordinate-free manner (that is, without choosing a preferred basis).
The result is always a real number. Furthermore, the inner product of x with itself is always nonnegative. This product allows us to define the "length" of a vector x as
This length function satisfies the required properties of a norm and is called the Euclidean norm on Rn.
The (non-reflex) angle θ (0° ≤ θ ≤ 180°) between x and y is then given by
Finally, one can use the norm to define a metric (or distance function) on Rn by
Real coordinate space together with this Euclidean structure is called Euclidean space and often denoted En. (Many authors refer to Rn itself as Euclidean space, with the Euclidean structure being understood). The Euclidean structure makes En an inner product space (in fact a Hilbert space), a normed vector space, and a metric space.
An important result on the topology of Rn, that is far from superficial, is Brouwer's invariance of domain. Any subset of Rn (with its subspace topology) that is homeomorphic to another open subset of Rn is itself open. An immediate consequence of this is that Rm is not homeomorphic to Rn if m ≠ n — an intuitively "obvious" result which is nonetheless difficult to prove.
In modern mathematics, Euclidean spaces form the prototypes for other, more complicated geometric objects. For example, a smooth manifold is a Hausdorff topological space that is locally diffeomorphic to Euclidean space. Diffeomorphism does not respect distance and angle, so these key concepts of Euclidean geometry are lost on a smooth manifold. However, if one additionally prescribes a smoothly varying inner product on the manifold's tangent spaces, then the result is what is called a Riemannian manifold. Put differently, a Riemannian manifold is a space constructed by deforming and patching together Euclidean spaces. Such a space enjoys notions of distance and angle, but they behave in a curved, non-Euclidean manner. The simplest Riemannian manifold, consisting of Rn with a constant inner product, is essentially identical to Euclidean n-space itself.
If one alters a Euclidean space so that its inner product becomes negative in one or more directions, then the result is a pseudo-Euclidean space. Smooth manifolds built from such spaces are called pseudo-Riemannian manifolds. Perhaps their most famous application is the theory of relativity, where empty spacetime with no matter is represented by the flat pseudo-Euclidean space called Minkowski space, spacetimes with matter in them form other pseudo-Riemannian manifolds, and gravity corresponds to the curvature of such a manifold.
Our universe, being subject to relativity, is not Euclidean. This becomes significant in theoretical considerations of astronomy and cosmology, and also in some practical problems such as global positioning and airplane navigation. Nonetheless, a Euclidean model of the universe can still be used to solve many other practical problems with sufficient precision.