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 [1] and assess a module against the class it should realize.
- Impurity. contains an element outside . The remedy is to remove it — to split.
- Incompleteness. Some element of lies outside . The remedy is to add it — to merge.
Write the two axes as
Both lie in . The two defects are independent in the strict sense: all four combinations occur.
| purity | completeness | state | remedy |
|---|---|---|---|
| fully cohesive | none | ||
| impure, complete | remove foreign elements (split) | ||
| pure, incomplete | add missing members (merge) | ||
| 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 be any scalar that factors through the pair. (a) If is symmetric, there are two modules of opposite defect whose scores are exactly equal. (b) If 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 of size , and four foreign elements from another class.
- has and : impure but complete.
- for has and : pure but incomplete.
Both are realizable in one system.
(a) A symmetric gives — exactly equal scores for opposite defects. The geometric mean scores both at ; so does the arithmetic mean, and every other symmetric aggregate.
(b) The impure-but-complete modules trace the curve ; the pure-but-incomplete modules trace . Strict monotonicity makes the supremum of on both curves; continuity makes each image , an interval with that same supremum. Two intervals with a common supremum overlap, so some and some satisfy . 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.”
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 determines which of the four states a module is in.
Proof. Two equivalences, immediate from the definitions.
- : no element of lies outside its class, i.e. is pure.
- : no member of the class lies outside , i.e. is complete.
So the pair reports, coordinate by coordinate, whether the module is impure () and whether it is incomplete () — the two booleans the remedy depends on. The four cases of the table are read off directly, and with them the correct action.
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 , each element of the module is either inside or outside it, and each member of is either inside or outside it. Two independent questions therefore arise — does hold foreign elements? and is 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 rules the cohesion profile is the -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; axes for 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 -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:
- On the Nature of Cohesion: Cohesion as Correctness Relative to a Partitioning Rule — Zenodo, 2026 — doi:10.5281/zenodo.21703193