# Covariance and contravariance of vectors

*For other uses of "covariant" or "contravariant", see covariance and contravariance (disambiguation).*

In multilinear algebra and tensor analysis, **covariance** and **contravariance** describe how the quantitative description of certain geometric or physical entities changes with a change of basis. In physics, a basis is sometimes thought of as a set of reference axes. A change of scale on the reference axes corresponds to a change of units in the problem. For instance, in changing scale from meters to centimeters (that is, *dividing* the scale of the reference axes by 100), the components of a measured velocity vector will *multiply* by 100. Vectors exhibit this behavior of changing scale *inversely* to changes in scale to the reference axes: they are *contravariant*. As a result, vectors often have units of distance or distance times some other unit (like the velocity).

In contrast, dual vectors (also called *covectors*) typically have units the inverse of distance or the inverse of distance times some other unit. An example of a dual vector is the gradient, which has units of a spatial derivative, or distance^{−1}. The components of dual vectors change in the *same way* as changes to scale of the reference axes: they are *covariant*. The components of vectors and covectors also transform in the same manner under more general changes in basis:

- For a vector (such as a direction vector or velocity vector) to be basis-independent, the components of the vector must
*contra-vary*with a change of basis to compensate. That is, the matrix that transforms the vector of components must be the inverse of the matrix that transforms the basis vectors. The components of vectors (as opposed to those of dual vectors) are said to be**contravariant**. Examples of vectors with*contravariant components*include the position of an object relative to an observer, or any derivative of position with respect to time, including velocity, acceleration, and jerk. In Einstein notation, contravariant components are denoted with*upper indices*as in

- For a dual vector (also called a
*covector*) to be basis-independent, the components of the dual vector must*co-vary*with a change of basis to remain representing the same covector. That is, the components must be transformed by the same matrix as the change of basis matrix. The components of dual vectors (as opposed to those of vectors) are said to be covariant. Examples of*covariant*vectors generally appear when taking a gradient of a function. In Einstein notation, covariant components are denoted with*lower indices*as in

Curvilinear coordinate systems, such as cylindrical or spherical coordinates, are often used in physical and geometric problems. Associated to any coordinate system is a natural choice of coordinate basis for vectors based at each point of the space, and covariance and contravariance are particularly important for understanding how the coordinate description of a vector changes in passing from one coordinate system to another.

The terms covariant and contravariant were introduced by J.J. Sylvester in 1853 in order to study algebraic invariant theory. In this context, for instance, a system of simultaneous equations is contravariant in the variables. Tensors are objects in multilinear algebra that can have aspects of both covariance *and* contravariance. The use of both terms in the modern context of multilinear algebra is a specific example of corresponding notions in category theory.

## Contents

## Introduction

In physics, a vector typically arises as the outcome of a measurement or series of measurements, and is represented as a list (or tuple) of numbers such as

The numbers in the list depend on the choice of coordinate system. For instance, if the vector represents position with respect to an observer (position vector), then the coordinate system may be obtained from a system of rigid rods, or reference axes, along which the components *v*_{1}, *v*_{2}, and *v*_{3} are measured. For a vector to represent a geometric object, it must be possible to describe how it looks in any other coordinate system. That is to say, the components of the vectors will *transform* in a certain way in passing from one coordinate system to another.

A *contravariant vector* has components that "transform as the coordinates do" under changes of coordinates (and so inversely to the transformation of the reference axes), including rotation and dilation. The vector itself does not change under these operations; instead, the components of the vector make a change that cancels the change in the spatial axes, in the same way that co-ordinates change. In other words, if the reference axes were rotated in one direction, the component representation of the vector would rotate in exactly the opposite way. Similarly, if the reference axes were stretched in one direction, the components of the vector, like the co-ordinates, would reduce in an exactly compensating way. Mathematically, if the coordinate system undergoes a transformation described by an invertible matrix *M*, so that a coordinate vector **x** is transformed to **x**′ = *M***x**, then a contravariant vector **v** must be similarly transformed via **v**′ = *M***v**. This important requirement is what distinguishes a contravariant vector from any other triple of physically meaningful quantities. For example, if *v* consists of the *x*, *y*, and *z*-components of velocity, then *v* is a contravariant vector: if the coordinates of space are stretched, rotated, or twisted, then the components of the velocity transform in the same way. Examples of contravariant vectors include displacement, velocity and acceleration. On the other hand, for instance, a triple consisting of the length, width, and height of a rectangular box could make up the three components of an abstract vector, but this vector would not be contravariant, since a change in coordinates on the space does not change the box's length, width, and height: instead these are scalars.

By contrast, a *covariant vector* has components that change oppositely to the coordinates or, equivalently, transform like the reference axes. For instance, the components of the gradient vector of a function

transform like the reference axes themselves. When only rotations of the axes are considered, the components of contravariant and covariant vectors behave in the same way. It is only when other transformations are allowed that the difference becomes apparent.

## Definition

The general formulation of covariance and contravariance refers to how the components of a coordinate vector transform under a change of basis (passive transformation). Thus let *V* be a vector space of dimension *n* over the field of scalars *S*, and let each of **f** = (*X*_{1},...,*X*_{n}) and **f'** = (*Y*_{1},...,*Y*_{n}) be a basis of *V*.^{[note 1]} Also, let the change of basis from **f** to **f′** be given by

for some invertible *n*×*n* matrix *A* with entries .
Here, each vector *Y*_{j} of the **f'** basis is a linear combination of the vectors *X*_{i} of the **f** basis, so that

## Contravariant transformationA vector where so that (Template:EquationNote) can be rewritten as a matrix product The vector However, since the vector The invariance of giving the transformation rule In terms of components, where the coefficients are the entries of the inverse matrix of Because the components of the vector The way |
## Covariant transformationA linear functional α on These components are the action of α on the basis vectors Under the change of basis from Denote the row vector of components of so that (Template:EquationNote) can be rewritten as the matrix product Because the components of the linear functional α transform with the matrix The way Had a column vector representation been used instead, the transformation law would be the transpose |

## Coordinates

The choice of basis **f** on the vector space *V* defines uniquely a set of coordinate functions on *V*, by means of

The coordinates on *V* are therefore contravariant in the sense that

Conversely, a system of *n* quantities *v*^{i} that transform like the coordinates *x*^{i} on *V* defines a contravariant vector. A system of *n* quantities that transform oppositely to the coordinates is then a covariant vector.

This formulation of contravariance and covariance is often more natural in applications in which there is a coordinate space (a manifold) on which vectors live as tangent vectors or cotangent vectors. Given a local coordinate system *x*^{i} on the manifold, the reference axes for the coordinate system are the vector fields

This gives rise to the frame **f** = (*X*_{1},...,*X*_{n}) at every point of the coordinate patch.

If *y*^{i} is a different coordinate system and

then the frame **f'** is related to the frame **f** by the inverse of the Jacobian matrix of the coordinate transition:

Or, in indices,

A tangent vector is by definition a vector that is a linear combination of the coordinate partials . Thus a tangent vector is defined by

Such a vector is contravariant with respect to change of frame. Under changes in the coordinate system, one has

Therefore the components of a tangent vector transform via

Accordingly, a system of *n* quantities *v*^{i} depending on the coordinates that transform in this way on passing from one coordinate system to another is called a contravariant vector.

## Covariant and contravariant components of a vector with a metric

In a vector space *V* over a field *K* with a bilinear form *g* : *V* × *V* → *K* (which may be referred to as the metric tensor), there is little distinction between covariant and contravariant vectors, because the bilinear form allows covectors to be identified with vectors. That is, a vector *v* uniquely determines a covector α via

for all vectors *w*. Conversely, each covector α determines a unique vector *v* by this equation. Because of this identification of vectors with covectors, one may speak of the **covariant components** or **contravariant components** of a vector, that is, they are just representations of the same vector using reciprocal bases.

Given a basis **f** = (*X*_{1},...,*X*_{n}) of *V*, there is a unique reciprocal basis **f**^{#} = (*Y*^{1},...,*Y*^{n}) of *V* determined by requiring that

the Kronecker delta. In terms of these bases, any vector *v* can be written in two ways:

The components *v*^{i}[**f**] are the **contravariant components** of the vector *v* in the basis **f**, and the components *v*_{i}[**f**] are the **covariant components** of *v* in the basis **f**. The terminology is justified because under a change of basis,

### Euclidean plane

In the Euclidean plane, the dot product allows for vectors to be identified with covectors. If is a basis, then the dual basis satisfies

Thus, **e**^{1} and **e**_{2} are perpendicular to each other, as are **e**^{2} and **e**_{1}, and the lengths of **e**^{1} and **e**^{2} normalized against **e**_{1} and **e**_{2}, respectively.

#### Example

For example,^{[2]} suppose that we are given a basis **e**_{1}, **e**_{2} consisting of a pair of vectors making a 45° angle with one another, such that **e**_{1} has length 2 and **e**_{2} has length 1. Then the dual basis vectors are given as follows:

**e**^{2}is the result of rotating**e**_{1}through an angle of 90° (where the sense is measured by assuming the pair**e**_{1},**e**_{2}to be positively oriented), and then rescaling so that**e**^{2}•**e**_{2}= 1 holds.**e**^{1}is the result of rotating**e**_{2}through an angle of 90°, and then rescaling so that**e**^{1}•**e**_{1}= 1 holds.

Applying these rules, we find

and

Thus the change of basis matrix in going from the original basis to the reciprocal basis is

since

For instance, the vector

is a vector with contravariant components

The covariant components are obtained by equating the two expressions for the vector *v*:

so

### Three-dimensional Euclidean space

In the three-dimensional Euclidean space, one can also determine explicitly the dual basis to a given set of basis vectors **e**_{1}, **e**_{2}, **e**_{3} of *E*_{3} that are not necessarily assumed to be orthogonal nor of unit norm. The contravariant (dual) basis vectors are:

Even when the **e**_{i} and **e**^{i} are not orthonormal, they are still mutually dual:

Then the contravariant coordinates of any vector ** v ** can be obtained by the dot product of ** v ** with the contravariant basis vectors:

Likewise, the covariant components of ** v ** can be obtained from the dot product of ** v ** with covariant basis vectors, viz.

Then ** v ** can be expressed in two (reciprocal) ways, viz.

or

Combining the above relations, we have

and we can convert from covariant to contravariant basis with

and

The indices of covariant coordinates, vectors, and tensors are subscripts. If the contravariant basis vectors are orthonormal then they are equivalent to the covariant basis vectors, so there is no need to distinguish between the covariant and contravariant coordinates.

### General Euclidean spaces

More generally, in an *n*-dimensional Euclidean space *V*, if a basis is

the reciprocal basis is given by

where the coefficients *e*^{ij} are the entries of the inverse matrix of

Indeed, we then have

The covariant and contravariant components of any vector

are related as above by

and

## Informal usage

In the field of physics, the adjective **covariant** is often used informally as a synonym for invariant. For example, the Schrödinger equation does not keep its written form under the coordinate transformations of special relativity. Thus, a physicist might say that the Schrödinger equation is *not covariant*. In contrast, the Klein–Gordon equation and the Dirac equation do keep their written form under these coordinate transformations. Thus, a physicist might say that these equations are *covariant*.

Despite this usage of "covariant", it is more accurate to say that the Klein–Gordon and Dirac equations are invariant, and that the Schrödinger equation is not invariant. Additionally, to remove ambiguity, the transformation by which the invariance is evaluated should be indicated.

Because the components of vectors are contravariant and those of covectors are covariant, the vectors themselves are often referred to as being contravariant and the covectors as covariant.

## Use in tensor analysis

The distinction between covariance and contravariance is particularly important for computations with tensors, which often have **mixed variance**. This means that they have both covariant and contravariant components, or both vector and dual vector components. The valence of a tensor is the number of variant and covariant terms, and in Einstein notation, covariant components have lower indices, while contravariant components have upper indices. The duality between covariance and contravariance intervenes whenever a vector or tensor quantity is represented by its components, although modern differential geometry uses more sophisticated index-free methods to represent tensors.

In tensor analysis, a **covariant** vector varies more or less reciprocally to a corresponding contravariant vector. Expressions for lengths, areas and volumes of objects in the vector space can then be given in terms of tensors with covariant and contravariant indices. Under simple expansions and contractions of the coordinates, the reciprocity is exact; under affine transformations the components of a vector intermingle on going between covariant and contravariant expression.

On a manifold, a tensor field will typically have multiple indices, of two sorts. By a widely followed convention, covariant indices are written as lower indices, whereas contravariant indices are upper indices. When the manifold is equipped with a metric, covariant and contravariant indices become very closely related to one another. Contravariant indices can be turned into covariant indices by contracting with the metric tensor. The reverse is possible by contracting with the (matrix) inverse of the metric tensor. Note that in general, no such relation exists in spaces not endowed with a metric tensor. Furthermore, from a more abstract standpoint, a tensor is simply "there" and its components of either kind are only calculational artifacts whose values depend on the chosen coordinates.

The explanation in geometric terms is that a general tensor will have contravariant indices as well as covariant indices, because it has parts that live in the tangent bundle as well as the cotangent bundle.

A contravariant vector is one which transforms like , where are the coordinates of a particle at its proper time . A covariant vector is one which transforms like , where is a scalar field.

## Algebra and geometry

In category theory, there are covariant functors and contravariant functors. The assignment of the dual space to a vector space is a standard example of a contravariant functor. Some constructions of multilinear algebra are of 'mixed' variance, which prevents them from being functors.

In differential geometry, the components of a vector relative to a basis of the tangent bundle are covariant if they change with the same linear transformation as a change of basis. They are contravariant if they change by the inverse transformation. This is sometimes a source of confusion for two distinct but related reasons. The first is that vectors whose components are covariant (called covectors or 1-forms) actually pull back under smooth functions, meaning that the operation assigning the space of covectors to a smooth manifold is actually a *contravariant* functor. Likewise, vectors whose components are contravariant push forward under smooth mappings, so the operation assigning the space of (contravariant) vectors to a smooth manifold is a *covariant* functor. Secondly, in the classical approach to differential geometry, it is not bases of the tangent bundle that are the most primitive object, but rather changes in the coordinate system. Vectors with contravariant components transform in the same way as changes in the coordinates (because these actually change oppositely to the induced change of basis). Likewise, vectors with covariant components transform in the opposite way as changes in the coordinates.

## See also

- Covariant transformation
- Change of basis
- Active and passive transformation
- Two-point tensor, a generalization allowing indices to reference multiple vector bases.
- Mixed tensor

## Notes

- ↑ A basis
**f**may here profitably be viewed as a linear isomorphism from**R**^{n}to*V*. Regarding**f**as a row vector whose entries are the elements of the basis, the associated linear isomorphism is then

## Notes

- ↑ {{#invoke:citation/CS1|citation |CitationClass=book }}
- ↑ Template:Cite web

## References

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}.

## External links

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}

- {{#invoke:citation/CS1|citation

|CitationClass=citation }}