Covariance and Contravariance (Mathematics)

Lecture



Covariance and contravariance are concepts used in mathematics (linear algebra, differential geometry, tensor analysis) and in physics to describe how tensors (scalars, vectors, operators, bilinear forms, etc.) change under transformations of the basis in the corresponding spaces or manifolds. The "ordinary" components that change, under a change of basis, by the transformation inverse to the basis transformation are called contravariant. Components that change in the same way as the basis itself are called covariant.

A relationship between the covariant and contravariant coordinates of a tensor is possible only in spaces where a metric tensor is defined (not to be confused with a metric space).

The terms covariance and contravariance were introduced by Sylvester in 1853 for research on the algebraic theory of invariants.

Covariance and Contravariance in Vector Spaces

Contravariant and Covariant Vectors

Covariance and Contravariance (Mathematics)

Covariance and Contravariance (Mathematics)

a vector v described in terms of
the tangent basis
e1, e2, e3, along the coordinate curves (left),
the dual basis, covector basis, or reciprocal basis
e1, e2, e3, along the coordinate surfaces (right),
in 3-d general curvilinear coordinates (q1, q2, q3), a tuple of numbers used to define a point in coordinate space. Note that the basis and the dual (co)basis coincide only when the basis is orthogonal.

Let Covariance and Contravariance (Mathematics) be some finite-dimensional vector space, with some basis Covariance and Contravariance (Mathematics) defined in it. An arbitrary vector xCovariance and Contravariance (Mathematics) can be represented as a linear combination of the basis vectors:
i
Covariance and Contravariance (Mathematics). To simplify the notation (and for reasons that will become clear below), let us denote the coordinates with an upper index and adopt Einstein's convention: whenever the same index appears at different levels in an expression, summation over it is implied. Thus we can write:iCovariance and Contravariance (Mathematics). Let us define a new basis by means of the transformation matrix S. For the same reasons, let us introduce lower and upper indices (so as not to have to write summation signs) — SijCovariance and Contravariance (Mathematics). Then
Covariance and Contravariance (Mathematics) (summation over the index j is implied). Denoting the inverse matrix
Covariance and Contravariance (Mathematics), we can write:
Covariance and Contravariance (Mathematics). Substituting this formula into the coordinate representation of the vector x, we obtain: Covariance and Contravariance (Mathematics). Thus the coordinates of the vector in the new basis turn out to equal
jCovariance and Contravariance (Mathematics), that is, they transform "oppositely" (inversely) to the change of basis. For this reason such vectors are called contravariant — changing opposite to the basis. Contravariant vectors are ordinary vectors. In coordinate representation, contravariant vectors are usually written as a "column vector". An upper, or contravariant, index is used to identify contravariant vectors.

The space of all linear functionals mapping vectors to numbers is called the dual space Covariance and Contravariance (Mathematics). It is also a vector space of the same dimension as the original space. A basis can likewise be defined in this space. Let us denote the elements of the basis of the dual space with an upper index giCovariance and Contravariance (Mathematics). Any functional can be represented in this basis through coordinates, which we will denote with lower indices. Then, applying Einstein's convention, we can write:
Covariance and Contravariance (Mathematics), that is, any linear functional can simply be written as a set of numbers fiCovariance and Contravariance (Mathematics), just like an ordinary vector (except that the index is placed as a subscript).

Let us choose a basis in the dual space such that gi(x)=xiCovariance and Contravariance (Mathematics), that is, these functionals return the iCovariance and Contravariance (Mathematics)-th coordinate of the vector (the projection onto the basis vector eiCovariance and Contravariance (Mathematics)). Such a basis is called dual (to the basis of the original space). When the basis of the original space is changed, this condition must be preserved, that is, Aji=TjqSpiAqpCovariance and Contravariance (Mathematics)

In general, one must understand that the object itself does not depend on its representation in a basis. All the transformations are merely representations of one and the same object (a tensor).

The Metric Tensor

If a linear space is equipped with a scalar product gCovariance and Contravariance (Mathematics) — a bilinear form (or, in tensor terminology, a twice-covariant tensor) possessing the properties of symmetry and non-degeneracy — then such (finite-dimensional) spaces are called Euclidean (provided the corresponding quadratic form g(x,x) is positive definite) or pseudo-Euclidean (with no restriction on the sign of the quadratic form). The tensor corresponding to this bilinear form is called the metric tensor. The components of this tensor in a given basis are Covariance and Contravariance (Mathematics). If this basis is orthonormal (such a basis always exists in a (pseudo-)Euclidean space), then the matrix of components is diagonal. On the diagonal, in the case of a Euclidean space, are ones (the identity matrix). In the case of a pseudo-Euclidean space, besides ones, the diagonal also contains "minus-ones". In the general case, however, the bases may be non-orthogonal, so the metric tensor may also be represented by a non-diagonal matrix (nevertheless, in a "flat" space there always exists a change of basis that brings it to diagonal form).

With the help of the metric tensor, the scalar product can be written as g(x,y)=gijxiyjCovariance and Contravariance (Mathematics). In spaces with a scalar product there is a canonical isomorphism between the space VCovariance and Contravariance (Mathematics) and the dual space VCovariance and Contravariance (Mathematics), that is, each vector corresponds to a covector and vice versa. This correspondence is established precisely by means of the scalar product, or, in tensor notation, by means of the metric tensor. Namely, we can write xi=gijxjCovariance and Contravariance (Mathematics). This operation is called lowering or dropping an index. The inverse correspondence is established by means of the contravariant metric tensor xj=gijxiCovariance and Contravariance (Mathematics). This operation is called raising or lifting an index. It is easy to show that the matrices of the covariant and contravariant metric tensors are mutually inverse, that is, gikgkj=δijCovariance and Contravariance (Mathematics). The scalar product can be expressed both in contravariant and in covariant vectors: <span about="#mwt69" class="mwe-math-element mwe-math-element-inline" data-mw="{" id="mwlg" j="x_iy^i=x^iy_i=g^{ij}x_iy_j" }}"""="" style="white-space: nowrap;" typeof="mw:Extension/math">g(x,y)=gijxiyj=xiyi=xiyi=gijxiyjCovariance and Contravariance (Mathematics).

In the case of an orthonormal basis in a Euclidean space, the metric tensor is the identity matrix, so a covariant vector in coordinate notation coincides with the corresponding contravariant one. In this case, therefore, dividing vectors into contravariant and covariant is not necessary. However, as soon as the basis becomes non-orthogonal and/or the space becomes pseudo-Euclidean, this distinction becomes significant. In a pseudo-Euclidean space, in an orthogonal basis, covectors differ from the corresponding ordinary vector in the signs of some of their coordinates. In such a case, the system of vectors and covectors makes it possible to write the formula for the squared length of a vector in the same way as in the Euclidean case xixiCovariance and Contravariance (Mathematics). In the case of non-orthogonal (oblique) bases in Euclidean (pseudo-Euclidean) spaces, the metric tensor that converts contravariant vectors into covariant ones is not diagonal. Here, too, the length of a vector is written in the same way as in a Euclidean space, using contravariant and covariant vectors. All these cases have one thing in common — the metric tensor (in a given basis) has the same matrix for all points (vectors) of the space.

In spaces with a metric tensor, a "covariant vector" and a "contravariant vector" are in fact different representations (records in the form of a set of numbers) of one and the same geometric object — an ordinary vector or covector. That is, the same vector can be written as covariant (that is, as a set of covariant coordinates) and as contravariant (that is, as a set of contravariant coordinates). The same can be said of a covector. Converting one representation into the other is done simply by contraction with the metric tensor. In substance, vectors and covectors are distinguished only by which of the representations is natural for them. The contravariant representation is natural for an ordinary vector. For a covariant vector, what is natural is contraction with ordinary vectors without involving the metric. An example of a covariant vector is the gradient of a scalar function Covariance and Contravariance (Mathematics). Its contraction with a contravariant (ordinary) vector Covariance and Contravariance (Mathematics) gives an invariant — the differential of the function Covariance and Contravariance (Mathematics). Thus, if we take Covariance and Contravariance (Mathematics) to be ordinary vectors of the space, then the gradient must be a covector, so that no metric tensor is needed when contracting. At the same time, the vectors
Covariance and Contravariance (Mathematics) themselves require the use of the metric tensor Covariance and Contravariance (Mathematics) when contracted with vectors of the same kind.

If we are dealing with ordinary physical space, a simple criterion for the covariance or contravariance of a vector is how its natural representation contracts with the set of coordinates of a spatial displacement dxiCovariance and Contravariance (Mathematics), which is a model contravariant vector. Those that contract with dxiCovariance and Contravariance (Mathematics) by simple summation, without involving the metric, are covariant vectors, while those that require the metric are contravariant vectors. If, however, the space and the coordinates are so abstract that there is no way to distinguish the primary basis from the dual one other than by an arbitrary, conventional choice, then the substantive distinction between covariant and contravariant vectors disappears, or likewise becomes purely conventional.

A covariant vector, especially in the physical literature, is often taken to mean the expansion of any vector (that is, of a vector or covector, a vector of the tangent or cotangent space) in the dual basis. This then refers to the set of covariant coordinates of any object; usually, however, each type of object is written in the basis natural to it, which corresponds to the primary definition.

Generalization to Curvilinear Bases and Curved Spaces

The coordinates of a Euclidean (pseudo-Euclidean) space can also be curvilinear. A classic example of curvilinear coordinates is polar coordinates on the Euclidean plane. In such a case, the coordinate bases Covariance and Contravariance (Mathematics) can be considered linear only in infinitesimally small neighborhoods of a given point. Therefore the expression for the squared distance between sufficiently close points remains valid: Covariance and Contravariance (Mathematics). In the case of curvilinear coordinates, the metric tensor changes from point to point. Thus it constitutes a tensor field — a certain metric tensor is assigned to each point of the space.

A more general situation occurs in the case of curved spaces — Riemannian (pseudo-Riemannian) manifolds. A curved space can be visualized for the case of a two-dimensional surface — some smooth curved surface in three-dimensional space (for example, a spherical surface). The intrinsic geometry of such a (curved) surface is the geometry of a curved space. In the general case of a curved space of dimension nCovariance and Contravariance (Mathematics), it can be visualized as an arbitrary (curved) hypersurface in a space of higher dimension. For smooth manifolds with a countable base, the Whitney embedding theorem has been proved, according to which any such manifold of dimension nCovariance and Contravariance (Mathematics) is embedded in a "flat" (that is, uncurved Euclidean or pseudo-Euclidean) space of dimension 2nCovariance and Contravariance (Mathematics).

In a curved space, orthogonal, or indeed any linear, coordinate bases may not even exist. In the general case one has to deal precisely with curvilinear bases. In this case the application of the whole formalism of covariant and contravariant vectors described above becomes not merely especially important, but unavoidable.

General Definitions

In the case of curvilinear coordinates or curved spaces, the new coordinates are, generally speaking, nonlinear functions of the old coordinates: xi=xi(x1,x2,...,xn)Covariance and Contravariance (Mathematics). For infinitesimal changes of the old coordinates dxjCovariance and Contravariance (Mathematics), the changes in the new coordinates can be defined via the Jacobian matrix of the above functions:

Covariance and Contravariance (Mathematics)

Any vector vCovariance and Contravariance (Mathematics) that transforms in the same way as dxiCovariance and Contravariance (Mathematics), that is

vi=xixjvjCovariance and Contravariance (Mathematics)

is called a contravariant vector.

For some scalar function of the coordinates f(x)Covariance and Contravariance (Mathematics) consider its gradient Covariance and Contravariance (Mathematics). When passing to other coordinates, we have:

f(x)xi=f(x)xjxjxiCovariance and Contravariance (Mathematics)

Any vector uCovariance and Contravariance (Mathematics) that transforms in the same way as the gradient, that is

Aij=xqxixpxjApqCovariance and Contravariance (Mathematics)

And for a tensor that is once contravariant and once covariant, the transformation law has the form:

Covariance and Contravariance (Mathematics)

Usually, to indicate that the components of a tensor have been transformed to a new, primed basis, the prime is placed on the corresponding indices of the tensor rather than on its letter symbol; in that case the above formulas are written as follows

Covariance and Contravariance (Mathematics)

Algebra and Geometry

In category theory, functors can be covariant or contravariant. The dual space of a vector space is a standard example of a contravariant functor. Some constructions of multilinear algebra are mixed and are not functors.

In geometry, for each mapping one distinguishes a mapping into a space from a mapping out of a space, which makes it possible to define the variance of a construction. A tangent vector to a smooth manifold M at a point P is an equivalence class of curves in M passing through the given point P. It is therefore contravariant with respect to a smooth mapping of M. A covariant vector, or covector, is likewise constructed from a smooth mapping from M to the real line near P, in the cotangent bundle built on the dual space of the tangent bundle.

Covariant and contravariant components transform in different ways under changes of basis and, correspondingly, of coordinates, if one takes, as is usually done, coordinate bases.

See Also

  • General covariance
  • Lorentz covariance
  • Bra and ket
  • Covariant derivative
  • Metric tensor
  • [[b9073]]
created: 2026-04-26
updated: 2026-04-26
1



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Linear Algebra and Analytical Geometry"

Terms: Linear Algebra and Analytical Geometry