dot - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


`.`

operator for noncommutative or dot product multiplication

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Calling Sequence

A . B

Parameters

A, B

-

anything

Description

• 

The '.' operator performs noncommutative or dot product multiplication on its arguments.

  

If A and B are numbers (including complex and extended numerics such as infinity and undefined), then A . B = A*B.

  

If A and B are Vectors with the same orientation (i.e., both are row Vectors or both are column Vectors), then A . B is computed by using LinearAlgebra[DotProduct].

  

If one of A and B is a Matrix or a Vector, and the other is a Matrix, Vector or constant and the previous case does not apply, then their product is computed by using LinearAlgebra[Multiply].  See also simplify/rtable.  

  

If A and B are Arrays, their product is computed as component-wise multiplication using zip.  If A and B do not have the same dimensions, extra entries are ignored.

  

Arguments that are not of type Matrix, Vector, constant, or Array are ignored, and A . B remains unevaluated.

• 

Calls to '.' such as A . B . C call `.`(A, B, C).

  

In this case, the process is repeated on the (transformed) arguments until no such argument pairs remain.

• 

The dot operator is left-associative.

• 

Note:  In Maple,  '.' can be interpreted as a decimal point (for example, 3.7), as part of a range operator (for example, x..y), or as the (noncommutative) multiplication operator.  To distinguish between these three circumstances, Maple uses the following rule.

  

Any dot that is not part of a range operator (more than one '.' in a row) and not part of a number is interpreted as the noncommutative multiplication operator.

  

Note that the interpretation of the phrase "not part of a number" depends on whether you are using 1-D or 2-D input mode.  In 1-D input mode, interpretation proceeds from left to right, and a dot following a number will be interpreted as a decimal point unless that number already contains a decimal point.  In 2-D input mode, interpretation is carried out on the expression as a whole, and because spaces and juxtaposition can be interpreted as multiplication, a dot which is immediately preceded or followed by a number is always interpreted as a decimal point.

  

For example, in 1-D input mode, 3.4 is a number, 3. 4 is an error and 3 .4 and 3 . 4 return 12.  3. .4 is 12. and 3..4 is a range.

  

In 2-D input mode, 3.4 is a number, 3. 4 and 3 .4 are errors and 3 . 4 returns 12.  3. .4 is an error and 3..4 is again a range.  (All of the errors shown by these examples are due to the rule that a number cannot appear as the right-hand operand of an implicit multiplication operation. In such cases, use of explicit multiplication ( * ) can avoid the error.  See also 2-D Math Details for more information.)

Thread Safety

• 

The `.` operator is thread-safe as of Maple 15.

• 

For more information on thread safety, see index/threadsafe.

Examples

withLinearAlgebra:

AScalarMatrix3,3

A300030003

(1)

B1,0,2|0,1,2|0,0,2

B100010222

(2)

V1,2,5

V−12−5

(3)

`.`A,B,V

−36−24

(4)

`.`V,V

30

(5)

`.`B,`.`V,V

30000300606060

(6)

`.`B,V,V

45

(7)

`.`4,V

−48−20

(8)

`.`λ,A,B

λ·300030666

(9)

`.`a,b

a·b

(10)

`.`7,6

42

(11)

Array1Array1,2,3,4,5,6

Array1123456

(12)

Array2Array1,1,1,2,2,2,3,3,3

Array2111222333

(13)

Array3Array1,2,3,1,2,3,1,2,3

Array3123123123

(14)

If the dimensions of the Arrays are not the same, extra entries are ignored by the dot operator.

`.`Array1,Array2

12381012

(15)

`.`Array2,Array3

123246369

(16)

See Also

2-D Math Details

infinity

LinearAlgebra Shortcuts

LinearAlgebra[DotProduct]

LinearAlgebra[Multiply]

Matrix

simplify/rtable

type/dot

undefined

Vector