Computes the dot product between two numeric or complex vectors, or the column-wise dot products of two matrices with identical dimensions.
Value
a scalar if
xandyare vectors.a numeric or complex vector containing the column-wise dot products if matrices are supplied.
Details
For vectors \(x\) and \(y\), the dot product is defined as: $$ \sum_i \overline{x_i} y_i $$ where \(\overline{x_i}\) denotes the complex conjugate of \(x_i\) (for real input this is simply \(\sum_i x_i y_i\)).
For matrices, the dot product of each column of x with the
corresponding column of y is returned.
Note that crossprod() does not conjugate its
first argument for complex input, so it computes \(t(X) Y\) rather
than the Hermitian inner product; this function does conjugate.
See also
Other math.basic:
closest(),
crossProd(),
crossProdN(),
roundTo(),
unirootAll()
