Function reference · Linear algebra

dot

Computes the dot product of two vectors.

The vectors must have the same length. With symbols that aren't vectors, the call is returned unevaluated.

Notation

dot(arg1, arg2)

Write it in an expression: nerdamer('dot([1,2,3],[4,5,6])'), or in the Playground.

nerdamer.dot

nerdamer.dot(...args: [a, b]): Expression

A method on the default import. Arguments can be strings, as in Notation.

import { dot }

import { dot } from 'nerdamer/structures';
dot(a: ParserEntity, b: ParserEntity): Expression

Import only this function, from nerdamer/structures.

Examples

Numbers.

dot([1,2,3],[4,5,6])
// → 32
Open in Playground

Symbolic entries.

dot([x,y,z],[a,b,c])
// → x*a+y*b+z*c
Open in Playground

← Back to Function reference