From reciprocal comparisons to priorities
Equations and symbol key
aⱼᵢ = 1/aᵢⱼ · aᵢᵢ = 1
Aw = λmax w · Σwᵢ = 1
CI = (λmax − n)/(n − 1) · CR = CI/RI
| Symbol | Meaning |
|---|---|
| A = [aᵢⱼ] | Complete reciprocal comparison matrix; row i compared with column j |
| n | Number of criteria, 2–6 |
| wᵢ | Criterion i priority; positive, dimensionless; sum is 1 |
| λmax | Principal eigenvalue; numerical estimate Σ(Aw) for normalized w |
| CI | Consistency index (λmax − n)/(n − 1) |
| RI | Declared reference random index for matrix order n |
| CR | CI/RI when RI > 0; undefined for n = 2 |
Saaty’s scale anchors are 1 equal, 3 moderate, 5 strong, 7 very strong and 9 extreme preference; 2, 4, 6 and 8 are intermediate values. Reciprocals reverse the comparison. This implementation accepts continuous ratios inside [1/9, 9], so distinguish a measured ratio from a verbal judgment.
Define one objective and criteria that mean the same thing throughout the comparison. Discuss the performance ranges and evidence behind each judgment. Avoid overlapping criteria that count the same consequence twice.
Build A with aᵢᵢ = 1 and aⱼᵢ = 1/aᵢⱼ. Perfect consistency additionally requires aᵢⱼ × aⱼₖ = aᵢₖ; reciprocity alone does not ensure it. The interface enforces reciprocity, not transitivity.
Begin with equal positive weights. Repeatedly calculate u = Aw and w = u/Σu. The final vector solves Aw = λmax w with Σw = 1. This is power iteration for the principal right eigenvector; it is not the normalized-column row-average approximation or geometric-mean method.
At the final vector calculate Aw, λmax = Σ(Aw), and each ratio (Aw)ᵢ/wᵢ. They should agree within numerical tolerance. The relative residual is max|Aw − λmax w| / max|Aw|. Convergence checks numerical solution, not the truth of the judgments.
CI = (λmax − n)/(n − 1). CR = CI/RI when RI > 0. For n = 2, RI = 0 and CR is undefined; a positive reciprocal two-criterion matrix is necessarily consistent. Tiny negative CI from floating-point rounding is shown as zero and disclosed.
RI is a declared convention
This implementation uses the Saaty (2008), EJPAM Table 5 (p. 129), simulation table: n = 2, 3, 4, 5, 6 → RI = 0, 0.52, 0.89, 1.11, 1.25. Other published RI tables give different CR values for the same matrix. The RI table is not attributed to the distinct IJSSCI 2008 introductory paper.
| n | RI |
|---|---|
| 2 | 0 |
| 3 | 0.52 |
| 4 | 0.89 |
| 5 | 1.11 |
| 6 | 1.25 |
Worked article: compare fictional ship-maintenance programs
For a fictional maintenance-planning exercise, a team considers risk reduction, downtime and resource need. Assume it judges risk reduction twice as important as downtime, four times as important as resource need, and downtime twice as important as resource need.
The resulting matrix is [[1, 2, 4], [1/2, 1, 2], [1/4, 1/2, 1]]. Its known ratio vector is (4, 2, 1), so the normalized weights are (4/7, 2/7, 1/7): about 57.142857%, 28.571429% and 14.285714%.
Here Aw = 3w, λmax = 3, CI = 0 and CR = 0 apart from numerical rounding. This deliberately consistent example demonstrates the arithmetic; it does not show that the priorities are right for any vessel.
Try changing the first comparison from 2 to 5 while holding the other two fixed. The cycle is no longer transitive. Recalculate and inspect CI, CR and changed priorities. The tool does not silently repair that disagreement.
Follow every calculation step
| Risk reduction | Downtime | Resource need | |
|---|---|---|---|
| Risk reduction | 1 | 2 | 4 |
| Downtime | 0.5 | 1 | 2 |
| Resource need | 0.25 | 0.5 | 1 |
| Criterion | w | Aw | (Aw)ᵢ/wᵢ | Rank |
|---|---|---|---|---|
| Risk reduction | 0.5714285714 | 1.714285714 | 3 | 1 |
| Downtime | 0.2857142857 | 0.8571428571 | 3 | 2 |
| Resource need | 0.1428571429 | 0.4285714286 | 3 | 3 |
| Name | Value |
|---|---|
| λmax | 3 |
| CI | 0 |
| RI | 0.52 |
| CR | 0 |
| Iterations | 2 |
| Relative eigen-equation residual | 0 |
| max |Δw| | 1.110223025e-16 |
This tool uses a uniform CR > 0.10 review flag as its declared convention. The cited EJPAM paper also discusses stricter size-specific guidance (0.05 for three criteria and 0.08 for four). These are prompts to revisit judgments, not binary correctness tests. A small CR cannot establish sound criteria, unbiased opinions, valid measurements or a safe decision. Review the assumptions rather than changing numbers merely to cross a threshold.
Tables display up to 10 significant digits; CSV preserves the computed binary64 values. Ties are grouped within 10⁻¹² of each descending group’s highest score, with competition ranks (1, 1, 3). Display rounding never determines rank.
Interpretation and limits
- The tool computes only one local criterion-priority vector. A complete AHP decision requires alternative comparisons under the criteria and a stated synthesis rule. It does not compute ANP dependence, group consensus, fuzzy AHP or statistical confidence.
- A priority is a relative preference weight, not a failure probability, money allocation or measured risk. Safety obligations and mandatory limits must be assessed separately rather than traded away by a compensatory score.
- If these weights are used in TOPSIS, record that this is an AHP-weighted TOPSIS hybrid. Use the same criterion order and meanings. Changing the performance scales or alternative set can change the interpretation and ranking.
Try the TOPSIS ranking example
Primary methods and further reading
- Saaty (2008), Decision making with the analytic hierarchy process, IJSSCI 1(1), 83–98
- Saaty (2008), The Analytic Hierarchy and Analytic Network Measurement Processes: Applications to Decisions under Risk, EJPAM 1(1), Table 5, p. 129
Sources checked 8 October 2026. All ship-maintenance values are invented teaching inputs, not measured data. Model version 1.0.0.