Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
tensor[prod] - inner and outer tensor product
Calling Sequence
prod(A, B, [a1, b1], [a2, b2], ...)
Parameters
A, B
-
tensor_type objects of which to find the product
[ai, bi]
pair of integer indices of opposite index character to be contracted over in the (inner) product, the first index being from A, the second from B. The number of index pairs is arbitrary, so long as it does not exceed . If no index pairs are given, the outer product of A and B is formed.
Description
The function prod(A, B, [a1,b1], [a2,b2], ...) computes the inner product of the A and B with contraction taking place over the pairs of indices a1 (from A) and b1 (from B), a2 (from A) and b2 (from B), and so on.
The function prod(A, B) computes the outer product of A and B.
The indices in each pair must be of opposite index character.
There must not be any duplicates in the given indices from each tensor (it is impossible to contract over a single index more than once). Thus, the call prod(A, B, [1,2], [1,3]) is illegal. However, the call prod(A, B, [1,1]) is not illegal (provided the indices are of opposite index character) since there is no repetition of indices from A and no repetition of indices from B.
The return value is the resultant tensor_type object of rank equal to rank(A) + rank(B) - 2 * (# of pairs in the call).
Simplification: This routine uses the `tensor/prod/simp` routine for simplification purposes. The simplification routine is applied to each component of the result after it is computed. By default, `tensor/prod/simp` is initialized to the `tensor/simp` routine. It is recommended that the `tensor/prod/simp` routine be customized to suit the needs of the particular problem.
This function is part of the tensor package, and so can be used in the form prod(..) only after performing the command with(tensor), or with(tensor,prod). This function can always be accessed in the long form tensor[prod](..).
Examples
Create a rank-2 tensor and a rank-1 tensor and form their inner product:
Create another 1-tensor and form the outer and inner products with U:
Find the product of two scalars:
See Also
tensor, tensor/permute_indices, tensor[contract], tensor[simp]
Download Help Document