# Tensor product

In mathematics, the **tensor product**, denoted by ⊗, may be applied in different contexts to vectors, matrices, tensors, vector spaces, algebras, topological vector spaces, and modules, among many other structures or objects. In each case the significance of the symbol is the same: the freest bilinear operation. In some contexts, this product is also referred to as **outer product**. The general concept of a "tensor product" is captured by monoidal categories; that is, the class of all things that have a tensor product is a monoidal category. The variant of ⊗ is used in control theory.

## Tensor product of vector spaces

The tensor product of two vector spaces *V* and *W* over a field *K* is another vector space over *K*. It is denoted *V* ⊗_{K} *W*, or *V* ⊗ *W* when the underlying field *K* is understood.

If has a basis and has a basis , then the tensor product can be taken to be a vector space spanned by a basis consisting of all pairs ; each such basis element of is denoted . For any vectors and there is a corresponding product vector in given by This product operation is quickly verified to be bilinear.

As an example, letting (considered as a vector space over the field of real numbers) and considering the standard basis set for each, the tensor product is spanned by the nine basis vectors and is isomorphic to For vectors the tensor product

The disadvantage of the above definition is that it involves a choice of basis, which can not be done canonically for a generic vector space. However, it is not difficult to show that any two choices of basis lead to isomorphic tensor product spaces (c.f. the universal property described below). Alternatively, the tensor product may be defined in an expressly basis-independent manner as a quotient space of a free vector space over *V* × *W*. This approach is described below.

### Prerequisite: the free vector space

The definition of ⊗ requires the notion of the free vector space *F*(*S*) on some set *S*, a vector space whose basis is parameterized by *S*. By definition, *F*(*S*) is the set of all functions *g* from *S* to a given field *K* that have finite support; i.e., *g* is identically zero outside some finite subset of *S*. It is a vector space with the usual addition and scalar multiplication of functions. It has a basis parameterized by *S*. Indeed, for each *s* in *S* we define^{[1]}

Then {*δ _{s}* |

*s*∈

*S*} is a basis for

*F*(

*S*), since each element of

*F*(

*S*) can be uniquely written as a linear combination of

*δ*. Because of this explicit expression, an element of

_{s}*F*(

*S*) is often called a formal sum of symbols in

*S*.

By construction, the (possibly infinite) dimension of the vector space *F*(*S*) equals the cardinality of the set *S*.

### Definition

Let us first consider a special case: let us say *V*, *W* are free vector spaces for the sets *S*, *T* respectively. That is, *V* = *F*(*S*), *W* = *F*(*T*). In this special case, the tensor product is defined as *F*(*S*) ⊗ *F*(*T*) = *F*(*S* × *T*). In most typical cases, any vector space can be immediately understood as the free vector space for some set, so this definition suffices. However, there is also an explicit way of constructing the tensor product directly from *V*, *W*, without appeal to *S*, *T*.

In general, given two vector spaces *V* and *W* over a field *K*, the tensor product *U* of *V* and *W*, denoted as *U* = *V* ⊗ *W* is defined as the vector space whose elements and operations are constructed as follows:

From the Cartesian product *V* × *W*, the free vector space *F*(*V* × *W*) over *K* is formed. The vectors of *V* ⊗ *W* are then defined to be the equivalence classes of the congruence generated by the following relations on *F*(*V* × *W*):

The operations of *V* ⊗ *W*, i.e. the map of vector addition + : *U* × *U* → *U* and scalar multiplication ⋅ : *K* × *U* → *U* are defined to be the respective operations +_{F} and ⋅_{F} from *F*(*V* × *W*), acting on *any* representatives

in the involved equivalence classes outputting the one equivalence class of the result.

The result is independent of which representatives of the involved classes have been chosen. In other words, the operations are well-defined.

In other words, the tensor product *V* ⊗ *W* is defined as the quotient space *F*(*V* × *W*)/*N*, where *N* is the subspace of *F*(*V* × *W*) consisting of the equivalence class of the zero element, *N* = [∅], ∅ ∈ *F*(*V* × *W*), under the equivalence relation of above. The following expression explicitly gives the subspace *N*:^{[2]}

In the quotient, where *N* is mapped to the zero vector, the following equalities,

all *hold* (unlike in *F*(*V* × *W*)), which is exactly what is desired. In these latter expressions, the (*v*_{1}, *w*), etc., are images in the quotient of vectors in the free product under the quotient map. Usually, some other notation is employed for them, see below.

### Notation

Elements of *V* ⊗ *W* are often referred to as *tensors*, although this term refers to many other related concepts as well.^{[3]} If *v* belongs to *V* and *w* belongs to *W*, then the equivalence class of (*v*, *w*) is denoted by *v* ⊗ *w*, which is called the tensor product of *v* with *w*. In physics and engineering, this use of the "⊗" symbol refers specifically to the outer product operation; the result of the outer product *v* ⊗ *w* is one of the standard ways of representing the equivalence class *v* ⊗ *w*.^{[4]} An element of *V* ⊗ *W* that can be written in the form *v* ⊗ *w* is called a *pure* or *simple tensor*. In general, an element of the tensor product space is not a pure tensor, but rather a finite linear combination of pure tensors. For example, if *v*_{1} and *v*_{2} are linearly independent, and *w*_{1} and *w*_{2} are also linearly independent, then *v*_{1} ⊗ *w*_{1} + *v*_{2} ⊗ *w*_{2} cannot be written as a pure tensor. The number of simple tensors required to express an element of a tensor product is called the tensor rank (not to be confused with tensor order, which is the number of spaces one has taken the product of, in this case 2; in notation, the number of indices), and for linear operators or matrices, thought of as (1, 1) tensors (elements of the space *V* ⊗ *V*^{∗}), it agrees with matrix rank.

### Dimension

Given bases {*v _{i}*} and {

*w*} for

_{j}*V*and

*W*respectively, the tensors {

*v*⊗

_{i}*w*} form a basis for

_{j}*V*⊗

*W*. Therefore, if

*V*and

*W*are finite-dimensional, the dimension of the tensor product is the product of dimensions of the original spaces; for instance

**R**

^{m}⊗

**R**

^{n}is isomorphic to

**R**

^{mn}.

### Tensor product of linear maps

The tensor product also operates on linear maps between vector spaces. Specifically, given two linear maps *S* : *V* → *X* and *T* : *W* → *Y* between vector spaces, the *tensor product of the two linear maps* *S* and *T* is a linear map

defined by

In this way, the tensor product becomes a bifunctor from the category of vector spaces to itself, covariant in both arguments.^{[5]}

If *S* and *T* are both injective, surjective, or continuous then *S* ⊗ *T* is, respectively, injective, surjective, continuous.

By choosing bases of all vector spaces involved, the linear maps *S* and *T* can be represented by matrices. Then, the matrix describing the tensor product *S* ⊗ *T* is the Kronecker product of the two matrices. For example, if *V*, *X*, *W*, and *Y* above are all two-dimensional and bases have been fixed for all of them, and *S* and *T* are given by the matrices

respectively, then the tensor product of these two matrices is

The resultant rank is at most 4, and thus the resultant dimension is 4. Here rank denotes the tensor rank (number of requisite indices), while the matrix rank counts the number of degrees of freedom in the resulting array.

A dyadic product is the special case of the tensor product between two vectors of the same dimension.

### Universal property

The tensor product as defined above satisfies a universal property. In this context, this means that the tensor product is uniquely defined, up to isomorphism: there is only one tensor product. In the context of linear algebra and vector spaces, the maps in question are required to be linear maps. The tensor product of vector spaces, as defined above, satisfies the following universal property: there is a bilinear map (i.e., linear in each variable *v* and *w*) *φ* : *V* × *W* → *V* ⊗ *W* such that given *any* other vector space *Z* together with a bilinear map *h* : *V* × *W* → *Z*, there is a unique linear map : *V* ⊗ *W* → *Z* satisfying *h* = ∘ *φ*. In this sense, *φ* is the most general bilinear map that can be built from *V* × *W*. In particular, this implies that any spaces with such a (uniquely defined) tensor product are examples of symmetric monoidal categories, as this is the defining characteristic of the category. Uniqueness of the tensor product means that for any other bilinear map *φ*′ : *V* × *W* → *V* ⊗′ *W* with the above property there is an isomorphism *k* : *V* ⊗ *W* → *V* ⊗′ *W* such that *φ*′ = *k* ∘ *φ* holds.

This characterization can simplify proving statements about the tensor product. For example, the tensor product is symmetric: that is, there is a canonical isomorphism:

To construct, say, a map from left to right, it suffices, by the universal property, to give a bilinear map *V* × *W* → *W* ⊗ *V*. This is done by mapping (*v*, *w*) to *w* ⊗ *v*. Constructing a map in the opposite direction is done similarly, as is checking that the two linear maps *V* ⊗ *W* → *W* ⊗ *V* and *W* ⊗ *V* → *V* ⊗ *W* are inverse to one another.

Similar reasoning can be used to show that the tensor product is associative, that is, there are natural isomorphisms

Therefore, it is customary to omit the parentheses and write *V*_{1} ⊗ *V*_{2} ⊗ *V*_{3}.

### Tensor powers and braiding

Let *n* be a non-negative integer. The *n*th **tensor power** of the vector space *V* is the *n*-fold tensor product of *V* with itself. That is

A permutation *σ* of the set {1, 2, ..., *n*} determines a mapping of the *n*th Cartesian power of *V* as follows:

Let

be the natural multilinear embedding of the Cartesian power of *V* into the tensor power of *V*. Then, by the universal property, there is a unique isomorphism

such that

The isomorphism *τ _{σ}* is called the

**braiding map**associated to the permutation

*σ*.

## Product of tensors

For non-negative integers *r* and *s* a (*r*,*s*)-tensor on a vector space *V* is an element of

Here *V*^{∗} is the dual vector space (which consists of all linear maps *f* from *V* to the ground field *K*).

There is a product map, called the *(tensor) product of tensors*

It is defined by grouping all occurring "factors" *V* together: writing *v*_{i} for an element of *V* and *f*_{i} for elements of the dual space,

Picking a basis of *V* and the corresponding dual basis of *V*^{∗}, *T* *r**s*(*V*) is endowed with a natural basis (this basis is described in the article on Kronecker products). In terms of these bases, the components of a (tensor) product of two (or more) tensors can be computed. For example, if *F* and *G* are two covariant tensors of rank *m* and *n* respectively (i.e. *F* ∈ *T* 0*m*, and *G* ∈ *T* 0*n*), then the components of their tensor product are given by

^{[6]}
Thus, the components of the tensor product of two tensors are the ordinary product of the components of each tensor. Another example: let **U** be a tensor of type (1, 1) with components *U ^{α}_{β}*, and let

**V**be a tensor of type (1, 0) with components

*V*

^{γ}. Then

and

## Relation to dual space

A particular example is the tensor product of some vector space *V* with its dual vector space *V*^{∗} (which consists of all linear maps *f* from *V* to the ground field *K*). In this case, there is a natural "evaluation" map

which on elementary tensors is defined by

The resulting map

is called tensor contraction (for *r*, *s* > 0).

On the other hand, if *V* is *finite-dimensional*, there is a map in the other direction (called coevaluation)

where *v*_{1}, ..., *v*_{n} is a basis of *V*, and *v*_{i}^{∗} is its dual basis. The interplay of evaluation and coevaluation map can be used to characterize finite-dimensional vector spaces without referring to bases.^{[7]}

### Tensor product vs. Hom

Given two finite dimensional vector spaces *U*, *V*, denote the dual space of *U* as *U**, we have the following relation:

an isomorphism can be defined by , when acting on pure tensors

its "inverse" can be defined in a similar manner as above (Relation to dual space) using dual basis ,

This result implies

which automatically gives the important fact that forms a basis for where are bases of *U* and *V*.

Furthermore, given three vector spaces *U*, *V*, *W* the tensor product is linked to the vector space of *all* linear maps, as follows:

Here Hom(-,-) denotes the *K*-vector space of all linear maps. This is an example of adjoint functors: the tensor product is "left adjoint" to Hom.

### Adjoint representation

The tensor may be naturally viewed as a module for the Lie algebra End(*V*) by means of the diagonal action: for simplicity let us assume *r* = *s* = 1, then, for each *u* ∈ End(*V*),

where *u*^{∗} in End(*V*^{∗}) is the transpose of *u*, that is, in terms of the obvious pairing on *V* ⊗ *V*^{∗},

- .

There is a canonical isomorphism given by

Under this isomorphism, every *u* in End(*V*) may be first viewed as an endomorphism of and then viewed as an endomorphism of End(*V*). In fact it is the adjoint representation ad(*u*) of End(*V*).

## Tensor products of modules over a ring

The tensor product of two modules *A* and *B* over a *commutative* ring *R* is defined in exactly the same way as the tensor product of vector spaces over a field:

where now *F*(*A* × *B*) is the free *R*-module generated by the cartesian product and *G* is the *R*-module generated by the same relations as above.

More generally, the tensor product can be defined even if the ring is non-commutative (*ab* ≠ *ba*). In this case *A* has to be a right-*R*-module and *B* is a left-*R*-module, and instead of the last two relations above, the relation

is imposed. If *R* is non-commutative, this is no longer an *R*-module, but just an abelian group.

The universal property also carries over, slightly modified: the map *φ* : *A* × *B* → *A* ⊗_{R} *B* defined by (*a*, *b*) → *a* ⊗ *b* is a middle linear map (referred to as "the canonical middle linear map".^{[8]}); that is,^{[9]} it satisfies:

The first two properties make *φ* a bilinear map of the abelian group *A* × *B*. For any middle linear map *ψ* of *A* × *B*, a unique group homomorphism *f* of *A* ⊗_{R} *B* satisfies *ψ* = *f* ∘ *φ*, and this property determines within group isomorphism. See the main article for details.

### Computing the tensor product

For vector spaces, the tensor product *V* ⊗ *W* is quickly computed since bases of *V* of *W* immediately determine a basis of *V* ⊗ *W*, as was mentioned above. For modules over a general (commutative) ring, not every module is free. For example, **Z**/*n***Z** is not a free abelian group (= **Z**-module). The tensor product with **Z**/*n***Z** is given by

More generally, given a presentation of some *R*-module *M*, that is, a number of generators *m*_{i} ∈ *M*, *i* ∈ *I* together with relations , with , the tensor product can be computed as the following cokernel:

Here *N*^{J} := ⨁_{j ∈ J} *N* and the map is determined by sending some *n* ∈ *N* in the *j*th copy of *N*^{J} to *a*_{ji}*n* (in *N*^{I}). Colloquially, this may be rephrased by saying that a presentation of *M* gives rise to a presentation of *M* ⊗_{R} *N*. This is referred to by saying that the tensor product is a right exact functor. It is not in general left exact, that is, given an injective map of *R*-modules *M*_{1} → *M*_{2}, the tensor product

is not usually injective. For example, tensoring the (injective) map given by multiplication with *n*, *n* : **Z** → **Z** with **Z**/*n***Z** yields the zero map 0 : **Z**/*n***Z** → **Z**/*n***Z**, which is not injective. Higher Tor functors measure the defect of the tensor product being not left exact. All higher Tor functors are assembled in the derived tensor product.

## Tensor product of algebras

Let *R* be a commutative ring. The tensor product of *R*-modules applies, in particular, if *A* and *B* are *R*-algebras. In this case, the tensor product *A* ⊗_{R} *B* is an *R*-algebra itself by putting

For example,

A particular example is when *A* and *B* are fields containing a common subfield *R*. The tensor product of fields is closely related to Galois theory: if, say, *A* = *R*[*x*] / *f*(*x*), where *f* is some irreducible polynomial with coefficients in *R*, the tensor product can be calculated as

where now *f* is interpreted as the same polynomial, but with its coefficients regarded as elements of *B*. In the larger field *B*, the polynomial may become reducible, which brings in Galois theory. For example, if *A* = *B* is a Galois extension of *R*, then

is isomorphic (as an *A*-algebra) to the *A*^{deg(f)}.

## Eigenconfigurations of Tensors

Square matrices *A* with entries in a field *K* represent linear maps of vector spaces, say , and thus linear maps of projective spaces over . If is nonsingular then is well-defined everywhere, and the eigenvectors of correspond to the fixed points of . The *eigenconfiguration* of consists of points in , provided is generic and is algebraically closed. The fixed points of nonlinear maps are the eigenvectors of tensors.
Let be a -dimensional tensor of format with entries lying in an algebraically closed field of characteristic zero. Such a tensor defines polynomial maps and with coordinates

Thus each of the coordinates of is a homogeneous polynomial of degree in . The eigenvectors of are the solutions of the constraint

and the eigenconfiguration is given by the variety of the minors of this matrix.^{[10]}

## Other examples of tensor products

### Tensor product of sheaves of modules

### Tensor product of Hilbert spaces

### Topological tensor product

### Tensor product of graded vector spaces

### Tensor product of quadratic forms

### Tensor product of multilinear forms

Given two multilinear forms and on a vector space over the field their tensor product is the multilinear form

^{[11]}

This is a special case of the product of tensors if they are seen as multilinear maps (see also tensors as multilinear maps). Thus the components of the tensor product of multilinear forms can be computed by the Kronecker product.

### Tensor product of graphs

It should be mentioned that, though called "tensor product", this is not a tensor product of graphs in the above sense; actually it is the category-theoretic product in the category of graphs and graph homomorphisms. However it is actually the Kronecker tensor product of the adjacency matrices of the graphs. Compare also the section Tensor product of linear maps above.

### Monoidal categories

A general context for tensor product is that of a monoidal category.

## Applications

### Exterior and symmetric algebra

Two notable constructions in linear algebra can be constructed as quotients of the tensor product: the exterior algebra and the symmetric algebra. For example, given a vector space *V*, the exterior product

is defined as

Note that when *V'*s underlying field does not have characteristic 2, then this definition is equivalent to

The image of in the exterior product is usually denoted and satisfies, by construction, . Similar constructions are possible for (*n* factors), giving rise to , the *n*-th exterior power of *V*. The latter notion is the basis of differential *n*-forms.

The symmetric algebra is constructed in a similar manner:

That is, in the symmetric algebra two adjacent vectors (and therefore all of them) can be interchanged. The resulting objects are called symmetric tensors.

### Tensor product of line bundles

## Tensor product in programming

### Array programming languages

Array programming languages may have this pattern built in. For example, in APL the tensor product is expressed as (for example or ). In J the tensor product is the dyadic form of ***/** (for example **a */ b** or ** a */ b */ c**).

Note that J's treatment also allows the representation of some tensor fields, as **a** and **b** may be functions instead of constants. This product of two functions is a derived function, and if **a** and **b** are differentiable, then **a */ b** is differentiable.

However, these kinds of notation are not universally present in array languages. Other array languages may require explicit treatment of indices (for example, MATLAB), and/or may not support higher-order functions such as the Jacobian derivative (for example, Fortran/APL).

## See also

Look up in Wiktionary, the free dictionary.tensor product |

- Dyadic product
- Extension of scalars
- Multilinear subspace learning
- Tensor algebra
- Tensor contraction
- Topological tensor product
- Monoidal category

## Notes

- ↑ In a fancier language,
*δ*is Dirac's delta function with point mass at_{s}*s*when*S*is viewed as a discrete space. - ↑ Lee, J. M. (2003),
*Introduction to Smooth manifolds*, Springer Graduate Texts in Mathematics,**218**, ISBN 0-387-95448-1 - ↑ See Tensor or Tensor (intrinsic definition).
- ↑ This similar to how the engineering use of "" specifically returns the remainder, one of the many elements of the equivalence class.
- ↑ Hazewinkel, Michiel; Gubareni, Nadezhda Mikhaĭlovna; Gubareni, Nadiya; Kirichenko, Vladimir V. (2004).
*Algebras, rings and modules*. Springer. p. 100. ISBN 978-1-4020-2690-4. - ↑ Analogous formulas also hold for contravariant tensors, as well as tensors of mixed variance. Although in many cases such as when there is an inner product defined, the distinction is irrelevant.
- ↑ See Compact closed category.
- ↑ Hungerford, Thomas W. (1974).
*Algebra*. Springer. ISBN 0-387-90518-9. - ↑ Chen, Jungkai Alfred (Spring 2004), "Tensor product" (PDF),
*Advanced Algebra II*(lecture notes), National Taiwan University - ↑ Abo, H.; Seigal, A.; Sturmfels B. arXiv:1505.05729 [math.AG]
- ↑ Tu, L. W. (2010).
*An Introduction to Manifolds*. Universitext. Springer. p. 25. ISBN 978-1-4419-7399-3.

## References

- Bourbaki, Nicolas (1989).
*Elements of mathematics, Algebra I*. Springer-Verlag. ISBN 3-540-64243-9. - Halmos, Paul (1974).
*Finite dimensional vector spaces*. Springer. ISBN 0-387-90093-4.. - Lang, Serge (2002),
*Algebra*, Graduate Texts in Mathematics,**211**(Revised third ed.), New York: Springer-Verlag, ISBN 978-0-387-95385-4, Zbl 0984.00001, MR 1878556 - Mac Lane, S.; Birkhoff, G. (1999).
*Algebra*. AMS Chelsea. ISBN 0-8218-1646-2. - Aguiar, M.; Mahajan, S. (2010).
*Monoidal functors, species and Hopf algebras*. CRM Monograph Series Vol 29. ISBN 0-8218-4776-7. - "Bibliography on the nonabelian tensor product of groups".