Why is Ward linkage only valid with Euclidean distance?

Last updated 11 November 2026

  • Ward minimizes the increase in within-cluster sum of squares around centroids. Centroids and the variance decomposition (total SS = within + between) only hold for squared Euclidean distance.

  • With other metrics, the merge cost stops measuring any well-defined error. The Lance–Williams update can also produce inversions (non-monotone merge heights).

  • scikit-learn's Ward only accepts metric='euclidean'. For other metrics, use average or complete linkage, or L2-normalize vectors first.

  • https://scikit-learn.org/stable/modules/generated/sklearn.cluster.AgglomerativeClustering.html
  • https://scikit-learn.org/stable/modules/clustering.html
  • https://www.emergentmind.com/topics/ward-s-linkage
All Clustering interview questions