DOT_PRODUCT

All functions > ARRAY > DOT_PRODUCT

Calculates the dot product of two arrays.

Syntax

DOT_PRODUCT(array1, array2)
sql

Arguments

ParameterTypeRequiredDescription
array1ARRAYDOUBLEYesFirst vector (array of doubles)
array2ARRAYDOUBLEYesSecond vector (array of doubles)

Returns

DOUBLE - Dot product of the two vectors

Notes

  • Computes sum of element-wise products
  • Formula: sum(x[i] * y[i])
  • Arrays must be same length
  • Used in linear algebra and vector operations
Last update at: 2025/10/13 10:23:46