# Function DOT

## Slots on this function:

Documentation:
The DOT or inner product is defined for tensors of the same spatial dimension. The quantity.dimension of the product equals the product of the quantity.dimensions of the operands. The dot operator distributes over addition.

For vectors:

When the operands are both vector-quantities, the dot (scalar product) can be decomposed into the multiplication of a row- and a column-matrix. The product is a scalar (zero order tensor) and is the sum of the products of the corresponding scalar components of the argument vectors for a common basis.

When the operands are both dyads, the dot product can be decomposed into a multiplication of square matrices (with dimension equal to the spatial.dimension of the dyads). The product is a dyad (second order tensor) and is equal to the sum of the products of the corresponding scalar components of the argument tensors for a common basis.

The dot product of a dyad and a vector-quantity results in a vector-quantity. This product can be decomposed into the multiplication of a square matrix an a column-matrix or row-matrix. The product is a vector-quantity (first order tensor) and is equal to the sum of the products of the corresponding scalar components of the argument tensors for a common basis.

The reverse, vector dot dyad, is analogous.

Arity: 3

## Axioms:

```(Nth-Domain Dot 3 Tensor-Quantity)

(Nth-Domain Dot 2 Tensor-Quantity)

(Nth-Domain Dot 1 Tensor-Quantity)

(=> (And (Vector-Quantity ?V1) (Dyad ?T1))
(<=> (Dot ?V1 ?T1 ?V)
(And (Vector-Quantity ?V)
(Forall (?B)
(= ?T
(The-Vector-Quantity (* (Tensor-To-Matrix ?V1
?B)
(Tensor-To-Matrix ?T1
?B))
?B)))
(Forall
(?B ?I ?J)
(=> (= (Basis.Dimension ?B)
(Spatial.Dimension ?V1))
(= ?T
(Summation
(Lambda
(?I)
(* (Basis.Vec ?B ?I)
(Summation
(Lambda (?J)
(* (Vector-Component
?V1
?J
?B)
?J
?I
?B)))
1
(Spatial.Dimension ?V1))))
1
(Spatial.Dimension ?V1))))))))

(=> (And (Dyad ?T1) (Vector-Quantity ?V1))
(<=> (Dot ?T1 ?V1 ?V)
(And (Vector-Quantity ?V)
(Forall
(?B)
(= ?T
(The-Vector-Quantity
(Transpose (* (Tensor-To-Matrix ?T1 ?B)
(Transpose (Tensor-To-Matrix
?V1
?B))))
?B)))
(Forall
(?B ?I ?J)
(=> (= (Basis.Dimension ?B)
(Spatial.Dimension ?V1))
(= ?T
(Summation
(Lambda
(?I)
(* (Basis.Vec ?B ?I)
(Summation
(Lambda (?J)
?I
?J
?B)
(Vector-Component
?V1
?J
?B)))
1
(Spatial.Dimension ?V1))))
1
(Spatial.Dimension ?V1))))))))

(<=> (Dot ?T1 ?T2 ?T)
(Forall (?B)
(= ?T
(Tensor-To-Matrix ?T2 ?B))
?B)))
(Forall
(?B ?I ?J)
(=> (= (Basis.Dimension ?B)
(Spatial.Dimension ?T1))
(= ?T
(Summation
(Lambda
(?I)
(Summation
(Lambda (?J)
(* (* (Basis.Vec ?B ?I)
(Basis.Vec ?B ?J))
?I
?J
?B)
?J
?I
?B))))
1
(Spatial.Dimension ?T1)))
1
(Spatial.Dimension ?T1))))))))

(=> (And (Vector-Quantity ?V1) (Vector-Quantity ?V2))
(<=> (Dot ?V1 ?V2 ?S)
(And (Scalar-Quantity ?S)
(Forall (?B)
(= ?S
(Value (* (Tensor-To-Matrix ?V1 ?B)
(Transpose (Tensor-To-Matrix ?V2
?B)))
11)))
(Forall (?B ?J)
(=> (= (Basis.Dimension ?B)
(Spatial.Dimension ?V1))
(= ?S
(Summation (Lambda (?J)
(* (Vector-Component
?V1
?J
?B)
(Vector-Component
?V2
?J
?B)))
1
(Spatial.Dimension ?V1))))))))

(Distributes Dot + Tensor-Quantity)

(=> (Dot ?T1 ?T2 ?T)
(And (= (Spatial.Dimension ?T1) (Spatial.Dimension ?T2))
(= (Quantity.Dimension ?T)
(* (Quantity.Dimension ?T1) (Quantity.Dimension ?T2)))))

```