Skip to main content

VECTOR_SQUARED_EUCLIDEAN_DISTANCE

Returns the squared Euclidean distance, or squared L2 distance between two vectors. The squared Euclidean distance measures how far apart two vectors based on the size of their differences, without considering direction. By squaring the difference, it emphasizes larger differences, which can help in finding outliers or large deviations.

Syntax

Parameters

Notes

Both input array arguments must have the same number of elements.

Return Type

DOUBLE

Examples

Example The following code returns the squared Euclidean distance between two vectors:

Rows: 1Execution time: 5.11ms

Example The following code returns the squared Euclidean distance between two identical vectors:

Rows: 1Execution time: 5.10ms

Example The following code returns the squared Euclidean distance between two vectors that are very far apart:

Rows: 1Execution time: 6.33ms