Puneet Varma (Editor)

Tensor product

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In mathematics, the tensor product V W of two vector spaces V and W (over the same field) is itself a vector space, together with an operation of bilinear composition, denoted by , from ordered pairs in the Cartesian product V × W into V W , in a way that generalizes the outer product. The tensor product of V and W is the vector space generated by the symbols v w , with v V and w W , in which the relations of bilinearity are imposed for the product operation , and no other relations are assumed to hold. The tensor product space is thus the "freest" (or most general) such vector space, in the sense of having the least constraints.

Contents

The tensor product of (finite dimensional) vector spaces has dimension equal to the product of the dimensions of the two factors:

dim ( V W ) = dim V dim W .

In particular, this distinguishes the tensor product from the direct sum vector space, whose dimension is the sum of the two summands:

dim ( V W ) = dim V + dim W .

More generally, the tensor product can be extended to other categories of mathematical objects in addition to vector spaces, such as to matrices, tensors, algebras, topological vector spaces, and modules. In each such case the tensor product is characterized by a similar universal property: it is the freest bilinear operation. 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 VK W, or VW when the underlying field K is understood.

If V has a basis e 1 , , e m and W has a basis f 1 , , f n , then the tensor product V W can be taken to be a vector space spanned by a basis consisting of all pairs ( e i , f j ) ; each such basis element of V W is denoted e i f j . For any vectors v = i v i e i V and w = j w j f j W , there is a corresponding product vector v w in V W given by i j v i w j ( e i f j ) V W . This product operation : V × W V W is quickly verified to be bilinear.

As an example, letting V = W = R 3 (considered as a vector space over the field of real numbers) and considering the standard basis set { x ^ , y ^ , z ^ } for each, the tensor product V W is spanned by the nine basis vectors { x ^ x ^ , x ^ y ^ , x ^ z ^ , y ^ x ^ , y ^ y ^ , y ^ z ^ , z ^ x ^ , z ^ y ^ , z ^ z ^ } , and is isomorphic to R 9 . For vectors v = ( 1 , 2 , 3 ) , w = ( 1 , 0 , 0 ) R 3 , the tensor product v w = x ^ x ^ + 2 y ^ x ^ + 3 z ^ x ^ .

The above definition relies on a choice of basis, which can not be done canonically for a generic vector space. However, 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.

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. F(S) is defined as 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 over K with the usual addition and scalar multiplication of functions. It has a basis parameterized by S. Indeed, for each s in S we define

{ δ s : S K δ s ( t ) = { 1 t = s 0 t s

Then {δs | sS} is a basis for F(S), since each element g of F(S) can be uniquely written as a linear combination of δs, and because of the restriction that g has finite support, this linear combination consists of finitely many terms. Because of this explicit expression, an element of 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 = VW 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 VW are then defined to be the equivalence classes of the congruence generated by the following relations on F(V × W):

v , v 1 , v 2 V , w , w 1 , w 2 W , c K : ( v 1 , w ) + ( v 2 , w ) ( v 1 + v 2 , w ) , ( v , w 1 ) + ( v , w 2 ) ( v , w 1 + w 2 ) , c ( v , w ) ( c v , w ) , c ( v , w ) ( v , c w ) .

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

u ~ 1 , u ~ 2

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

u ~ 1 u 1 , u ~ 2 u 2 ( + ) : ( u 1 , u 2 ) [ u ~ 1 + F u ~ 2 ] u ~ 1 u 1 ( ) : ( c , u 1 ) [ c F u ~ 1 ]

The result can be proven to be 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 VW 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. In this way, because it is a quotient of the free vector space by the subspace generated by the relations, it is the freest such vector space. For this reason, the tensor product V W can also be characterised by a universal property.

The following expression explicitly gives the subspace N:

N = span ( { u F ( V × W ) | v , v 1 , v 2 V , w , w 1 , w 2 W , c K : u = ( v 1 , w ) + ( v 2 , w ) ( v 1 + v 2 , w ) u = ( v , w 1 ) + ( v , w 2 ) ( v , w 1 + w 2 ) u = c ( v , w ) ( c v , w ) u = c ( v , w ) ( v , c w ) } ) .

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

( v 1 , w ) + ( v 2 , w ) = ( v 1 + v 2 , w ) , ( v , w 1 ) + ( v , w 2 ) = ( v , w 1 + w 2 ) , c ( v , w ) = ( c v , w ) , c ( v , w ) = ( v , c w )

all hold (unlike in F(V × W)), which is exactly what is desired. In these latter expressions, the (v1, 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 VW are often referred to as tensors, although this term refers to many other related concepts as well. If v belongs to V and w belongs to W, then the equivalence class of (v, w) is denoted by vw, 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 vw is one of the standard ways of representing the equivalence class vw. An element of VW that can be written in the form vw 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 v1 and v2 are linearly independent, and w1 and w2 are also linearly independent, then v1w1 + v2w2 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 VV), it agrees with matrix rank.

Dimension

Given bases {vi} and {wj} for V and W respectively, the tensors {viwj} form a basis for VW. 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 RmRn is isomorphic to Rmn.

Tensor product of linear maps

The tensor product also operates on linear maps between vector spaces. Specifically, given two linear maps S : VX and T : WY between vector spaces, the tensor product of the two linear maps S and T is a linear map

S T : V W X Y

defined by

( S T ) ( v w ) = S ( v ) T ( w ) .

In this way, the tensor product becomes a bifunctor from the category of vector spaces to itself, covariant in both arguments.

If S and T are both injective, surjective, or continuous then ST 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 ST 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

[ a 1 , 1 a 1 , 2 a 2 , 1 a 2 , 2 ] , [ b 1 , 1 b 1 , 2 b 2 , 1 b 2 , 2 ] ,

respectively, then the tensor product of these two matrices is

[ a 1 , 1 a 1 , 2 a 2 , 1 a 2 , 2 ] [ b 1 , 1 b 1 , 2 b 2 , 1 b 2 , 2 ] = [ a 1 , 1 [ b 1 , 1 b 1 , 2 b 2 , 1 b 2 , 2 ] a 1 , 2 [ b 1 , 1 b 1 , 2 b 2 , 1 b 2 , 2 ] a 2 , 1 [ b 1 , 1 b 1 , 2 b 2 , 1 b 2 , 2 ] a 2 , 2 [ b 1 , 1 b 1 , 2 b 2 , 1 b 2 , 2 ] ] = [ a 1 , 1 b 1 , 1 a 1 , 1 b 1 , 2 a 1 , 2 b 1 , 1 a 1 , 2 b 1 , 2 a 1 , 1 b 2 , 1 a 1 , 1 b 2 , 2 a 1 , 2 b 2 , 1 a 1 , 2 b 2 , 2 a 2 , 1 b 1 , 1 a 2 , 1 b 1 , 2 a 2 , 2 b 1 , 1 a 2 , 2 b 1 , 2 a 2 , 1 b 2 , 1 a 2 , 1 b 2 , 2 a 2 , 2 b 2 , 1 a 2 , 2 b 2 , 2 ] .

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 × WVW such that given any other vector space Z together with a bilinear map h : V × WZ, there is a unique linear map ~h : VWZ satisfying h = ~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 × WV ⊗′ W with the above property there is an isomorphism k : VWV ⊗′ 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:

V W W V .

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

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

V 1 ( V 2 V 3 ) ( V 1 V 2 ) V 3 .

Therefore, it is customary to omit the parentheses and write V1V2V3.

Tensor powers and braiding

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

V n = d e f V V n .

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

{ σ : V n V n σ ( v 1 , v 2 , , v n ) = ( v σ ( 1 ) , v σ ( 2 ) , , v σ ( n ) )

Let

φ : V n V n

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

τ σ : V n V n

such that

φ σ = τ σ φ .

The isomorphism τσ is called the braiding map associated to the permutation σ.

Product of tensors

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

T s r ( V ) = V V r V V s = V r V s .

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

T s r ( V ) K T s r ( V ) T s + s r + r ( V ) .

It is defined by grouping all occurring "factors" V together: writing vi for an element of V and fi for elements of the dual space,

( v 1 f 1 ) ( v 1 ) = v 1 v 1 f 1 .

Picking a basis of V and the corresponding dual basis of V naturally induces a basis for Tr
s
(V)
(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. FT 0
m
, and GT 0
n
), then the components of their tensor product are given by

( F G ) i 1 i 2 i m + n = F i 1 i 2 i m G i m + 1 i m + 2 i m + 3 i m + n .

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

U α β V γ = ( U V ) α β γ

and

V μ U ν σ = ( V U ) μ ν σ .

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 canonical evaluation map

V V K

which on elementary tensors is defined by

v f f ( v ) .

The resulting map

T s r ( V ) T s 1 r 1 ( V )

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

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

K V V , λ i λ v i v i .

where v1, ..., vn is any basis of V, and vi is its dual basis. Surprisingly, this map does not depend on our choice of basis.

The interplay of evaluation and coevaluation map can be used to characterize finite-dimensional vector spaces without referring to bases.

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:

U V H o m ( U , V ) ,

an isomorphism can be defined by α : U V H o m ( U , V ) , when acting on pure tensors

u v ( u v ) ( u ) = u ( u ) v ,

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

H o m ( U , V ) U V , f ( ) i u i f ( u i ) .

This result implies

dim ( U V ) = dim ( U ) dim ( V )

which automatically gives the important fact that { u i v j } forms a basis for U V where { u i } , { v j } 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:

H o m ( U V , W ) H o m ( U , H o m ( V , W ) ) .

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 T s r ( V ) 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),

u ( a b ) = u ( a ) b a u ( b ) ,

where u in End(V) is the transpose of u, that is, in terms of the obvious pairing on VV,

u ( a ) , b = a , u ( b ) .

There is a canonical isomorphism T 1 1 ( V ) E n d ( V ) given by

( a b ) ( x ) = x , b a .

Under this isomorphism, every u in End(V) may be first viewed as an endomorphism of T 1 1 ( V ) 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:

A R B := F ( A × B ) / G

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 (abba). 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

( a r , b ) ( a , r b )

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 × BAR B defined by (a, b) ↦ ab is a middle linear map (referred to as "the canonical middle linear map".); that is, it satisfies:

ϕ ( a + a , b ) = ϕ ( a , b ) + ϕ ( a , b ) ϕ ( a , b + b ) = ϕ ( a , b ) + ϕ ( a , b ) ϕ ( a r , b ) = ϕ ( a , r b )

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 AR 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 VW is quickly computed since bases of V of W immediately determine a basis of VW, as was mentioned above. For modules over a general (commutative) ring, not every module is free. For example, Z/nZ is not a free abelian group (= Z-module). The tensor product with Z/nZ is given by

M Z Z / n Z = M / n M .

More generally, given a presentation of some R-module M, that is, a number of generators miM, iI together with relations j J a j i m i = 0 , with , the tensor product can be computed as the following cokernel:

M R N = coker ( N J N I )

Here NJ := ⨁jJ N and the map is determined by sending some nN in the jth copy of NJ to ajin (in NI). Colloquially, this may be rephrased by saying that a presentation of M gives rise to a presentation of MR 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 M1M2, the tensor product

M 1 R N M 2 R N

is not usually injective. For example, tensoring the (injective) map given by multiplication with n, n : ZZ with Z/nZ yields the zero map 0 : Z/nZZ/nZ, 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 AR B is an R-algebra itself by putting

( a 1 b 1 ) ( a 2 b 2 ) = ( a 1 a 2 ) ( b 1 b 2 ) .

For example,

R [ x ] R R [ y ] R [ x , y ] .

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

A R B B [ x ] / f ( x )

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

A R A A [ x ] / f ( x )

is isomorphic (as an A-algebra) to the Adeg(f).

Eigenconfigurations of tensors

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

ψ i ( x 1 , . . . , x n ) = j 2 = 1 n j 3 = 1 n j d = 1 n a i j 2 j 3 j d x j 2 x j 3 x j d for  i = 1 , . . . , n

Thus each of the n coordinates of ψ is a homogeneous polynomial ψ i of degree d 1 in x = ( x 1 , . . . , x n ) . The eigenvectors of A are the solutions of the constraint

rank ( x 1 x 2 x n ψ 1 ( x ) ψ 2 ( x ) ψ n ( x ) ) 1

and the eigenconfiguration is given by the variety of the 2 × 2 minors of this matrix.

Tensor product of multilinear forms

Given two multilinear forms f ( x 1 , , x k ) and g ( x 1 , , x m ) on a vector space V over the field K their tensor product is the multilinear form

( f g ) ( x 1 , , x k + m ) = f ( x 1 , , x k ) g ( x k + 1 , , x k + m ) .

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.

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

V V

is defined as

V V / ( v v  for all  v V ) .

Note that when the underlying field of V does not have characteristic 2, then this definition is equivalent to

V V / ( v 1 v 2 + v 2 v 1  for all  v 1 , v 2 V ) .

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

The symmetric algebra is constructed in a similar manner:

Sym n V := V V n / ( v i v i + 1 v i + 1 v i )

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

Array programming languages

Array programming languages may have this pattern built in. For example, in APL the tensor product is expressed as ○.× (for example A ○.× B or A ○.× B ○.× C). 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).

References

Tensor product Wikipedia


Similar Topics