The book / chapter 02
CHAPTER 02

Vectors, covectors, and tensors

Describe a displacement, change the axes, and work out which numbers must change with them.

1 worked example in this chapter
Before you begin
THE QUESTION

How can components change while the physical object stays the same?

BRING WITH YOU

By the end: Transform a vector and a covector and check that their pairing is unchanged.

2.1 Vectors and their components#

A drone must move three metres east and four metres north. You can draw that displacement as an arrow from its starting point to its destination. Rotating the map changes the arrow’s horizontal and vertical components on the screen, but the destination stays the same.

We need to distinguish the displacement from the numbers used to describe it. Choose two basis vectors: e1e_1, one metre east, and e2e_2, one metre north. Any displacement in this plane can be written as a unique combination of these two arrows. Our drone’s displacement is

V=3e1+4e2.V=3e_1+4e_2.

The numbers 3 and 4 are its components in this basis. The basis vectors need not have unit length or meet at right angles. In a plane, they must be nonparallel and nonzero, so that they can describe both independent directions.

For a general vector, write the components as V1V^1 and V2V^2:

V=V1e1+V2e2=i=12Viei=Viei.V=V^1e_1+V^2e_2=\sum_{i=1}^2 V^ie_i=V^ie_i.

The superscripts 1 and 2 label components; they are not powers. The last expression uses Einstein summation: when an index appears once upstairs and once downstairs in a term, sum over its allowed values. Here ii takes the values 1 and 2. The index is an instruction to add the two contributions.

Now keep the drone’s destination fixed but choose a longer first basis vector:

e1=2e1,e2=e2.e'_1=2e_1,\qquad e'_2=e_2.

A prime labels the new description. How many copies of the new first arrow do we need? Each copy covers twice the distance, so we need half as many:

V=3e1+4e2=32e1+4e2.V=3e_1+4e_2=\frac32e'_1+4e'_2.

Thus V1=3/2V'^1=3/2 and V2=4V'^2=4. The vector has stayed the same while its components have changed. This compensating behavior is called contravariant transformation. We will calculate more general changes in §2.4.

Changing the basis while keeping VV fixed is a passive transformation. Rotating the actual displacement while keeping the basis fixed is an active transformation. In the first case the drone reaches the same place; in the second it generally does not.

2.2 Linear maps and matrices#

A linear map takes a vector as input and gives a vector as output, respecting addition and scaling:

A(aV+bW)=aA(V)+bA(W).A(aV+bW)=aA(V)+bA(W).

Here aa and bb are numbers. Knowing what AA does to the basis vectors determines what it does to every vector. Suppose

A(e1)=2e1,A(e2)=e1+3e2.A(e_1)=2e_1,\qquad A(e_2)=e_1+3e_2.

For the drone’s vector, linearity gives

A(3e1+4e2)=3(2e1)+4(e1+3e2)=10e1+12e2.A(3e_1+4e_2)=3(2e_1)+4(e_1+3e_2)=10e_1+12e_2.

The matrix stores the components of A(e1)A(e_1) and A(e2)A(e_2) in its first and second columns:

(2103)(34)=(1012).\begin{pmatrix}2&1\\0&3\end{pmatrix} \begin{pmatrix}3\\4\end{pmatrix} =\begin{pmatrix}10\\12\end{pmatrix}.

Index notation expresses this same multiplication as

(AV)i=AijVj.(AV)^i=A^i{}_jV^j.

The summed index jj selects the input components. The unsummed index ii selects the output component: setting i=1i=1 gives 2V1+V22V^1+V^2, while setting i=2i=2 gives 3V23V^2. We call jj a dummy index and ii a free index.

The identity map leaves each basis vector unchanged. Its matrix has ones on the diagonal and zeros elsewhere. Its components have a special name, the Kronecker delta:

δij={1i=j,0ij.δijVj=Vi.\delta^i{}_j= \begin{cases}1&i=j,\\0&i\ne j.\end{cases} \qquad \delta^i{}_jV^j=V^i.

A matrix can also represent a rule with a different job. The matrix in §0.6 accepted two vectors and returned a dot product. The matrix here accepts one vector and returns another vector. When a matrix appears, identify its inputs and output before using it.

2.3 Covectors measure vectors#

Suppose a measuring rule takes a vector’s first component and adds twice its second component:

ω(V)=V1+2V2.\omega(V)=V^1+2V^2.

For V=(3,4)V=(3,4), it returns 3+2(4)=113+2(4)=11. If we double the vector, the answer doubles. If we add two vectors, their answers add. A linear rule of this kind, taking a vector and returning one number, is called a covector.

More generally, write

ω(V)=ω1V1+ω2V2=ωiVi.\omega(V)=\omega_1V^1+\omega_2V^2=\omega_iV^i.

The coefficients ω1\omega_1 and ω2\omega_2 specify the rule in this basis. In our example they are 1 and 2. This operation is called the pairing of a covector with a vector. It does not require an angle or a length.

There is a useful covector for each component: the rule that extracts just that component. Call these rules θ1\theta^1 and θ2\theta^2. Then θ1(V)=V1\theta^1(V)=V^1 and θ2(V)=V2\theta^2(V)=V^2. Applied to the basis vectors themselves, they obey

θi(ej)=δij.\theta^i(e_j)=\delta^i{}_j.

These component extractors form the dual basis. Any covector can be assembled from them:

ω=ω1θ1+ω2θ2=ωiθi.\omega=\omega_1\theta^1+\omega_2\theta^2=\omega_i\theta^i.

In particular, ωi=ω(ei)\omega_i=\omega(e_i): the coefficient tells us what the rule returns for one basis vector.

Now reuse the longer basis vector e1=2e1e'_1=2e_1. The same rule returns ω(e1)=2ω(e1)\omega(e'_1)=2\omega(e_1), so its new first coefficient is ω1=2ω1\omega'_1=2\omega_1. The drone’s first component halved, but the measuring rule’s coefficient doubled:

ω(V)=ωiVi=(2)(3/2)+(2)(4)=11.\omega(V)=\omega'_iV'^i=(2)(3/2)+(2)(4)=11.

The answer is unchanged. Lower indices mark this transformation behavior of covector components. The dual basis changes too: θ1=θ1/2\theta'^1=\theta^1/2, because its job is to extract the new, halved component.

A scalar field assigns one value to each point: for example, the temperature T(x,y)T(x,y) at each position on a plate. For this example, xx and yy are dimensionless labels counting steps on the plate’s grid. The first-order temperature change under a displacement with components V1,V2V^1,V^2 is

dT(V)=(xT)V1+(yT)V2.dT(V)=(\partial_xT)V^1+(\partial_yT)V^2.

The measuring rule dTdT, called the differential of TT, is a covector. It is exactly linear in its input. Its prediction of a finite temperature change is an approximation when the temperature field varies nonlinearly.

In Cartesian calculus we also arrange these partial derivatives into a gradient arrow. Converting a covector into that arrow uses the lengths and angles of the axes. Chapter 4 develops this conversion; a covector by itself only supplies the measuring rule.

2.4 Changing coordinates with the chain rule#

Consider a path whose position is described by x=x(s)x=x(s) and y=y(s)y=y(s), with ss a dimensionless parameter marking progress along the path. Its tangent vector has components V1=dx/dsV^1=dx/ds and V2=dy/dsV^2=dy/ds: the rates at which the position labels change along the path.

Relabel the same positions using x=x/2x'=x/2 and y=yy'=y. The chain rule gives V1=V1/2V'^1=V^1/2 and V2=V2V'^2=V^2. This is the longer-first-basis example again, expressed as a change of coordinates.

For a general smooth, invertible change, each new coordinate can depend on several old ones. We will use Greek indices for general coordinates. In a two-dimensional example their range has two values; in spacetime it will be 0,1,2,30,1,2,3. The chain rule reads

Vα=dxαds=xαxμdxμds=JαμVμ.V'^\alpha=\frac{dx'^\alpha}{ds} =\frac{\partial x'^\alpha}{\partial x^\mu}\frac{dx^\mu}{ds} =J^\alpha{}_{\mu}V^\mu.

The Jacobian JJ is the matrix of first partial derivatives. Differentiating the inverse coordinate change gives its inverse matrix KK:

Jαμ=xαxμ,Kμα=xμxα,KμαJαν=δμν.J^\alpha{}_{\mu}=\frac{\partial x'^\alpha}{\partial x^\mu}, \qquad K^\mu{}_{\alpha}=\frac{\partial x^\mu}{\partial x'^\alpha}, \qquad K^\mu{}_{\alpha}J^\alpha{}_{\nu}=\delta^\mu{}_{\nu}.

For x=x/2x'=x/2, y=yy'=y, these are J=diag(1/2,1)J=\operatorname{diag}(1/2,1) and K=diag(2,1)K=\operatorname{diag}(2,1). The notation diag\operatorname{diag} lists the diagonal entries; the other entries are zero.

To find how a covector transforms, require it to give the same answer on the same vector. Substitute Vμ=KμαVαV^\mu=K^\mu{}_{\alpha}V'^\alpha into its pairing:

ωμVμ=ωμKμαVα=ωαVα.\omega_\mu V^\mu =\omega_\mu K^\mu{}_{\alpha}V'^\alpha =\omega'_\alpha V'^\alpha.

Since this must hold for every input vector, the new coefficients are

ωα=Kμαωμ.\omega'_\alpha=K^\mu{}_{\alpha}\omega_\mu.

The vector uses JJ; the covector uses KK. This is how their changes compensate.

For a scalar field ff, the value at a given point is unchanged by relabeling: f(x)=f(x)f'(x')=f(x). Applying the chain rule to its derivatives gives the same covector law:

αf=Kμαμf,μ=xμ.\partial'_\alpha f'=K^\mu{}_{\alpha}\partial_\mu f, \qquad \partial_\mu=\frac{\partial}{\partial x^\mu}.

The differential is written

df=(μf)dxμ,df(V)=(μf)Vμ.df=(\partial_\mu f)dx^\mu, \qquad df(V)=(\partial_\mu f)V^\mu.

Here dxμdx^\mu denotes a coordinate component extractor: dxμ(V)=Vμdx^\mu(V)=V^\mu. This connects two familiar uses of dxdx. Along a path, dx/dsdx/ds is a tangent component; the covector dxdx measures exactly that component when applied to the tangent. In the illustration below, dxdx counts the change in the xx label as we follow a vector through planes of constant xx.

For a nonlinear coordinate change, JJ and KK vary from point to point. The transformation rules above still work at each point. Chapter 6 will examine the extra term that appears when we differentiate components while the Jacobian itself changes.

SPACETIME LAB / 02

An arrow meets a family of planes

A covector measures how many level intervals a displacement crosses. Rotate the scene to see that this is a pairing, not a length.

Arrows and the questions they answerA diagonal vector crosses three evenly spaced level intervals of the function x. The covector dx returns the change in x, not the Euclidean length of the arrow. Changing the coordinate scale changes both components so their pairing stays the same.04 / ARROWS AND THE QUESTIONS THEY ANSWERA vector supplies a displacementA covector asks a linear questionThree level intervals crossed → answer 3Interactive geometry is loading.
StartThree intervals
ω=dx,v=(3,2,1)ω(v)=3\begin{gathered}\omega=dx,\quad v=(3,2,1)\\\omega(v)=3\end{gathered}

Read the scene. The numbers label the level sets of xx in three-dimensional Euclidean space. Small rings mark the exact intersections the arrow has reached. The control follows λv\lambda v as the displacement fraction λ\lambda runs from zero to one. Starting at level zero, three level intervals give dx(v)=3dx(v)=3; the ring count is not a Euclidean length. At full extent, the arrow ends at (3,2,1)(3,2,1).

WORKED EXAMPLE

Change the coordinates. Keep the measurement.

If both the vector components and the measuring rule change, how can their answer stay the same?

See the idea

A moving sensor follows one path through a scalar field. One map uses (x,y)(x,y); another uses u=xu=x and v=y+x2v=y+x^2. The second map bends its coordinate grid, but it cannot change the sensor reading. We will calculate the same rate of change twice. All coordinates, the path parameter λ\lambda, and the scalar reading in this example are dimensionless.

Work it out
  1. Give the experiment a point and a direction

    At (x,y)=(1,2)(x,y)=(1,2), let the path have tangent components V=(dx/dλ,dy/dλ)=(2,1)V=(dx/d\lambda,dy/d\lambda)=(2,-1). The scalar field is f=3xyf=3x-y. Its differential dfdf is the covector that measures the first-order change along any tangent.

    df(V)=3(2)(1)=7.df(V)=3(2)-(-1)=7.

    Why this step works The multivariable chain rule multiplies each partial derivative by the corresponding coordinate rate.

  2. Convert the tangent using the local map

    The new address is (u,v)=(1,3)(u,v)=(1,3). Differentiate the coordinate change at the original point. The Jacobian is the matrix of these derivatives; it acts on the tangent, not on the point itself.

    J=(u,v)(x,y)=(102x1),V=Jx=1(21)=(23).J=\frac{\partial(u,v)}{\partial(x,y)}=\begin{pmatrix}1&0\\2x&1\end{pmatrix},\qquad V'=\left.J\right|_{x=1}\begin{pmatrix}2\\-1\end{pmatrix}=\begin{pmatrix}2\\3\end{pmatrix}.

    Why this step works The first new coordinate has the original horizontal rate. The second also includes the derivative of the squared horizontal coordinate.

  3. Convert the measuring rule using the inverse map

    Solve for the old coordinates: x=ux=u, y=vu2y=v-u^2. The same scalar field now has the formula f=3uv+u2f'=3u-v+u^2. At u=1u=1 its partial derivatives are (5,1)(5,-1).

    df=3dxdy=(3+2u)dudv.df=3\,dx-dy=(3+2u)\,du-dv.

    Why this step works A scalar keeps its value at each point. Substituting the inverse coordinate map gives its new formula before differentiating.

  4. Let the two changes cancel

    Pair the new covector components with the new tangent components. The lists changed; the measured rate did not. No lengths or angles entered this calculation.

    df(V)=5(2)1(3)=7.df(V)=5(2)-1(3)=7.

    Why this step works Vector and covector transformation laws compensate because they describe the same directional derivative.

Go deeper

With vector components written as a column and covector components as a row, the transformation is V=JVV'=JV and ω=ωJ1\omega'=\omega J^{-1}. Thus ωV=ωJ1JV=ωV\omega'V'=\omega J^{-1}JV=\omega V. If you store covectors as columns instead, the rule is ω=(J1)Tω\omega'=(J^{-1})^{\mathsf T}\omega; the transpose comes from that storage convention. This is an exact algebraic proof for any invertible Jacobian. Here the inverse map exists on all of R2\mathbb R^2 and detJ=1\det J=1 everywhere. The coordinate change is nonlinear even though its action on each tangent space is linear.

Test the idea

FIRST, PREDICT

A classmate transforms the column of covector components with JJ, just as for a vector, and obtains a different sensor rate. What needs repairing?

Compare the reasoning

Multiply the final rate by detJ\det J.

A directional derivative is a scalar, not a coordinate area. In this example detJ=1\det J=1, so this would not even repair the error.

Accept the new rate: a nonlinear map changes the physical experiment.

This is a change of labels for the same path and field. An active physical deformation would be a different experiment.

Use the inverse transpose for covector columns.

Yes. A covector consumes a vector; its transformation must undo the vector’s transformation inside the pairing.

A hint

Write the desired identity ωV=ωV\omega'V'=\omega V, then substitute V=JVV'=JV.

NOW CHANGE THE EXAMPLE

Keep u=xu=x, v=y+x2v=y+x^2, but use f=x+2yf=x+2y. At x=2x=2, a path has (dx/dλ,dy/dλ)=(3,2)(dx/d\lambda,dy/d\lambda)=(3,-2). Find df/dλdf/d\lambda using the new coordinates.

A hint

First obtain V=(3,10)V'=(3,10). Rewrite ff in terms of u,vu,v before finding its derivatives.

Work through the solution

The new formula is f=u+2v2u2f'=u+2v-2u^2. At u=2u=2, df=(7)du+2dvdf=(-7)\,du+2\,dv, so df/dλ=(7)(3)+2(10)=1df/d\lambda=(-7)(3)+2(10)=-1. Directly, 1(3)+2(2)=11(3)+2(-2)=-1 as well.

A vector and a covector change their component lists together so that the measurement they make together stays fixed.

2.5 Tensors, products, and contractions#

Chapter 0 introduced a bilinear form: a rule that takes two vectors and returns a number, linear in each input separately. Write it as

B(V,W)=BμνVμWν.B(V,W)=B_{\mu\nu}V^\mu W^\nu.

There are two independent sums. The components are the values on pairs of basis vectors: Bμν=B(eμ,eν)B_{\mu\nu}=B(e_\mu,e_\nu).

Change coordinates in each input, using Vμ=KμαVαV^\mu=K^\mu{}_{\alpha}V'^\alpha and Wν=KνβWβW^\nu=K^\nu{}_{\beta}W'^\beta. Then

B(V,W)=BμνKμαKνβVαWβ,B(V,W)=B_{\mu\nu}K^\mu{}_{\alpha}K^\nu{}_{\beta}V'^\alpha W'^\beta,

so the new components are

Bαβ=KμαKνβBμν.B'_{\alpha\beta}=K^\mu{}_{\alpha}K^\nu{}_{\beta}B_{\mu\nu}.

Each lower index contributes one inverse Jacobian. For the linear map in §2.2, the output vector contributes a forward Jacobian and the input contributes an inverse Jacobian:

Aαβ=JαμKνβAμν.A'^\alpha{}_{\beta}=J^\alpha{}_{\mu}K^\nu{}_{\beta}A^\mu{}_{\nu}.

These are examples of tensors. A tensor of type (r,s)(r,s) has rr upper and ss lower indices in its component description, transforming with one JJ for each upper index and one KK for each lower index. Equivalently, it can be viewed as a multilinear rule taking rr covectors and ss vectors and returning a number. A bilinear form is type (0,2)(0,2). A linear map is type (1,1)(1,1): apply it to a vector, then let a covector measure its output.

The total number of indices, r+sr+s, is sometimes called tensor rank. This differs from matrix rank, the number of independent output directions of a linear map. A two-index tensor can have a matrix of rank one.

A tensor product builds a rule with separate inputs. For two covectors,

(ωη)(V,W)=ω(V)η(W).(\omega\otimes\eta)(V,W)=\omega(V)\eta(W).

For example, let ω=(1,2)\omega=(1,2) and η=(2,1)\eta=(2,-1) in our two-dimensional basis. If V=(3,4)V=(3,4) and W=(1,3)W=(1,3), the result is 11×(1)=1111\times(-1)=-11. Exchanging the inputs gives 7×2=147\times2=14. The order of the inputs matters.

Contraction sums a matching upper and lower index. For a linear map, contracting its two indices gives its trace:

Aii=A11+A22.A^i{}_i=A^1{}_1+A^2{}_2.

The matrix in §2.2 has trace 2+3=52+3=5. Under a basis change, the JJ and KK factors cancel in this sum, leaving the same answer. More generally, contraction removes one upper and one lower index and produces another tensor.

The indices also help check an equation before calculating:

Expression How to read it
VμωμV^\mu\omega_\mu Sum over μ\mu; the result is a number.
AμνVν=WμA^\mu{}_{\nu}V^\nu=W^\mu Sum over ν\nu; one equation remains for each value of μ\mu.
Aμν=BμρA^\mu{}_{\nu}=B^\mu{}_{\rho} The free labels differ, so this does not state a consistent component equation.
VμWμV^\mu W^\mu Two upper indices do not form an Einstein contraction. A rule for pairing two vectors is additional information.
AμνBνρCρμA^\mu{}_{\nu}B^\nu{}_{\rho}C^\rho{}_{\mu} All three labels are summed; the result is a number.

A dummy index can be renamed without changing the sum: Vμωμ=VαωαV^\mu\omega_\mu=V^\alpha\omega_\alpha. Free indices must match on both sides of an equation. A label must not appear three times in one product under this convention.

Finally, any two-input bilinear form can be split into a symmetric part and an antisymmetric part:

B(μν)=12(Bμν+Bνμ),B[μν]=12(BμνBνμ).B_{(\mu\nu)}=\frac12(B_{\mu\nu}+B_{\nu\mu}), \qquad B_{[\mu\nu]}=\frac12(B_{\mu\nu}-B_{\nu\mu}).

Parentheses denote symmetrization; square brackets denote antisymmetrization. Swapping the inputs leaves the first part unchanged and reverses the sign of the second. Adding the two parts recovers BμνB_{\mu\nu}. For example, entries B12=5B_{12}=5 and B21=1B_{21}=1 give symmetric entry 3 and antisymmetric entry 2.

2.6 Approximations and oriented area#

The same notation lets us write Taylor’s formula for several inputs:

f(x+δx)=f(x)+μfδxμ+12μνfδxμδxν+.f(x+\delta x)=f(x)+\partial_\mu f\,\delta x^\mu +\frac12\partial_\mu\partial_\nu f\,\delta x^\mu\delta x^\nu+\cdots.

Here xx stands for the full coordinate list and δx\delta x for a small change in that list. Repeated indices add the contributions from every direction. For f(x,y)=x2+3yf(x,y)=x^2+3y near (2,1)(2,1), the expansion is

f(2+δx,1+δy)=7+4δx+3δy+(δx)2.f(2+\delta x,1+\delta y)=7+4\delta x+3\delta y+(\delta x)^2.

In this example the expression is exact. For a general smooth function, more terms remain. The notation F=F0+εF1+O(ε2)F=F_0+\varepsilon F_1+O(\varepsilon^2) means that the omitted remainder is bounded in magnitude by a constant times ε2\varepsilon^2 as the chosen small parameter approaches zero, within the specified regime.

A small function need not have small derivatives. For dimensionless xx, consider f(x)=εsin(kx)f(x)=\varepsilon\sin(kx). Its magnitude is at most ε|\varepsilon|, but f(x)=εkcos(kx)f'(x)=\varepsilon k\cos(kx). If ε=0.001\varepsilon=0.001 and k=10,000k=10{,}000, the function never exceeds 0.001 in magnitude while its slope can reach 10. This distinction will matter when we approximate fields and then differentiate them.

Further example: oriented area and differential forms

The antisymmetric rule

(dxdy)(V,W)=VxWyVyWx(dx\wedge dy)(V,W)=V^xW^y-V^yW^x

computes the signed coordinate area of the parallelogram spanned by two vectors. The symbol \wedge is called the wedge product. For V=(2,1)V=(2,1) and W=(1,3)W=(1,3), the area is 2(3)1(1)=52(3)-1(1)=5. Swapping the vectors gives 5-5; parallel vectors give zero. This is the two-by-two determinant from linear algebra, now written as a rule for two inputs.

A smoothly varying antisymmetric covariant tensor is called a differential form. A one-form assigns a covector smoothly to each point; a two-form has two antisymmetric vector inputs, as in this area rule. Chapter 21 develops how these objects are integrated over curves and surfaces.

For now, practice expanding an indexed expression into its ordinary sums, and checking that a change of basis leaves a completed measurement unchanged. These operations will let us compare moving observers in the next chapter. David Tong’s differential-geometry notes provide a further formal treatment of vector and dual spaces.

The idea to keep

A tensor describes a multilinear relationship. Components are its values in chosen bases, and transform to preserve that relationship.

If one basis vector doubles, what happens to that vector component of a fixed arrow?

It halves. A coordinate coefficient measures how much of a basis vector you need; a larger basis vector requires less of it.

Figure detail

Scroll to explore at full resolution. Colors follow your reading theme.