In mathematics, the tangent space of a manifold facilitates the generalization of vectors from affine spaces to general manifolds, since in the latter case one cannot simply subtract two points to obtain a vector that gives the displacement of the one point from the other.
In differential geometry, one can attach to every point x of a differentiable manifold a tangent space, a real vector space that intuitively contains the possible "directions" at which one can tangentially pass through x. The elements of the tangent space are called tangent vectors at x. This is a generalization of the notion of a bound vector in a Euclidean space. The dimension of all the tangent spaces of a connected manifold is the same as that of the manifold.
For example, if the given manifold is a 2-sphere, one can picture a tangent space at a point as the plane which touches the sphere at that point and is perpendicular to the sphere's radius through the point. More generally, if a given manifold is thought of as an embedded submanifold of Euclidean space one can picture a tangent space in this literal fashion. This was the traditional approach to defining parallel transport, and used by Dirac. More strictly this defines an affine tangent space, distinct from the space of tangent vectors described by modern terminology.
In algebraic geometry, in contrast, there is an intrinsic definition of tangent space at a point P of a variety V, that gives a vector space of dimension at most that of V. The points P at which the dimension is exactly that of V are called the non-singular points; the others are singular points. For example, a curve that crosses itself doesn't have a unique tangent line at that point. The singular points of V are those where the 'test to be a manifold' fails. See Zariski tangent space.