You are developing a nearest-neighbor search over 15 000-dimensional TF-IDF vectors that vary greatly in total magnitude because some customers generate far more events than others. You want any two vectors that point in exactly the same direction-even if one is simply a scaled-up version of the other-to be treated as maximally similar (distance = 0). Which statement correctly explains why using cosine distance meets this requirement?
Multiplying either vector by any positive scalar leaves the cosine distance between the two vectors unchanged, so vectors that differ only in length are considered identical.
After z-score standardization, cosine distance becomes algebraically identical to Euclidean distance, so either metric may be used interchangeably.
Cosine distance is computed as the sum of absolute component-wise differences, eliminating any dependence on vector length.
Cosine distance satisfies the triangle inequality, making it a proper metric that supports metric-tree indexing without modification.
Cosine distance is derived from the cosine of the angle between two vectors. Multiplying either vector by any positive scalar leaves the angle-and therefore the cosine-unchanged, so the distance remains the same. Euclidean distance, Manhattan (L1) distance, and other common metrics depend on vector magnitudes and will change under such scaling. Although cosine distance is non-negative and symmetric, it does not satisfy the triangle inequality, so it is not a true mathematical metric and cannot guarantee metric-tree pruning. It is also not algebraically identical to Euclidean distance after z-score standardization; that transformation centers data but does not remove magnitude dependence the way normalization for cosine does. Thus only the scale-invariance statement is correct.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is cosine distance in simple terms?
Open an interactive chat with Bash
Why does cosine distance ignore the magnitude of vectors?
Open an interactive chat with Bash
How does cosine distance compare to other metrics like Euclidean distance?