Squared distance
Every coordinate contributes a nonnegative squared difference.
When irrelevant coordinates overwhelm distance
K-means can fail even when one coordinate separates groups clearly. In many dimensions, accumulated noise dominates Euclidean distance and makes candidate neighbors look alike.
The essential idea: distance concentration weakens the comparisons that distance-based clustering depends on.
Every coordinate contributes a nonnegative squared difference.
The standard deviation becomes small relative to the mean as dimension grows.
Keep the first two coordinates visible while increasing how many noisy dimensions k-means uses. Compare the data-generating groups with the resulting cluster labels.
In high dimensions, irrelevant features can make distances nearly indistinguishable and undermine k-means.