# dot

Dot product operator.

## Syntax

vec_expr_1 dot vec_expr_2

## Operands

- vec_expr_1, vec_expr_2
- A pair of valid vector expressions

## Example

Expression | Result |
---|---|

`{{1, 0, 0} dot {0, 1, 0}}` |
`0` |

`{{1, 2, 3} dot {2, 4, 6}}` |
`28` |

`{{1, 2, 3, 4} dot {1, 1, 1, 1}}` |
`10` |

## Comments

The dot operator computes a scalar which is the dot product of vec_expr_1 and vec_expr_2. Both vec_expr_1 and vec_expr_2 must be vectors with the same number of elements. The result is the sum of the products of the corresponding elements of vec_expr_1 and vec_expr_2. If the result is zero, vec_expr_1 and vec_expr_2 are orthogonal.