Skip to content

Kendall tau distance

The Kendall tau distance or Kendall tau rank distance is a metric (distance function) that counts the number of pairwise disagreements between two ranking lists.

Version
v2 · 2026-11-14 · History
Domain-specific #
10238
Domain group
Formal Sciences
Origin domain
Experimental Design & Statistics
Subdomains
Rank Distance Metrics, Rank Correlation → Experimental Design & Statistics

Core Idea

Kendall tau distance is treated here as the recurring rank-distance metrics identity summarized by this source-grounded definition: The Kendall tau distance or Kendall tau rank distance is a metric (distance function) that counts the number of pairwise disagreements between two ranking lists. The Kendall tau distance or Kendall tau rank distance is a metric (distance function) that counts the number of pairwise disagreements between two ranking lists. The larger the distance, the more dissimilar the two lists are.

How would you explain it like I'm…

Counting Flipped Pairs

You and a friend each line up the same toys in a row. Look at every two toys: is one before the other in your row but after it in your friend's row? Count how many pairs are flipped. The bigger the count, the more different your rows are.

How Many Swaps Apart

The Kendall tau distance tells how different two rankings of the same things are. You check every pair of items and count the pairs that are in opposite order in the two lists. If the lists are exactly the same, the distance is 0. If one list is the other one backwards, every pair is flipped, so the distance is as big as it can be. It's also the number of times you'd swap neighbors to turn one list into the other.

Pairwise-Disagreement Ranking Distance

The Kendall tau distance is a metric that counts the pairwise disagreements between two rankings of the same items. A pair is a disagreement if one list puts A before B and the other puts B before A. The distance is 0 for identical lists. For n items it reaches its maximum, n(n−1)/2, when one list is the reverse of the other, since then every pair disagrees. It is also called bubble-sort distance because it equals the number of adjacent swaps bubble sort would make to reorder one list into the other. The larger the distance, the more dissimilar the rankings.

 

The Kendall tau distance K_d(τ1, τ2) between two rankings of the same n items is the number of unordered pairs {i, j} that the two rankings place in opposite relative order. It is a metric on rankings: it is zero exactly when the lists are identical, symmetric, and grows as the lists become more dissimilar. Its maximum, n(n-1)/2, is reached when one ranking is the reverse of the other. It is equivalent to the number of adjacent transpositions bubble sort performs to transform one list into the other, hence the name bubble-sort distance. It was created by Maurice Kendall and is closely linked to his rank correlation, which normalizes such pairwise counts. The defining feature is counting pairwise disagreements, not, say, summing positional differences.

Scope of Application

  • Kendall tau distance may also be defined as. If Kendall tau distance function is performed as K(L1,L2) instead of K(\tau1,\tau2) (where \tau1 and \tau2 are the rankings of L1 and L2 elements respectively), then triangular.

  • Comparison to Kendall tau rank correlation coefficient. The Kendall tau distance ( Kd ) must not be confused with the Kendall tau rank correlation coefficient ( Kc ) used in statistics.

  • Documented setting. The Kendall tau distance or Kendall tau rank distance is a metric (distance function) that counts the number of pairwise disagreements between two ranking lists.

  • Definition. The Kendall tau ranking distance between two lists \tau1 and \tau2 is.

  • Definition. Kd(\tau1, \tau2) = |{(i,j): i \tau2(j) ] \vee [ \tau1(i) > \tau1(j) \wedge \tau2(i).

Clarity

A clear use of Kendall tau distance names the carrier, the operative relation, and the conditions under which the source treats the identity as present. The minimal definition is The Kendall tau distance or Kendall tau rank distance is a metric (distance function) that counts the number of pairwise disagreements between two ranking lists.

Manages Complexity

Kendall tau distance compresses multiple rank-distance metrics details into a stable diagnostic relation. The source shows both the central mechanism—they are related by Kc = 1 - 4 Kd /(n(n-1)) , Kd = (1 - Kc) (n(n-1))/4.—and the practical consequence—a simple algorithm based on merge sort requires time O(n \log n). This compression makes cases comparable while leaving parameters, conventions, exceptions, and evidential quality explicit.

Abstract Reasoning

  1. Type the carrier. Identify the rank-distance metrics entities to which the claim applies.
  2. State the relation. Use the source-grounded identity: The Kendall tau distance or Kendall tau rank distance is a metric (distance function) that counts the number of pairwise disagreements between two ranking lists.
  3. Check operation and conditions. Or simpler by Kc = 1 - 2 Kn , Kn = (1-Kc)/2 where Kn is the normalised distance 2 Kd / (n(n-1)) see above).
  4. Demand recognition evidence.

Knowledge Transfer

Within the home domain. Knowledge about Kendall tau distance transfers literally when a new case preserves the same carrier type, relation, and recognition test. If Kendall tau distance function is performed as K(L1,L2) instead of K(\tau1,\tau2) (where \tau1 and \tau2 are the rankings of L1 and L2 elements respectively), then triangular inequality is not guaranteed. The Kendall tau distance ( Kd ) must not be confused with the Kendall tau rank correlation coefficient ( Kc ) used in statistics. Beyond the home domain. No canonical parent is asserted for Kendall tau distance.

Relationships to Other Abstractions

Local relationship map for Kendall tau distanceParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Kendall tau distanceDOMAINPrime abstraction: Distance — is a kind ofDistancePRIME

Current abstraction Kendall tau distance Domain-specific

Parents (1) — outgoing typed relations

  • Kendall tau distance is a kind of Distance Prime

    Kendall tau distance is a distance function counting pairwise ordering disagreements.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Kendall tau distance sits in a moderately populated region (54th percentile for distinctiveness): it has near-neighbors but no dense thicket of look-alikes.

Family — Combinatorial Optimization & Discrete Structures (32 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14