ArticleslgStudy

science

Tensor contraction

Tensor contraction is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Tensor contraction rather than just read about it. In short: In multilinear algebra, a tensor contraction is an operation on a tensor that arises from the canonical pairing of a vector space and its dual. This example with two small matrices (tensors) shows how it works. [ 1 2 3 4 ] [ 5 6 7 8 ] = [ 1 ⋅ 5 + 2 ⋅ 7 1 ⋅ 6 + 2 ⋅ 8 3 ⋅ 5 + 4 ⋅ 7 3 ⋅ 6 + 4 ⋅ 8 ] = [ 19 22 43 50 ] {\displaystyle {\begin{bmatrix}1&2\\3&4\end{bmatrix}}{\begin{bmatrix}5&6\\7&8\end{bmatrix}}={\begin{bmat…

Key takeaways

  • Tensor contraction belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Tensor contraction to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Tensor contraction from memory before moving on to harder problems.

Reference excerpt

In multilinear algebra, a tensor contraction is an operation on a tensor that arises from the canonical pairing of a vector space and its dual. This example with two small matrices (tensors) shows how it works.

[ 1 2 3 4 ] [ 5 6 7 8 ] = [ 1 ⋅ 5 + 2 ⋅ 7 1 ⋅ 6 + 2 ⋅ 8 3 ⋅ 5 + 4 ⋅ 7 3 ⋅ 6 + 4 ⋅ 8 ] = [ 19 22 43 50 ] {\displaystyle {\begin{bmatrix}1&2\\3&4\end{bmatrix}}{\begin{bmatrix}5&6\\7&8\end{bmatrix}}={\begin{bmatrix}1\cdot 5+2\cdot 7&1\cdot 6+2\cdot 8\\3\cdot 5+4\cdot 7&3\cdot 6+4\cdot 8\\\end{bmatrix}}={\begin{bmatrix}19&22\\43&50\end{bmatrix}}}

When calculating with matrices or tensors, often it's useful to move the second tensor up, and put the result underneath, just for calculation purposes. That way, each row of the first matrix (1234), and each column of the second matrix (5678), point to the cell of the result that they produce. Of course, these matrices can be larger than 2x2; often 3x3 or 4x4 are used, but any size is allowed. In simple index notation, this is written ∑ j = 1 2 a i j × b j k = c i k {\textstyle \sum _{j=1}^{2}a_{ij}\times b_{jk}=c_{ik}} where i, j and k all range over 1, 2. Notice how the index j, in between, disappears; this is the essence of tensor contraction. In Einstein notation, this would be a i

j × b j

k = c i

k {\textstyle a_{i}{}^{j}\times b_{j}{}^{k}=c_{i}{}^{k}} . The superscripts work just like subscripts, with a different meaning. Only repeated, raised and lowered indices are summed over. Objects can have more than two indices, also. Tensor contraction can be seen as a generalization of the trace.

Abstract formulation Let V be a vector space over a field k. The core of the contraction operation, and the simplest case, is the canonical pairing of V with its dual vector space V∗. The pairing is the linear map from the tensor product of these two spaces to the field k:

C : V ⊗ V ∗ → k {\displaystyle C:V\otimes V^{*}\rightarrow k}

corresponding to the bilinear form

⟨ v , f ⟩ = f ( v ) {\displaystyle \langle v,f\rangle =f(v)}

where f is in V∗ and v is in V. The map C defines the contraction operation on a tensor of type (1, 1), which is an element of V ⊗ V ∗ {\displaystyle V\otimes V^{*}} . Note that the result is a scalar (an element of k). In finite dimensions, using the natural isomorphism between V ⊗ V ∗ {\displaystyle V\otimes V^{*}} and the space of linear maps from V to V, one obtains a basis-free definition of the trace. In general, a tensor of type (m, n) (with m ≥ 1 and n ≥ 1) is an element of the vector space

V ⊗ ⋯ ⊗ V ⊗ V ∗ ⊗ ⋯ ⊗ V ∗ {\displaystyle V\otimes \cdots \otimes V\otimes V^{*}\otimes \cdots \otimes V^{*}}

(where there are m factors V and n factors V∗). Applying the canonical pairing to the kth V factor and the lth V∗ factor, and using the identity on all other factors, defines the (k, l) contraction operation, which is a linear map that yields a tensor of type (m − 1, n − 1). By analogy with the (1, 1) case, the general contraction operation is sometimes called the trace.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Tensor contraction

Start with the simplest possible case. Write down what Tensor contraction claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Tensor contraction before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Tensor contraction ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Tensor contraction

In research
Tensor contraction appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Tensor contraction in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Tensor contraction is common in secondary-school and first-year university syllabi. It links to neighbouring topics Tensors, so understanding it makes those chapters shorter.
In everyday life
Look for Tensor contraction outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Tensor contraction” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Tensor contraction in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Tensor contraction means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Tensor contraction out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Tensor contraction in simple terms?

In multilinear algebra, a tensor contraction is an operation on a tensor that arises from the canonical pairing of a vector space and its dual. This example with two small matrices (tensors) shows how it works. [ 1 2 3 4 ] [ 5 6 7 8 ] = [ 1 ⋅ 5 + 2 ⋅ 7 1 ⋅ 6 + 2 ⋅ 8 3 ⋅ 5 + 4 ⋅ 7 3 ⋅ 6 + 4 ⋅ 8 ] =…

Why does Tensor contraction matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Tensor contraction?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Tensor contraction.

Tags

  • Tensors

Keep exploring