In mathematics, the tensor product formula_1 of two vector spaces formula_2 and formula_3 (over the same field) is a vector space to which is associated a bilinear map formula_4 that maps a pair formula_5 to an element of formula_1 denoted . An element of the form formula_7 is called the tensor product of formula_8 and formula_9. An element of formula_1 is a tensor, and the tensor product of two vectors is sometimes called an "elementary tensor" or a "decomposable tensor". The elementary tensors span formula_1 in the sense that every element of formula_1 is a sum of elementary tensors. If bases are given for formula_2 and formula_3, a basis of formula_1 is formed by all tensor products of a basis element of formula_2 and a basis element of formula_3. The tensor product of two vector spaces captures the properties of all bilinear maps in the sense that a bilinear map from formula_18 into another vector space formula_19 factors uniquely through a linear map formula_20 (see the section below titled 'Universal property'), i.e. the bilinear map is associated to a unique linear map from the tensor product formula_1 to formula_19. Tensor products are used in many application areas, including physics and engineering. For example, in general relativity, the gravitational field is described through the metric tensor, which is a tensor field with one tensor at each point of the space-time manifold, and each belonging to the tensor product of the cotangent space at the point with itself. Definitions and constructions. The "tensor product" of two vector spaces is a vector space that is defined up to an isomorphism. There are several equivalent ways to define it. Most consist of defining explicitly a vector space that is called a tensor product, and, generally, the equivalence proof results almost immediately from the basic properties of the vector spaces that are so defined. The tensor product can also be defined through a universal property; see , below. As for every universal property, all objects that satisfy the property are isomorphic through a unique isomorphism that is compatible with the universal property. When this definition is used, the other definitions may be viewed as constructions of objects satisfying the universal property and as proofs that there are objects satisfying the universal property, that is that tensor products exist. From bases. Let and be two vector spaces over a field , with respective bases formula_23 and . The "tensor product" formula_1 of and is a vector space that has as a basis the set of all formula_25 with formula_26 and . This definition can be formalized in the following way (this formalization is rarely used in practice, as the preceding informal definition is generally sufficient): formula_1 is the set of the functions from the Cartesian product formula_28 to that have a finite number of nonzero values. The pointwise operations make formula_1 a vector space. The function that maps formula_30 to and the other elements of formula_28 to is denoted . The set formula_32 is then straightforwardly a basis of , which is called the "tensor product" of the bases formula_23 and . We can equivalently define formula_1 to be the set of bilinear forms on formula_35 that are nonzero at only a finite number of elements of . To see this, given formula_36 and a bilinear form , we can decompose formula_37 and formula_38 in the bases formula_23 and formula_40 as: formula_41 where only a finite number of formula_42's and formula_43's are nonzero, and find by the bilinearity of formula_44 that: formula_45 Hence, we see that the value of formula_44 for any formula_36 is uniquely and totally determined by the values that it takes on . This lets us extend the maps formula_25 defined on formula_28 as before into bilinear maps formula_50 , by letting: formula_51 Then we can express any bilinear form formula_44 as a (potentially infinite) formal linear combination of the formula_25 maps according to: formula_54 making these maps similar to a Schauder basis for the vector space formula_55 of all bilinear forms on . To instead have it be a proper Hamel basis, it only remains to add the requirement that formula_44 is nonzero at an only a finite number of elements of , and consider the subspace of such maps instead. In either construction, the "tensor product of two vectors" is defined from their decomposition on the bases. More precisely, taking the basis decompositions of formula_57 and formula_58 as before: formula_59 This definition is quite clearly derived from the coefficients of formula_60 in the expansion by bilinearity of formula_61 using the bases formula_23 and , as done above. It is then straightforward to verify that with this definition, the map formula_63 is a bilinear map from formula_18 to formula_65 satisfying the universal property that any construction of the tensor product satisfies (see below). If arranged into a rectangular array, the coordinate vector of formula_66 is the outer product of the coordinate vectors of formula_37 and . Therefore, the tensor product is a generalization of the outer product, that is, an abstraction of it beyond coordinate vectors. A limitation of this definition of the tensor product is that, if one changes bases, a different tensor product is defined. However, the decomposition on one basis of the elements of the other basis defines a canonical isomorphism between the two tensor products of vector spaces, which allows identifying them. Also, contrarily to the two following alternative definitions, this definition cannot be extended into a definition of the tensor product of modules over a ring. As a quotient space. A construction of the tensor product that is basis independent can be obtained in the following way. Let and be two vector spaces over a field. One considers first a vector space that has the Cartesian product formula_18 as a basis. That is, the basis elements of are the pairs formula_30 with formula_70 and . To get such a vector space, one can define it as the vector space of the functions formula_71 that have a finite number of nonzero values and identifying formula_30 with the function that takes the value on formula_30 and otherwise. Let be the linear subspace of that is spanned by the relations that the tensor product must satisfy. More precisely, is spanned by the elements of one of the forms: formula_74 where , formula_75 and . Then, the tensor product is defined as the quotient space: formula_76 and the image of formula_30 in this quotient is denoted . It is straightforward to prove that the result of this construction satisfies the universal property considered below. (A very similar construction can be used to define the tensor product of modules.) Universal property. In this section, the universal property satisfied by the tensor product is described. As for every universal property, two objects that satisfy the property are related by a unique isomorphism. It follows that this is a (non-constructive) way to define the tensor product of two vector spaces. In this context, the preceding constructions of tensor products may be viewed as proofs of existence of the tensor product so defined. A consequence of this approach is that every property of the tensor product can be deduced from the universal property, and that, in practice, one may forget the method that has been used to prove its existence. The "universal-property definition" of the tensor product of two vector spaces is the following (recall that a bilinear map is a function that is "separately" linear in each of its arguments): The "tensor product" of two vector spaces and is a vector space denoted as , together with a bilinear map formula_78 from formula_18 to , such that, for every bilinear map , there is a "unique" linear map , such that formula_80 (that is, formula_81 for every formula_70 and ). Linearly disjoint. Like the universal property above, the following characterization may also be used to determine whether or not a given vector space and given bilinear map form a tensor product. For example, it follows immediately that if and , where formula_83 and formula_84 are positive integers, then one may set formula_85 and define the bilinear map as formula_86 to form the tensor product of formula_87 and . Often, this map formula_88 is denoted by formula_89 so that formula_90 As another example, suppose that formula_91 is the vector space of all complex-valued functions on a set formula_92 with addition and scalar multiplication defined pointwise (meaning that formula_93 is the map formula_94 and formula_95 is the map ). Let formula_92 and formula_88 be any sets and for any formula_98 and , let formula_99 denote the function defined by . If formula_100 and formula_101 are vector subspaces then the vector subspace formula_102 of formula_103 together with the bilinear map: formula_104 form a tensor product of formula_105 and . Properties. Dimension. If and are vector spaces of finite dimension, then formula_65 is finite-dimensional, and its dimension is the product of the dimensions of and . This results from the fact that a basis of formula_65 is formed by taking all tensor products of a basis element of and a basis element of . Associativity. The tensor product is associative in the sense that, given three vector spaces , there is a canonical isomorphism: formula_108 that maps formula_109 to . This allows omitting parentheses in the tensor product of more than two vector spaces or vectors. Commutativity as vector space operation. The tensor product of two vector spaces formula_2 and formula_3 is commutative in the sense that there is a canonical isomorphism: formula_112 that maps formula_7 to . On the other hand, even when , the tensor product of vectors is not commutative; that is , in general. The map formula_114 from formula_115 to itself induces a linear automorphism that is called a . More generally and as usual (see tensor algebra), let formula_116 denote the tensor product of copies of the vector space . For every permutation of the first positive integers, the map: formula_117 induces a linear automorphism of , which is called a braiding map. Tensor product of linear maps. Given a linear map , and a vector space , the "tensor product:" formula_118 is the unique linear map such that: formula_119 The tensor product formula_120 is defined similarly. Given two linear maps formula_121 and , their tensor product: formula_122 is the unique linear map that satisfies: formula_123 One has: formula_124 In terms of category theory, this means that the tensor product is a bifunctor from the category of vector spaces to itself. If and are both injective or surjective, then the same is true for all above defined linear maps. In particular, the tensor product with a vector space is an exact functor; this means that every exact sequence is mapped to an exact sequence (tensor products of modules do not transform injections into injections, but they are right exact functors). By choosing bases of all vector spaces involved, the linear maps and can be represented by matrices. Then, depending on how the tensor formula_7 is vectorized, the matrix describing the tensor product formula_126 is the Kronecker product of the two matrices. For example, if , and above are all two-dimensional and bases have been fixed for all of them, and and are given by the matrices: formula_127 respectively, then the tensor product of these two matrices is: formula_128 The resultant rank is at most 4, and thus the resultant dimension is 4. here denotes the tensor rank i.e. the 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. General tensors. For non-negative integers and a type formula_129 tensor on a vector space is an element of: formula_130 Here formula_131 is the dual vector space (which consists of all linear maps from to the ground field ). There is a product map, called the : formula_132 It is defined by grouping all occurring "factors" together: writing formula_133 for an element of and formula_134 for an element of the dual space: formula_135 If is finite dimensional, then picking a basis of and the corresponding dual basis of formula_131 naturally induces a basis of formula_137 (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 and are two covariant tensors of orders and respectively (i.e. formula_138 and ), then the components of their tensor product are given by: formula_139 Thus, the components of the tensor product of two tensors are the ordinary product of the components of each tensor. Another example: let be a tensor of type with components , and let be a tensor of type formula_140 with components . Then: formula_141 and: formula_142 Tensors equipped with their product operation form an algebra, called the tensor algebra. Evaluation map and tensor contraction. For tensors of type there is a canonical evaluation map: formula_143 defined by its action on pure tensors: formula_144 More generally, for tensors of type , with , there is a map, called tensor contraction: formula_145 On the other hand, if formula_2 is , there is a canonical map in the other direction (called the coevaluation map): formula_149 where formula_150 is any basis of , and formula_151 is its dual basis. This map does not depend on the choice of basis. The interplay of evaluation and coevaluation can be used to characterize finite-dimensional vector spaces without referring to bases. Adjoint representation. The tensor product formula_152 may be naturally viewed as a module for the Lie algebra formula_153 by means of the diagonal action: for simplicity let us assume , then, for each , formula_154 where formula_155 is the transpose of , that is, in terms of the obvious pairing on , formula_156 There is a canonical isomorphism formula_157 given by: formula_158 Under this isomorphism, every in formula_153 may be first viewed as an endomorphism of formula_160 and then viewed as an endomorphism of . In fact it is the adjoint representation of . Linear maps as tensors. Given two finite dimensional vector spaces , over the same field , denote the dual space of as , and the -vector space of all linear maps from to as . There is an isomorphism: formula_161 defined by an action of the pure tensor formula_162 on an element of , formula_163 Its "inverse" can be defined using a basis formula_164 and its dual basis formula_165 as in the section "Evaluation map and tensor contraction" above: formula_166 This result implies: formula_167 which automatically gives the important fact that formula_168 forms a basis of formula_169 where formula_170 are bases of and . Furthermore, given three vector spaces , , the tensor product is linked to the vector space of "all" linear maps, as follows: formula_171 This is an example of adjoint functors: the tensor product is "left adjoint" to Hom. Tensor products of modules over a ring. The tensor product of two modules and over a "commutative" ring is defined in exactly the same way as the tensor product of vector spaces over a field: formula_172 where now formula_173 is the free -module generated by the cartesian product and is the -module generated by these relations. More generally, the tensor product can be defined even if the ring is non-commutative. In this case has to be a right--module and is a left--module, and instead of the last two relations above, the relation: formula_174 is imposed. If is non-commutative, this is no longer an -module, but just an abelian group. The universal property also carries over, slightly modified: the map formula_175 defined by formula_176 is a middle linear map (referred to as "the canonical middle linear map"); that is, it satisfies: formula_177 The first two properties make a bilinear map of the abelian group . For any middle linear map formula_178 of , a unique group homomorphism of formula_179 satisfies , and this property determines formula_180 within group isomorphism. See the main article for details. Tensor product of modules over a non-commutative ring. Let "A" be a right "R"-module and "B" be a left "R"-module. Then the tensor product of "A" and "B" is an abelian group defined by: formula_181 where formula_182 is a free abelian group over formula_183 and G is the subgroup of formula_182 generated by relations: formula_185 The universal property can be stated as follows. Let "G" be an abelian group with a map formula_186 that is bilinear, in the sense that: formula_187 Then there is a unique map formula_188 such that formula_189 for all formula_190 and . Furthermore, we can give formula_179 a module structure under some extra conditions: Computing the tensor product. For vector spaces, the tensor product formula_1 is quickly computed since bases of of immediately determine a basis of , as was mentioned above. For modules over a general (commutative) ring, not every module is free. For example, is not a free abelian group (-module). The tensor product with is given by: formula_198 More generally, given a presentation of some -module , that is, a number of generators formula_199 together with relations: formula_200 the tensor product can be computed as the following cokernel: formula_201 Here , and the map formula_202 is determined by sending some formula_203 in the th copy of formula_204 to formula_205 (in ). Colloquially, this may be rephrased by saying that a presentation of gives rise to a presentation of . 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 -modules , the tensor product: formula_206 is not usually injective. For example, tensoring the (injective) map given by multiplication with , with yields the zero map , 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 be a commutative ring. The tensor product of -modules applies, in particular, if and are -algebras. In this case, the tensor product formula_179 is an -algebra itself by putting: formula_208 For example: formula_209 A particular example is when and are fields containing a common subfield . The tensor product of fields is closely related to Galois theory: if, say, , where is some irreducible polynomial with coefficients in , the tensor product can be calculated as: formula_210 where now is interpreted as the same polynomial, but with its coefficients regarded as elements of . In the larger field , the polynomial may become reducible, which brings in Galois theory. For example, if is a Galois extension of , then: formula_211 is isomorphic (as an -algebra) to the . Eigenconfigurations of tensors. Square matrices formula_212 with entries in a field formula_213 represent linear maps of vector spaces, say , and thus linear maps formula_214 of projective spaces over . If formula_212 is nonsingular then formula_178 is well-defined everywhere, and the eigenvectors of formula_212 correspond to the fixed points of . The "eigenconfiguration" of formula_212 consists of formula_84 points in , provided formula_212 is generic and formula_213 is algebraically closed. The fixed points of nonlinear maps are the eigenvectors of tensors. Let formula_222 be a formula_223-dimensional tensor of format formula_224 with entries formula_225 lying in an algebraically closed field formula_213 of characteristic zero. Such a tensor formula_227 defines polynomial maps formula_228 and formula_229 with coordinates: formula_230 Thus each of the formula_84 coordinates of formula_178 is a homogeneous polynomial formula_233 of degree formula_234 in . The eigenvectors of formula_212 are the solutions of the constraint: formula_236 and the eigenconfiguration is given by the variety of the formula_237 minors of this matrix. Other examples of tensor products. Topological tensor products. Hilbert spaces generalize finite-dimensional vector spaces to arbitrary dimensions. There is an analogous operation, also called the "tensor product," that makes Hilbert spaces a symmetric monoidal category. It is essentially constructed as the metric space completion of the algebraic tensor product discussed above. However, it does not satisfy the obvious analogue of the universal property defining tensor products; the morphisms for that property must be restricted to Hilbert–Schmidt operators. In situations where the imposition of an inner product is inappropriate, one can still attempt to complete the algebraic tensor product, as a topological tensor product. However, such a construction is no longer uniquely specified: in many cases, there are multiple natural topologies on the algebraic tensor product. Tensor product of graded vector spaces. Some vector spaces can be decomposed into direct sums of subspaces. In such cases, the tensor product of two spaces can be decomposed into sums of products of the subspaces (in analogy to the way that multiplication distributes over addition). Tensor product of representations. Vector spaces endowed with an additional multiplicative structure are called algebras. The tensor product of such algebras is described by the Littlewood–Richardson rule. Tensor product of multilinear forms. Given two multilinear forms formula_238 and formula_239 on a vector space formula_2 over the field formula_213 their tensor product is the multilinear form: formula_242 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. The most general setting for the tensor product is the monoidal category. It captures the algebraic essence of tensoring, without making any specific reference to what is being tensored. Thus, all tensor products can be expressed as an application of the monoidal category to some particular setting, acting on some particular objects. Quotient algebras. A number of important subspaces of the tensor algebra can be constructed as quotients: these include the exterior algebra, the symmetric algebra, the Clifford algebra, the Weyl algebra, and the universal enveloping algebra in general. The exterior algebra is constructed from the exterior product. Given a vector space , the exterior product formula_243 is defined as: formula_244 When the underlying field of does not have characteristic 2, then this definition is equivalent to: formula_245 The image of formula_246 in the exterior product is usually denoted formula_247 and satisfies, by construction, . Similar constructions are possible for formula_248 ( factors), giving rise to , the th exterior power of . The latter notion is the basis of differential -forms. The symmetric algebra is constructed in a similar manner, from the symmetric product: formula_249 More generally: formula_250 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 in programming. Array programming languages. Array programming languages may have this pattern built in. For example, in APL the tensor product is expressed as codice_1 (for example codice_2 or codice_3). In J the tensor product is the dyadic form of codice_4 (for example codice_5 or codice_6). J's treatment also allows the representation of some tensor fields, as codice_7 and codice_8 may be functions instead of constants. This product of two functions is a derived function, and if codice_7 and codice_8 are differentiable, then codice_5 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).