Why Two Metrics Are Necessary

Under a single partitioning rule, a module can deviate in exactly two ways: it can hold elements that do not belong, or it can be missing elements that do. These defects are independent — a module can have either, both, or neither — and they demand opposite repairs. That structure forces the answer to a natural question: how many numbers must a cohesion metric report?

This page proves that the answer is two. One axis cannot distinguish the two failure modes; two axes can; and no third axis adds anything for this purpose. The pair — purity and completeness — is the minimal adequate output for a rule.

1 One rule, two opposite defects

Fix a partitioning rule PP [1] and assess a module MM against the class CC it should realize.

  • Impurity. MM contains an element outside CC. The remedy is to remove it — to split.
  • Incompleteness. Some element of CC lies outside MM. The remedy is to add it — to merge.

Write the two axes as

purity(M)=|M∩C||M|,completeness(M)=|M∩C||C|. \text{purity}(M) = \frac{|M \cap C|}{|M|}, \qquad \text{completeness}(M) = \frac{|M \cap C|}{|C|}.

Both lie in [0,1][0,1]. The two defects are independent in the strict sense: all four combinations occur.

purity completeness state remedy
11 11 fully cohesive none
<1<1 11 impure, complete remove foreign elements (split)
11 <1<1 pure, incomplete add missing members (merge)
<1<1 <1<1 impure and incomplete both

The two failure modes point in opposite directions. Merely knowing that “cohesion is low” is therefore of no help: the correct action could be to split or to merge, and the two actions are opposites.

2 One axis is not enough

Proposition (dimensional necessity). Let s(M)=g(purity(M),completeness(M))s(M) = g(\text{purity}(M), \text{completeness}(M)) be any scalar that factors through the pair. (a) If gg is symmetric, there are two modules of opposite defect whose scores are exactly equal. (b) If gg is continuous and strictly increasing in each argument, the two defect classes are indistinguishable to any finite precision, and no threshold on the score separates them.

Proof. Fix a rule with a class CC of size 44, and four foreign elements x1,…,x4x_1,\dots,x_4 from another class.

  • M1=C∪{x1,…,x4}M_1 = C \cup \{x_1,\dots,x_4\} has purity=4/8=1/2\text{purity} = 4/8 = 1/2 and completeness=4/4=1\text{completeness} = 4/4 = 1: impure but complete.
  • M2={a,b}M_2 = \{a,b\} for a,b∈Ca,b \in C has purity=2/2=1\text{purity} = 2/2 = 1 and completeness=2/4=1/2\text{completeness} = 2/4 = 1/2: pure but incomplete.

Both are realizable in one system.

(a) A symmetric gg gives s(M1)=g(1/2,1)=g(1,1/2)=s(M2)s(M_1) = g(1/2, 1) = g(1, 1/2) = s(M_2) — exactly equal scores for opposite defects. The geometric mean pc\sqrt{pc} scores both at 1/21/\sqrt{2}; so does the arithmetic mean, and every other symmetric aggregate.

(b) The impure-but-complete modules trace the curve B1={(p,1):0<p<1}B_1 = \{(p,1) : 0<p<1\}; the pure-but-incomplete modules trace B2={(1,c):0<c<1}B_2 = \{(1,c) : 0<c<1\}. Strict monotonicity makes g(1,1)g(1,1) the supremum of gg on both curves; continuity makes each image g(B1)g(B_1), g(B2)g(B_2) an interval with that same supremum. Two intervals with a common supremum overlap, so some (p*,1)∈B1(p^*,1) \in B_1 and some (1,c*)∈B2(1,c^*) \in B_2 satisfy g(p*,1)=g(1,c*)g(p^*,1) = g(1,c^*). An impure-complete module and a pure-incomplete module therefore share the same score, and their images approach one another without limit as either defect shrinks. No threshold on the score line can separate “split” from “merge.” ◼\blacksquare

This is why “low cohesion” as a single graded quantity cannot guide a repair. The score is monotonically related to both faults, but it cannot tell the designer which of the two is present — the one thing the designer needs to act.

A caveat keeps the claim honest. The impossibility is for scalars that behave as measurements — symmetric, or continuous and monotone in the two axes. A pathologically discontinuous injection could in principle pack the pair into one real number, but such a function is not a score: it carries no magnitude or ordering that corresponds to defect severity, and it does not arise from the purity/completeness semantics. Every actual cohesion score — a product, a mean, a weighted sum, a distance from the ideal — is continuous and monotone, and every one of them falls to the proposition.

3 Two axes are enough

The pair not only fails to lose information — it loses none that matters. It determines the failure mode exactly.

Proposition (sufficiency). The pair (purity(M),completeness(M))(\text{purity}(M), \text{completeness}(M)) determines which of the four states a module is in.

Proof. Two equivalences, immediate from the definitions.

  • purity(M)=1⇔|M∩C|=|M|⇔M⊆C\text{purity}(M) = 1 \iff |M \cap C| = |M| \iff M \subseteq C: no element of MM lies outside its class, i.e. MM is pure.
  • completeness(M)=1⇔|M∩C|=|C|⇔C⊆M\text{completeness}(M) = 1 \iff |M \cap C| = |C| \iff C \subseteq M: no member of the class lies outside MM, i.e. MM is complete.

So the pair (p,c)(p,c) reports, coordinate by coordinate, whether the module is impure (p<1p<1) and whether it is incomplete (c<1c<1) — the two booleans the remedy depends on. The four cases of the table are read off directly, and with them the correct action. ◼\blacksquare

Together the two propositions give the result: one axis is insufficient; two axes are sufficient. For a single rule, two metrics are necessary and enough.

4 Why exactly two — not three

Two axes are the minimum, and they are also the maximum needed for the failure-mode question, because a partition admits exactly two failure modes.

The reasoning is a counting one. Relative to the class CC, each element of the module is either inside CC or outside it, and each member of CC is either inside MM or outside it. Two independent questions therefore arise — does MM hold foreign elements? and is MM missing class members? — and they are independent because all four combinations are achievable (the table above exhibits each). To determine the failure mode is to answer both booleans; two coordinates answer two independent booleans minimally. A third coordinate could describe the module more finely (which elements are foreign, how the class is scattered), but it would carry no additional information about which failure mode applies — the axis count the schema requires.

This is why a pairwise, two-axis reading is the correct working form, not a convenience: it is exactly the dimension at which the failure mode becomes visible and no further.

5 Many rules, many pairs

A system is often assessed under several partitioning rules at once — logical structure, deployment, security, platform. Each rule is its own partition of the same element set, and each admits the same two failure modes, so each contributes its own (purity, completeness) pair. For kk rules the cohesion profile is the 2k2k-tuple of pairs [1].

The necessity argument applies rule by rule: one number cannot serve a single rule, so one number certainly cannot serve the joint requirement. And the pairs are genuinely irreducible across rules. When two rules cross-cut — neither refines the other — placement under one carries no information about placement under the other. The same physical placement can be correct under one rule and wrong under another, and a repair that improves one pair can degrade another. Each rule must be read on its own terms.

When one rule refines another, the pairs are still both needed: the coarse rule frames the fine one, and a clean finer-rule pair does not vouch for the coarser placement that contains it. The coarse pair is load-bearing and must be read first.

The general form, then: two axes per rule; 2k2k axes for kk rules. Collapsing across rules to a single scalar repeats, one level up, the error the proposition already rules out within a rule — it discards the distinction between defects that call for opposite actions.

6 Where this comes from

The two-axis structure is Condition 4 (adequate dimensionality) of the cohesion metric conditions, and the 2k2k-tuple is the cohesion profile, both developed in On the Nature of Cohesion [1]. The companion page Why cohesion has no scalar metric extends the same obstruction from diagnosis to the placement verdict: a scalar cannot decide whether an element is misplaced, and any scalar that appears to is the rule in disguise.


The formal development. The definitions, theorems, and proofs behind this page are published in:

All published papers

References

[1]
Y. Loth, “On the nature of cohesion: Cohesion as correctness relative to a partitioning rule.” Zenodo, Jul. 2026. doi: 10.5281/zenodo.21703193.