# Scalar product : scalar_product * dotprod dot dotP scalar_Product

### 5.42.7 Scalar product : scalar_product * dotprod dot dotP scalar_Product

The dot command finds the dot product of two vectors.
dotP, dotprod, scalar_product, and scalarProduct are synonyms for dot. The infixed operator * and its prefixed form ’*’ will also find dot products.

- dot takes two arguments:
  V1 and V2, two lists (vectors) of the same size.
- dot(V1,V2) returns the dot product of V1 and V2.

#### Example.

Input:

dot([1,2,3],[4,3,5])

or:

scalar_product([1,2,3],[4,3,5])

or:

[1,2,3]*[4,3,5]

or:

’*’([1,2,3],[4,3,5])

Output:

25

Indeed 25=1· 4+2· 3+3·5.

Note that * may be used to find the product of two polynomials represented as list of their coefficients, but to avoid ambiguity, the polynomial lists must be poly1[…].