In geometry, a hyperplane is a subspace whose dimension is one less than that of its ambient space. For example, if a space is 3-dimensional then its hyperplanes are the 2-dimensional planes, while if the space is 2-dimensional, its hyperplanes are the 1-dimensional lines. This notion can be used in any general space in which the concept of the dimension of a subspace is defined.
In different settings, hyperplanes may have different properties. For instance, a hyperplane of an n-dimensional affine space is a flat subset with dimension n − 1 and it separates the space into two half spaces. While a hyperplane of an n-dimensional projective space does not have this property.
The difference in dimension between a subspace S and its ambient space X is known as the codimension of S with respect to X. Therefore, a necessary and sufficient condition for S to be a hyperplane in X is for S to have codimension one in X.