# Dot Product (G Dataflow)

Last Modified: January 9, 2017

Computes the dot product of two vectors.  ## vector x

The first input vector.

This input accepts a 1D array of double-precision, floating point numbers or 1D array of complex double-precision, floating point numbers.

The number of elements in the first input must be greater than 0 and equal to the number of elements in the second input vector. Otherwise, the dot product is undefined, and the node returns NaN. ## vector y

The second input vector.

This input accepts a 1D array of double-precision, floating point numbers or 1D array of complex double-precision, floating point numbers.

The number of elements in the first input must be greater than 0 and equal to the number of elements in the second input vector. Otherwise, the dot product is undefined, and the node returns NaN. ## error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: No error ## dot product

The dot product. ## error out

Error information. The node produces this output according to standard error behavior.

## Algorithm for Calculating the Dot Product

Let x represent the input sequence vector x and y represent the input sequence vector y. This node calculates the output dot product using the following equation.

$\text{dot product}=\underset{i=0}{\overset{n-1}{\sum }}{x}_{i}{y}_{i}^{*}$

where n is the number of data points and yi* is the complex conjugate of yi. Notice that the output dot product is a scalar value.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported