15.4  Contraction and the Trace

Chapter 2 defined the trace of an operator by choosing a basis, writing down the matrix, and adding the diagonal entries; it then proved that the answer does not depend on the choice (Definition 4.5.2). That is a correct definition and an unsatisfying one. It says how to compute the number, not what the number is, and the independence of the basis arrives afterwards, as a theorem about similar matrices. Section 03 offers a way out. An operator on V is an element of V∗⊗V (Theorem 15.3.9), and on V∗⊗V there is one obvious scalar-valued map that uses no basis at all: apply the functional to the vector. This section builds that map, proves that it is the trace, and extends it to tensors with many slots.

15.4.1. Evaluation, made linear

The dual space was invented so that its elements could eat vectors. The eating is a function of two arguments, V∗×V→F,(φ,v)↦φ(v), and it is bilinear: linear in v because φ is a linear map, and linear in φ because that is how V∗ is added and scaled (Definition 5.1.2). A bilinear map is exactly what the tensor product converts into a linear one, and by now this should be a reflex.

Contraction is the evaluation pairing, turned into a single linear map by the tensor product.

Definition 15.4.1 (Contraction)

Let V be a vector space over F. The contraction of V is the unique linear map C:V∗⊗V→F,C(φ⊗v)=φ(v)(φ∈V∗, v∈V).

Well-definedness. The pairing (φ,v)↦φ(v) is bilinear, so Definition 15.2.1 supplies exactly one linear map on V∗⊗V taking those values. Nothing else is chosen: no basis, no finite dimension, no extra structure on V.

Examples.

  1. In coordinates. Let dim⁡V=n, let B=(v1,…,vn) be a basis and B∗=(φ1,…,φn) its dual basis (Definition 5.1.3), so φj(vi)=δij. A general ξ∈V∗⊗V is ξ=∑i,jaijφj⊗vi by Theorem 15.2.5, and C(ξ)=∑i,jaijφj(vi)=∑i=1naii. The contraction sums the coefficients whose two indices agree. That is a diagonal sum, which is the first hint of what is coming.
  2. The smallest case. If dim⁡V=1, pick v≠0 and let φ be dual to it. Every element of V∗⊗V is aφ⊗v, and C(aφ⊗v)=a. So C is the isomorphism V∗⊗V≅F. Degenerate, and worth seeing: the contraction is the only thing that can happen here.
  3. A functional times a vector, in Fn. With V=Fn, φ=y⊤ and v=x, C(φ⊗v)=y⊤x, the dot product. Chapter 11’s inner product on Rn is this contraction composed with the identification of Rn with its dual — which is extra structure, and is why the dot product is not a contraction of V⊗V.

Non-example by minimal change. Replace φ(v) by φ(v)2. The assignment (φ,v)↦φ(v)2 is not bilinear — doubling v multiplies it by 4 — so no linear map on V∗⊗V agrees with it, and Definition 15.2.1 does not apply. The exact clause that fails is linearity in each slot.

Why one upper slot and one lower slot. Contraction needs a functional and a vector: the functional supplies the mouth. There is no analogous map V⊗V→F.

Warning. There is no canonical contraction of two vectors. A linear map V⊗V→F is the same thing as a bilinear form on V (Definition 15.2.1 with Z=F), and Chapter 14 spent a chapter on the fact that a vector space carries many bilinear forms and prefers none of them. Each basis of V supplies one, (v,w)↦∑iφi(v)φi(w), and different bases supply different ones: on R2 the standard basis gives the dot product, while ((1,0),(1,1)) gives a form under which (1,0) and (0,1) are not orthogonal. Only the pairing between V∗ and V is free of charge.

15.4.2. Contraction is the trace

We can now say what the trace is.

Theorem 15.4.1 (The Trace Is a Contraction)

Let V be a finite-dimensional vector space over F, and let Θ:V∗⊗V→L(V) be the isomorphism of Theorem 15.3.9. Then tr(Θ(ξ))=C(ξ)for every ξ∈V∗⊗V, that is, tr=C∘Θ−1 as maps L(V)→F.

Idea. Both sides are linear in ξ, so by Lemma 15.3.2 it is enough to check simple tensors. And Θ(φ⊗v) is the rank-at-most-one map u↦φ(u)v, whose trace can be read off from a single well-chosen basis: put v first.

Proof. Both ξ↦tr(Θ(ξ)) and ξ↦C(ξ) are linear, being composites of linear maps (Theorem 4.5.3 for the first). By Lemma 15.3.2 it suffices to prove tr(Θ(φ⊗v))=φ(v) for all φ∈V∗, v∈V.

Write R:=Θ(φ⊗v), so Ru=φ(u)v for every u. If v=0, then R=0 and φ(v)=0, so both sides vanish. Otherwise (v) is a linearly independent list, so by Theorem 1.8.2 it extends to a basis B=(u1,…,un) of V with u1=v. For each j, Ruj=φ(uj)v=φ(uj)u1, so column j of [R]BB has φ(uj) in row 1 and zeros below it (Definition 4.1.1). Hence the only non-zero diagonal entry is the one in position (1,1), equal to φ(u1)=φ(v). By Definition 4.5.2, trR=φ(v), as required.

What has changed. Chapter 2’s definition named a basis and then had to prove that the answer survived a change of basis, using Theorem 4.2.5. Here nothing was named. The map C was manufactured by the universal property out of the evaluation pairing, which exists before any basis does, and Θ was manufactured the same way. So basis-independence is not a theorem about C∘Θ−1; there is no basis in the construction to be independent of. Chapter 4’s theorem is still true, and it is what makes the two descriptions agree — but it is now an observation about a computation of the trace, not part of its definition. The single basis used in the proof above was a convenience for reading off one number, not a choice the answer could depend on.

Two consequences come free. First, the trace of a rank-one map.

Corollary 15.4.2 (Trace of a Rank-One Map)

Let V be finite-dimensional, φ∈V∗ and v∈V, and let R∈L(V) be Ru=φ(u)v. Then trR=φ(v). In particular, with a basis B and its dual basis, idV=Θ(∑iφi⊗vi) and tridV=∑iφi(vi)=n⋅1.

Proof. The first claim was proved inside Theorem 15.4.1. For the second, Θ(∑iφi⊗vi) sends vj to ∑iφi(vj)vi=vj, so it is idV (Theorem 2.1.5); applying C gives ∑iφi(vi)=∑i1=n⋅1.

Second, the promise made in §03: the trace of a tensor product of maps multiplies, and now we can see why. The key is that a functional on V⊗W is built from one on each factor.

Proposition 15.4.3 (The Dual of a Tensor Product)

Let V and W be finite-dimensional over F. There is a unique linear map κ:V∗⊗W∗→(V⊗W)∗,κ(φ⊗ψ)(v⊗w)=φ(v)ψ(w), and it is an isomorphism.

Proof. For fixed φ,ψ, the map (v,w)↦φ(v)ψ(w) is bilinear, so Definition 15.2.1 produces a unique functional φ⋅ψ∈(V⊗W)∗ with the stated values. The assignment (φ,ψ)↦φ⋅ψ is itself bilinear, since two functionals agreeing on all simple tensors are equal (Lemma 15.3.2), so Definition 15.2.1 gives the unique linear κ.

Let B=(v1,…,vn) and C=(w1,…,wm) be bases with dual bases (φi) and (ψj). Then κ(φi⊗ψj)(vk⊗wl)=δkiδlj, so κ carries the basis (φi⊗ψj) of V∗⊗W∗ (Theorem 15.2.5) to the dual basis of B⊗C (Theorem 5.1.3 (a), which characterizes it by these values). A linear map carrying a basis to a basis is an isomorphism, by Theorem 2.2.4 and Theorem 2.3.1.

Corollary 15.4.4 (Why the Trace Multiplies)

Let V,W be finite-dimensional over F, S∈L(V) and T∈L(W). Then tr(S⊗T)=trS⋅trT.

Proof. Both (S,T)↦tr(S⊗T) and (S,T)↦trS⋅trT are bilinear on L(V)×L(W), by Proposition 15.3.3 (a), (b) and Theorem 4.5.3. The maps of rank at most one span L(V), since Θ is onto and simple tensors span V∗⊗V (Proposition 15.2.4); likewise for L(W). So it suffices to check the identity when S=Θ(φ⊗v) and T=Θ(ψ⊗w).

For such S and T and any a⊗b∈V⊗W, (S⊗T)(a⊗b)=φ(a)v⊗ψ(b)w=κ(φ⊗ψ)(a⊗b)(v⊗w), so S⊗T=Θ(κ(φ⊗ψ)⊗(v⊗w)) by Lemma 15.3.2. By Theorem 15.4.1 and Proposition 15.4.3, tr(S⊗T)=κ(φ⊗ψ)(v⊗w)=φ(v)ψ(w), which is trS⋅trT by Corollary 15.4.2.

So the trace multiplies because evaluation multiplies: a functional on a tensor product is a product of functionals, and contraction is evaluation. Chapter 8 proved this by summing aiibkk over all pairs (Theorem 8.4.3 (b)), which is the same fact with the sum written out.

15.4.3. Tensors with many slots

Contraction is not confined to one upper and one lower slot; it can be applied to a chosen pair inside a tensor with any number of them. First we name those tensors. Write V⊗p:=V⊗⋯⊗V⏟p,V⊗0:=F, which is unambiguous by Proposition 15.3.5.

Definition 15.4.2 (Tensor of type (p,q))

Let V be a vector space over F and p,q≥0. A tensor of type (p,q) on V is an element of Tqp(V):=V⊗p⊗(V∗)⊗q. The p copies of V are the contravariant slots and the q copies of V∗ the covariant slots. The number p+q is the rank or order of the tensor.

If dim⁡V=n, then dim⁡Tqp(V)=np+q by Theorem 15.2.5 and Corollary 5.1.4. The small cases are all things we have met:

  • T00(V)=F: scalars.
  • T01(V)=V and T10(V)=V∗: vectors and functionals.
  • T11(V)=V⊗V∗≅L(V): operators, by Theorem 15.3.9 together with the swap of Exercise (C3: Reproving the swap), which sends v⊗φ to φ⊗v.
  • T20(V)≅(V⊗V)∗ by Proposition 15.4.3, and a functional on V⊗V is a bilinear form on V by Definition 15.2.1. So a type (0,2) tensor is exactly a bilinear form — the whole subject matter of Chapter 14.

Warning. The word “rank” is overloaded here. The rank of a tensor in the sense of Definition 15.4.2 is the number of slots, p+q; it has nothing to do with rankT for a linear map, nor with the smallest number of simple tensors needed to write an element. A type (1,1) tensor always has rank 2 in this sense, whatever the rank of the corresponding operator. Where confusion is possible we say order.

Now the general contraction. Contracting slot a against slot b means feeding the b-th functional the a-th vector and keeping everything else.

Definition 15.4.3 (Contraction on a pair of slots)

Let V be a vector space over F, let p,q≥1, and fix 1≤a≤p and 1≤b≤q. The contraction on slots a and b is the unique linear map Cba:Tqp(V)→Tq−1p−1(V) with, for all v1,…,vp∈V and φ1,…,φq∈V∗, Cba(v1⊗⋯⊗vp⊗φ1⊗⋯⊗φq)=φb(va)v1⊗…va^⋯⊗vp⊗φ1⊗…φb^⋯⊗φq, where a hat means that the factor is omitted.

Well-definedness. The right-hand side is multilinear in the p+q arguments: each argument appears exactly once, either inside the scalar φb(va) or as one factor of a tensor product, and both are linear in it. By Lemma 15.3.4 there is exactly one linear map on Tqp(V) with these values. For p=q=1 it lands in T00(V)=F and sends v⊗φ to φ(v): it is Definition 15.4.1 read on V⊗V∗ instead of V∗⊗V, that is, C composed with the swap of Exercise (C3: Reproving the swap). We use that identification silently from here on, and Theorem 15.4.1 applies to either reading.

Warning. Which slots you contract matters. Let dim⁡V=2 with basis (v1,v2) and dual basis (φ1,φ2), and take the type (2,2) tensor t=v1⊗v2⊗φ1⊗φ2. Then C11(t)=φ1(v1)v2⊗φ2=v2⊗φ2, while C21(t)=φ2(v1)v2⊗φ1=0. The two contractions of the same tensor differ, one of them being zero. There is no “the” contraction of a tensor of order ≥3: the slots must be named.

Quick check. Let dim⁡V=3 with basis (v1,v2,v3) and dual basis (φ1,φ2,φ3), and let t=v1⊗φ1+2v2⊗φ2−v1⊗φ3∈T11(V). Compute C11(t), and say which operator t corresponds to.

Solution. C11(t)=φ1(v1)+2φ2(v2)−φ3(v1)=1+2−0=3. The corresponding operator sends v1↦v1, v2↦2v2, v3↦−v1, so its matrix in (v1,v2,v3) is (10−1020000), of trace 3, in agreement with Theorem 15.4.1.

Index notation, in the next section, makes contraction visibly what it looks like in physics: set an upper index equal to a lower one and sum.

15.4.4. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Define the contraction C:V∗⊗V→F, and say what makes it well defined.
  • (b) State the relation between the trace and the contraction, with its hypothesis.
  • (c) Explain why there is no canonical linear map V⊗V→F.
  • (d) For dim⁡V=4, what is dim⁡T32(V)?
  • (e) True or false: for t∈T22(V), the four contractions Cba(t) all agree. Justify your answer.

Solution.

  • (a) C is the unique linear map with C(φ⊗v)=φ(v) (Definition 15.4.1). It is well defined because (φ,v)↦φ(v) is bilinear, so Definition 15.2.1 produces exactly one such linear map.

  • (b) If V is finite-dimensional, then tr(Θ(ξ))=C(ξ) for all ξ∈V∗⊗V, where Θ is the isomorphism of Theorem 15.3.9 (Theorem 15.4.1).

  • (c) Such a map is the same thing as a bilinear form on V, and a vector space has many bilinear forms with none distinguished; each basis produces a different one. Contraction works only because V∗ comes with the evaluation pairing built in.

  • (d) 42+3=45=1024.

  • (e) False. Definition 15.4.3’s warning gives t=v1⊗v2⊗φ1⊗φ2 with C11(t)=v2⊗φ2≠0 and C21(t)=0.

B. Practice

Exercise (B1: Contracting a mixed tensor)

Let dim⁡V=3 with basis B=(v1,v2,v3) and dual basis (φ1,φ2,φ3). Let t=2v1⊗φ1−v1⊗φ2+3v2⊗φ2+v3⊗φ1−4v3⊗φ3.

  • (a) Write the matrix of the operator S corresponding to t, in the basis B.
  • (b) Compute C11(t) from Definition 15.4.3, and check it against trS.
  • (c) Compute tr(S⊗S) without writing down a 9×9 matrix.

Solution.

  • (a) The tensor vi⊗φj corresponds to the operator u↦φj(u)vi, whose matrix is the matrix unit Eij (Theorem 15.3.9). Adding up, [S]BB=(2−1003010−4).

  • (b) Here C11(t)=2φ1(v1)−φ2(v1)+3φ2(v2)+φ1(v3)−4φ3(v3)=2−0+3+0−4=1, and the diagonal of the matrix in (a) sums to 2+3−4=1.

  • (c) By Corollary 15.4.4, tr(S⊗S)=(trS)2=1.

Exercise (B2: Two contractions of one tensor)

Let dim⁡V=2 with basis (v1,v2) and dual basis (φ1,φ2), and let t=v1⊗φ1⊗φ2+v2⊗φ2⊗φ2∈T21(V). Compute C11(t) and C21(t), and state which space each lies in.

Solution. Both lie in T10(V)=V∗. Contracting the single upper slot against the first lower slot, C11(t)=φ1(v1)φ2+φ2(v2)φ2=φ2+φ2=2φ2. Against the second lower slot, the remaining factor is the first functional: C21(t)=φ2(v1)φ1+φ2(v2)φ2=0+φ2=φ2. So C11(t)=2φ2≠φ2=C21(t).

Exercise (B3: Which statements hold?)

Let V,W be finite-dimensional over F. Determine which of the following hold. Justify your answer.

  • (a) C(ξ)=0 implies ξ=0.
  • (b) tr(Θ(φ⊗v))=φ(v) for all φ∈V∗, v∈V.
  • (c) Every element of T20(V) is a bilinear form on V, and conversely.
  • (d) tr(S⊗T)=tr(T⊗S) for S∈L(V), T∈L(W).
  • (e) C:V∗⊗V→F is surjective whenever V≠{0}.

Solution.

  • (a) Fails for dim⁡V≥2. With a basis and its dual, ξ=φ1⊗v2≠0 (Proposition 15.2.8) but C(ξ)=φ1(v2)=0. Contraction is a functional, not an injection; its kernel has dimension n2−1.

  • (b) Holds: Corollary 15.4.2.

  • (c) Holds. By Proposition 15.4.3, T20(V)=V∗⊗V∗≅(V⊗V)∗, and by Definition 15.2.1 the linear maps V⊗V→F correspond exactly to the bilinear maps V×V→F, which are the bilinear forms of Definition 14.1.1.

  • (d) Holds: both equal trS⋅trT by Corollary 15.4.4, the two products of scalars being equal.

  • (e) Holds. Take v≠0; by Theorem 5.1.5 there is φ with φ(v)=1, so C(cφ⊗v)=c for every c∈F.

C. Going deeper

Exercise (C1: Composition, in tensor language)

Let V be finite-dimensional over F and Θ:V∗⊗V→L(V) the isomorphism of Theorem 15.3.9.

  • (a) Prove that Θ(φ⊗v)Θ(ψ⊗w)=φ(w)Θ(ψ⊗v) for all φ,ψ∈V∗ and v,w∈V. Recall that ST means first T, then S.
  • (b) Hence compute tr(Θ(φ⊗v)Θ(ψ⊗w)), and observe that the answer is unchanged when (φ,v) and (ψ,w) are exchanged.
  • (c) Deduce that tr(ST)=tr(TS) for all S,T∈L(V).

Solution.

  • (a) Both sides are operators on V, so evaluate at an arbitrary u∈V. Applying Θ(ψ⊗w) first gives ψ(u)w, and then Θ(φ⊗v)(ψ(u)w)=ψ(u)φ(w)v, using linearity of Θ(φ⊗v). The right side gives φ(w)ψ(u)v, the same scalar times the same vector. Hence the two operators agree at every u.

  • (b) By (a) and Corollary 15.4.2, tr(Θ(φ⊗v)Θ(ψ⊗w))=φ(w)ψ(v). Exchanging (φ,v) with (ψ,w) turns this into ψ(v)φ(w), which is the same product of scalars.

  • (c) The maps (S,T)↦tr(ST) and (S,T)↦tr(TS) are bilinear on L(V)×L(V), and the rank-one maps Θ(φ⊗v) span L(V) (as Θ is onto and simple tensors span, by Proposition 15.2.4). By (b) the two maps agree on such pairs, hence everywhere.

Exercise (C2: The contraction of the identity, over any field)

Let V be finite-dimensional over F, n=dim⁡V≥1, and let ι∈V∗⊗V be the tensor with Θ(ι)=idV.

  • (a) Prove that ι=∑i=1nφi⊗vi for every basis B of V with dual basis B∗. (This tensor is basis-free, though each expression for it is not.)
  • (b) Prove that C(ι)=n⋅1 in F.
  • (c) Over F2 with n=2, find a tensor ξ≠ι in V∗⊗V with C(ξ)=C(ι), and relate this to Chapter 4’s observation that the trace does not determine the rank of a projection over F2.

Solution.

  • (a) By Corollary 15.4.2, Θ(∑iφi⊗vi)=idV for any basis and its dual basis. Since Θ is injective (Theorem 15.3.9), all these tensors are equal, and each equals ι.

  • (b) C(ι)=∑iφi(vi)=∑i1=n⋅1 by Definition 5.1.3.

  • (c) Take ξ=0. Then C(ξ)=0=2⋅1=C(ι) in F2, while ξ≠ι because Θ(ι)=id≠0. Under Θ these are the identity and the zero operator, both projections, of ranks 2 and 0; this is exactly Theorem 4.5.4’s warning that over a field of characteristic 2 the integer rankP cannot be recovered from trP. The contraction is faithful to the tensor, but the field can be too small for the resulting scalar to distinguish them.

Found a typo or a mistake? Report it, or read this page’s source

The text of this book is licensed under CC BY-NC-SA 4.0.