
In physics, especially 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 modern mathematical notation, the role is sometimes swapped.
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, by changing scale from meters to centimeters (that is, ''dividing'' the scale of the reference axes by 100), the components of a measured
velocity
Velocity is the directional speed of an object in motion as an indication of its rate of change in position as observed from a particular frame of reference and as measured by a particular standard of time (e.g. northbound). Velocity i ...
vector are ''multiplied'' by 100. A vector changes scale ''inversely'' to changes in scale to the reference axes, and consequently is called ''contravariant''. As a result, a vector often has units of distance or distance with other units (as, for example, velocity has units of distance divided by time).
In contrast, a
covector, also called a ''dual vector'', typically has units of the inverse of distance or the inverse of distance with other units. For example, a
gradient
In vector calculus, the gradient of a scalar-valued differentiable function of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p is the "direction and rate of fastest increase". If the gr ...
which has units of a spatial
derivative
In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. ...
, or distance
−1. The components of a covector changes in the ''same way'' as changes to scale of the reference axes, and consequently is called ''covariant''.
A third concept related to covariance and contravariance is
invariance
Invariant and invariance may refer to:
Computer science
* Invariant (computer science), an expression whose value doesn't change during program execution
** Loop invariant, a property of a program loop that is true before (and after) each iterat ...
. An example of a physical
observable that does not change with a change of scale on the reference axes is the
mass
Mass is an intrinsic property of a body. It was traditionally believed to be related to the quantity of matter in a physical body, until the discovery of the atom and particle physics. It was found that different atoms and different element ...
of a particle, which has units of mass (that is, no units of distance). The single,
scalar value of mass is independent of changes to the scale of the reference axes and consequently is called ''invariant''.
Under more general changes in basis:
* A contravariant vector or
tangent vector (often abbreviated simply as ''vector'', such as a
direction vector or velocity vector) has components that ''contra-vary'' with a change of basis to compensate. That is, the matrix that transforms the vector components must be the inverse of the matrix that transforms the basis vectors. The components of vectors (as opposed to those of covectors) 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
In mechanics, acceleration is the rate of change of the velocity of an object with respect to time. Accelerations are vector quantities (in that they have magnitude and direction). The orientation of an object's acceleration is given by ...
, and
jerk. In
Einstein notation (implicit summation over repeated index), contravariant components are denoted with ''upper indices'' as in
*:
* A covariant vector or
cotangent vector (often abbreviated as ''covector'') has components that ''co-vary'' with a change of basis. That is, the components must be transformed by the same matrix as the change of basis matrix. The components of covectors (as opposed to those of vectors) are said to be covariant. Examples of covariant vectors generally appear when taking a
gradient
In vector calculus, the gradient of a scalar-valued differentiable function of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p is the "direction and rate of fastest increase". If the gr ...
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 with 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 by passing from one coordinate system to another.
The terms ''covariant'' and ''contravariant'' were introduced by
James Joseph Sylvester in 1851 in the context of associated algebraic forms theory.
Tensor
In mathematics, a tensor is an algebraic object that describes a multilinear relationship between sets of algebraic objects related to a vector space. Tensors may map between different objects such as vectors, scalars, and even other tens ...
s are objects in
multilinear algebra that can have aspects of both covariance and contravariance.
In the lexicon of
category theory,
covariance and contravariance are properties of
functor
In mathematics, specifically category theory, a functor is a mapping between categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) are associated to topological spaces, an ...
s; unfortunately, it is the lower-index objects (covectors) that generically have
pullbacks, which are contravariant, while the upper-index objects (vectors) instead have
pushforwards, which are covariant. This terminological conflict may be avoided by calling contravariant functors "cofunctors"—in accord with the "covector" terminology, and continuing the tradition of treating vectors as the concept and covectors as the coconcept.
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
In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
) 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 change in a way that cancels the change in the spatial axes, in the same way that coordinates 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 coordinates, 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
, then a contravariant vector v must be similarly transformed via
. 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
Velocity is the directional speed of an object in motion as an indication of its rate of change in position as observed from a particular frame of reference and as measured by a particular standard of time (e.g. northbound). Velocity i ...
, 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
position
Position often refers to:
* Position (geometry), the spatial location (rather than orientation) of an entity
* Position, a job or occupation
Position may also refer to:
Games and recreation
* Position (poker), location relative to the dealer
* ...
,
displacement,
velocity
Velocity is the directional speed of an object in motion as an indication of its rate of change in position as observed from a particular frame of reference and as measured by a particular standard of time (e.g. northbound). Velocity i ...
,
acceleration
In mechanics, acceleration is the rate of change of the velocity of an object with respect to time. Accelerations are vector quantities (in that they have magnitude and direction). The orientation of an object's acceleration is given by ...
,
momentum
In Newtonian mechanics, momentum (more specifically linear momentum or translational momentum) is the product of the mass and velocity of an object. It is a vector quantity, possessing a magnitude and a direction. If is an object's mass ...
, and
force
In physics, a force is an influence that can change the motion of an object. A force can cause an object with mass to change its velocity (e.g. moving from a state of rest), i.e., to accelerate. Force can also be described intuitively as a ...
.
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
In vector calculus, the gradient of a scalar-valued differentiable function of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p is the "direction and rate of fastest increase". If the gr ...
vector of a function
:
transform like the reference axes themselves.
Definition

The general formulation of covariance and contravariance refer to how the components of a coordinate vector transform under a
change of basis (
passive transformation
Passive may refer to:
* Passive voice, a grammatical voice common in many languages, see also Pseudopassive
* Passive language, a language from which an interpreter works
* Passivity (behavior), the condition of submitting to the influence of on ...
). Thus let ''V'' be a
vector space
In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called '' vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but ...
of dimension ''n'' over a
field of
scalars ''S'', and let each of and be a
basis of ''V''.
[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 ] 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 transformation
A vector
in ''V'' is expressed uniquely as a
linear combination of the elements
of the f basis as
where ''v''
''fare elements of the field ''S'' known as the components of ''v'' in the f basis. Denote the
column vector
In linear algebra, a column vector with m elements is an m \times 1 matrix consisting of a single column of m entries, for example,
\boldsymbol = \begin x_1 \\ x_2 \\ \vdots \\ x_m \end.
Similarly, a row vector is a 1 \times n matrix for some n, ...
of components of ''v'' by v
''f
:
so that () can be rewritten as a matrix product
:
The vector ''v'' may also be expressed in terms of the f′ basis, so that
:
However, since the vector ''v'' itself is invariant under the choice of basis,
:
The invariance of ''v'' combined with the relationship () between f and f′ implies that
:
giving the transformation rule
:
In terms of components,
: