An excerpt from Saaty's 1980 book: 'Let us now develop a few elementary but essential results about consistent matrices', followed by the equation lambda max equals the sum of a i j times w j over w i, the note that this is the ith component of A w equals lambda max w, and the definition of mu as minus one over n minus 1 times the sum of the remaining eigenvalues, which is the consistency index written in terms of the other eigenvalues.
An excerpt from Saaty's The Analytic Hierarchy Process (1980): the consistency index takes shape. The last line defines μ\mu from the eigenvalues other than the largest; because all nn eigenvalues sum to nn, it equals (λmax⁡−n)/(n−1)(\lambda_{\max} - n)/(n-1), the consistency index defined below.

You don't need to understand the mathematics behind the AHP to use it effectively. You just need to understand the basic concepts like pairwise comparisons, the 1–9 scale, and what a good consistency ratio looks like. If that's all you are interested in, head on over to our Introduction to the AHP article. On the other hand, once you master the basics you might want to peek behind the curtain to see what calculations are performed to produce the outputs. This article aims to describe the whole process, starting from high-school level concepts such as vectors and matrices. This should prepare you for the more advanced topics, such as the eigenvector calculation used to produce the priority weights. Towards the end, there is a complete worked decision, followed by the sensitivity analysis that tests how firmly it stands.

The literature contains several ways to derive priorities from a comparison matrix, and several consistency indices. They agree on consistent matrices and differ slightly on inconsistent ones. This article describes the standard approach, the one the decisionpoint.io app uses: Saaty's eigenvector method and consistency ratio, plus the two extensions most implementations need (Harker's method for missing comparisons and the geometric mean for groups). If you want to learn more about the alternatives, Brunelli (2015) provides a good introduction.

How to read the notation

To begin, let's take a tour of the notation that we will be using. The table is worth glancing through now, but there is no need to memorise it as every symbol will be explained when it first appears.

SymbolHow to read it
A\mathbf{A}A matrix: a grid of numbers. Written as a bold capital letter.
aija_{ij}The entry of A\mathbf{A} in row ii, column jj. In the AHP it holds the judgment comparing element ii with element jj.
w\mathbf{w}, wiw_iA vector: a list of numbers, written as a bold lower-case letter. wiw_i is its iith entry. In the AHP, w\mathbf{w} is the priority vector: the weights.
T{}^TTranspose: the vector or matrix turned on its side, so a row becomes a column and a column becomes a row. Explained below.
1\mathbf{1}The vector of ones, (1,1,…,1)T(1, 1, \ldots, 1)^T. Saaty's books write it as ee; Brunelli and this article write 1\mathbf{1}.
λmax⁡\lambda_{\max}The largest eigenvalue of a matrix (lambda). Defined in the eigenvector section.
nnThe number of elements being compared.
mmThe number of participants in a group decision.
∑\textstyle\sum, ∏\textstyle\prodSum and product over an index. ∑j=13vj\textstyle\sum_{j=1}^{3} v_j means v1+v2+v3v_1 + v_2 + v_3; ∏\textstyle\prod is the same with multiplication.
CI, RI, CRConsistency index, random index, consistency ratio. Defined in the consistency section.

What are vectors and matrices?

Let's start with an easy one: a vector is simply a list of numbers, nothing more. For example, the priorities of three criteria can be grouped together to form a vector with three entries:

w=(0.6, 0.3, 0.1)\mathbf{w} = (0.6,\ 0.3,\ 0.1)

A matrix is a grid of numbers with rows and columns. The entry in row ii, column jj is written aija_{ij}, row first, column second, so a23a_{23} is the entry in row 2, column 3. It is the same idea as a spreadsheet naming a cell, except both coordinates are numbers and the row comes first.

A=(a11a12a13a21a22a23a31a32a33)\mathbf{A} = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}

The transpose is a piece of notation that often appears in AHP publications, and can trip you up if you haven't come across it before. A vector's numbers can be laid out across the page, as a row vector, or down the page, as a column vector. On its own the layout means nothing: it's the same vector either way. It starts to matter when you need to multiply a matrix and a vector, because then you have to be explicit about which layout you mean; the two choices pair the entries with the matrix differently. The standard choice, always used for the AHP, is to treat the vector as a column. But vectors are often written across the page by default, because a row fits in a sentence. The transpose, indicated by a superscript TT, simply means that this row vector should be turned on its side and treated as a column.

(w1, w2, w3)T=(w1w2w3)(w_1,\ w_2,\ w_3)^T = \begin{pmatrix} w_1 \\ w_2 \\ w_3 \end{pmatrix}

Nothing about the numbers changes; the transpose is bookkeeping, not calculation. So, when an AHP paper writes w=(w1,…,wn)T\mathbf{w} = (w_1, \ldots, w_n)^T, read it as: these are the entries of w\mathbf{w}, and w\mathbf{w} is a column.

How do you multiply vectors and matrices?

Next, let's look at some building blocks that we will need later on. The first is very simple: to multiply a vector by a single number (a scalar) multiply every entry in the vector by the scalar.

c v=(c v1, c v2, …, c vn)c\,\mathbf{v} = (c\, v_1,\ c\, v_2,\ \ldots,\ c\, v_n)
2×(0.6, 0.3, 0.1)=(1.2, 0.6, 0.2)2 \times (0.6,\ 0.3,\ 0.1) = (1.2,\ 0.6,\ 0.2)

There are two ways to multiply vectors: the dot product and the cross product. We won't need the cross product, so we'll ignore that one. The dot product of two vectors multiplies the corresponding entries and adds the results.

u⋅v=∑i=1nui vi=u1v1+u2v2+⋯+unvn\mathbf{u} \cdot \mathbf{v} = \sum_{i=1}^{n} u_i\, v_i = u_1 v_1 + u_2 v_2 + \cdots + u_n v_n
(2, 1, 0)⋅(1, 2, 3)=2×1+1×2+0×3=4(2,\ 1,\ 0) \cdot (1,\ 2,\ 3) = 2 \times 1 + 1 \times 2 + 0 \times 3 = 4

Matrix-times-vector is one dot product per row: row ii of the result is row ii of the matrix dotted with the vector. This is where column shape becomes important. Each row of the matrix reads across, the vector beside it reads down, and the matching entries pair up:

(Av)i=∑j=1naij vj(\mathbf{A}\mathbf{v})_i = \sum_{j=1}^{n} a_{ij}\, v_j
(210131012)(123)=(2×1+1×2+0×31×1+3×2+1×30×1+1×2+2×3)=(4108)\begin{pmatrix} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{pmatrix} \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} = \begin{pmatrix} 2 \times 1 + 1 \times 2 + 0 \times 3 \\ 1 \times 1 + 3 \times 2 + 1 \times 3 \\ 0 \times 1 + 1 \times 2 + 2 \times 3 \end{pmatrix} = \begin{pmatrix} 4 \\ 10 \\ 8 \end{pmatrix}

The animation below walks through the same example one row at a time.

Multiplying a matrix by a vector
2
1
0
1
3
1
0
1
2
×
1
2
3
=
?
?
?
 
Each entry of the result comes from one row of the matrix and the whole vector. Step through to see how.
Step 1 of 5

Multiplying a matrix by a matrix repeats this for each column of the second matrix, but again we won't need that so we'll ignore it. For AHP calculation we only need matrix-times-vector, the dot product, and scalar multiplication.

What is an eigenvector?

The easiest way to understand eigenvectors is to look at vectors the way physicists do. So far we have treated a vector as a list of numbers, but a list like (3, 1)(3,\ 1) can also be drawn as an arrow: go 3 across and 1 up. The same numbers describe both a direction and a length, which is why physics uses vectors for forces and velocities. A vector with 2 entries can represent a 2D arrow, and a vector with 3 entries a 3D arrow. It gets harder to visualise in higher dimensions, but the concept is the same: we can think of vectors as both lists of numbers and arrows with a particular length and direction.

01234123 across1 up(3, 1)
The vector (3, 1) as an arrow: 3 across, 1 up.

Multiplying a matrix by a vector, seen as an arrow, produces a new arrow. In most cases the new arrow points in a different direction, and is longer or shorter. But for some combinations of matrices and vectors, the arrow keeps pointing in the same direction, and only the length changes. These vectors are the eigenvectors of the matrix, and the stretch factor λ\lambda (lambda) is the eigenvalue paired with each one. Multiplying the vector by the eigenvalue gives the same result as multiplying the vector by the matrix:

Av=λ v\mathbf{A}\mathbf{v} = \lambda\, \mathbf{v}

Here is a 2×2 example: an AHP comparison matrix with one judgment, saying that the first element is twice as important as the second.

(121/21)(21)=(42)=2(21)\begin{pmatrix} 1 & 2 \\ 1/2 & 1 \end{pmatrix} \begin{pmatrix} 2 \\ 1 \end{pmatrix} = \begin{pmatrix} 4 \\ 2 \end{pmatrix} = 2 \begin{pmatrix} 2 \\ 1 \end{pmatrix}

The vector (2, 1)T(2,\ 1)^T comes out as itself times 2, so it is an eigenvector with eigenvalue 2. Scaled to sum to 1 it reads (2/3, 1/3)(2/3,\ 1/3): weights of 67% and 33%, exactly what a "twice as important" judgment should produce. An nn×nn matrix has up to nn eigenvalues, with the largest one written λmax⁡\lambda_{\max}.

There is a guarantee behind all of this: the Perron–Frobenius theorem, which says that a matrix whose entries are all positive has a single largest eigenvalue, and that the corresponding eigenvector has positive entries. Comparison matrices are all positive, so this principal eigenvector always exists, is unique once scaled to sum to 1, and never contains a zero or negative weight. That is why the AHP calculation always gives a well-defined answer for any set of judgments.

What is a pairwise comparison matrix?

A pairwise comparison matrix collects judgments about nn elements. Entry aija_{ij} tells us how many times more important element ii is than element jj. Judgments use the 1–9 Saaty scale. Two rules follow from what the judgments mean. Every element is equal to itself, and if ii is 3 times jj, then jj is a third of ii:

aii=1,aji=1aija_{ii} = 1, \qquad a_{ji} = \frac{1}{a_{ij}}

At first glance the matrix seems to require n×nn \times n judgments. However, if we look closer, we see that the diagonal is always 1, and the lower half is a mirror image of the upper half. That leaves n(n−1)/2n(n-1)/2 real judgments: 3 for 3 elements, 10 for 5, 45 for 10.

Here is the sample matrix from our Introduction to the AHP, which weights three smartphone criteria, with Camera judged 3 times as important as Price, Camera 5 times Battery, and Price 3 times Battery.

A=(1351/3131/51/31)CameraPriceBattery\mathbf{A} = \begin{pmatrix} 1 & 3 & 5 \\ 1/3 & 1 & 3 \\ 1/5 & 1/3 & 1 \end{pmatrix} \begin{matrix} \text{Camera} \\ \text{Price} \\ \text{Battery} \end{matrix}

Imagine if we had perfect knowledge of the true weights w1,…,wnw_1, \ldots, w_n for a decision. Every judgment would be an exact ratio of weights, aij=wi/wja_{ij} = w_i / w_j, and the whole matrix would be:

A=(w1/w1w1/w2⋯w1/wnw2/w1w2/w2⋯w2/wn⋮⋮⋱⋮wn/w1wn/w2⋯wn/wn)\mathbf{A} = \begin{pmatrix} w_1/w_1 & w_1/w_2 & \cdots & w_1/w_n \\ w_2/w_1 & w_2/w_2 & \cdots & w_2/w_n \\ \vdots & \vdots & \ddots & \vdots \\ w_n/w_1 & w_n/w_2 & \cdots & w_n/w_n \end{pmatrix}

A matrix of this form is called consistent. Perfect consistency like this rarely happens in the real world, but the AHP calculation is built to cope with that. Take a mental note of this ideal form, as the next section is built on it.

Why does the eigenvector give the weights?

Before the derivation, it is worth asking why the AHP reaches for an eigenvector at all, rather than simply averaging the judgments in each row. The answer is inconsistency. When the judgments contradict each other, an average quietly ignores the contradictions, while the eigenvector redistributes them across all the weights at once, so that the result is the single set of weights the whole matrix best agrees with. That is the method's central claim, and the rest of this section shows where it comes from.

Take the consistent matrix above and multiply it by its own weight vector. Row ii gives:

(Aw)i=∑j=1nwiwj wj=wi+wi+⋯+wi⏟n terms=n wi(\mathbf{A}\mathbf{w})_i = \sum_{j=1}^{n} \frac{w_i}{w_j}\, w_j = \underbrace{w_i + w_i + \cdots + w_i}_{n \text{ terms}} = n\, w_i

Each term collapses: (wi/wj)×wj=wi(w_i/w_j) \times w_j = w_i. So Aw=nw\mathbf{A}\mathbf{w} = n\mathbf{w}: for a consistent matrix, the true weight vector is an eigenvector, and its eigenvalue is exactly nn. The weights are not merely related to the matrix; they are sitting inside it, recoverable by an eigenvector calculation.

Saaty's key insight (1977) was to extend this to real, imperfect matrices: keep the same equation, with the largest eigenvalue in place of nn. The priority vector is defined as the solution of

Aw=λmax⁡ w,wT1=1\mathbf{A}\mathbf{w} = \lambda_{\max}\, \mathbf{w}, \qquad \mathbf{w}^T \mathbf{1} = 1

The first equation is a matrix times a column vector, exactly as in the previous section, so no transpose is needed. The second condition scales the weights to sum to 1, since an eigenvector times any number is still an eigenvector. Here the transpose works in the opposite direction: w\mathbf{w} is a column, and wT\mathbf{w}^T turns it on its side into a row. A row times a column is a single dot product, just like one row of a matrix-times-vector calculation. Dotting with the vector of ones simply adds up the entries:

wT1=(w1w2⋯wn)(11⋮1)=w1+w2+⋯+wn\mathbf{w}^T \mathbf{1} = \begin{pmatrix} w_1 & w_2 & \cdots & w_n \end{pmatrix} \begin{pmatrix} 1 \\ 1 \\ \vdots \\ 1 \end{pmatrix} = w_1 + w_2 + \cdots + w_n

Without the transpose, w\mathbf{w} and 1\mathbf{1} would be two columns side by side, which isn't a valid product. The Perron–Frobenius theorem guarantees this w\mathbf{w} exists, is positive, and is unique. For a consistent matrix λmax⁡=n\lambda_{\max} = n and the method returns the exact weights; for a slightly inconsistent one it returns a compromise that tolerates the contradictions, and λmax⁡\lambda_{\max} rises above nn by an amount that measures them. That excess is the basis of the consistency check.

How is the eigenvector computed? The power method

Unfortunately, there isn't a simple formula where we can plug in a matrix and get the principal eigenvector. Instead, we use an iterative process that converges on the answer through repeated steps. The standard technique, used by decisionpoint.io, is the power method. It works as follows: any starting vector can be thought of as a blend of the matrix's eigenvectors, and each multiplication by A\mathbf{A} stretches the principal one more than the rest, because it has the largest eigenvalue. So with every round its share of the blend grows, and after a few rounds the other components are too small to see: the vector settles onto the principal eigenvector and stops moving. Here is the algorithm:

  1. Start with v=(1,1,…,1)\mathbf{v} = (1, 1, \ldots, 1), meaning no opinion yet: every element equal.
  2. Multiply: v←Av\mathbf{v} \leftarrow \mathbf{A}\mathbf{v}.
  3. Normalise: divide every entry of v\mathbf{v} by the sum of its entries, so they sum to 1.
  4. Compare with the previous vector. If the squared distance between them (sum of squared differences) is below 10−710^{-7}, stop. Otherwise repeat from step 2, up to a cap of 12 iterations.

On the smartphone criteria matrix, the method converges in five iterations:

IterationAv\mathbf{A}\mathbf{v}SumAfter normalisingSquared distance
1(9, 4.333, 1.533)14.867(0.6054, 0.2915, 0.1031)1.46
2(1.9955, 0.8027, 0.3214)3.1196(0.6397, 0.2573, 0.1030)0.0023
3(1.9267, 0.7796, 0.3167)3.0230(0.6373, 0.2579, 0.1048)8.8 × 10−6
4(1.9349, 0.7846, 0.3182)3.0377(0.6369, 0.2583, 0.1048)3.3 × 10−7
5(1.9356, 0.7849, 0.3182)3.0387(0.6370, 0.2583, 0.1047)1.9 × 10−9

The weights are w=(0.637, 0.258, 0.105)\mathbf{w} = (0.637,\ 0.258,\ 0.105): Camera 63.7%, Price 25.8%, Battery 10.5%. Watch the Sum column. Once v\mathbf{v} is nearly the eigenvector, Av≈λmax⁡v\mathbf{A}\mathbf{v} \approx \lambda_{\max}\mathbf{v}, and since v\mathbf{v} sums to 1, the sum of Av\mathbf{A}\mathbf{v} drifts toward λmax⁡\lambda_{\max} itself: 3.0387 by iteration 5.

The power method converging
Camera0.3333
Price0.3333
Battery0.3333
Distance² to previous: —
Start with no opinion: every weight equal. (Internally the algorithm starts from (1, 1, 1); shown here normalised.)
Step 1 of 7

The sum above gives us an estimate of λmax⁡\lambda_{\max}, but once we have the principal eigenvector we can get a more precise value using a formula called the Rayleigh quotient. At convergence Aw≈λmax⁡w\mathbf{A}\mathbf{w} \approx \lambda_{\max}\mathbf{w}. Taking the dot product of each side with w\mathbf{w} turns both sides into ordinary numbers: (Aw)⋅w≈λmax⁡ (w⋅w)(\mathbf{A}\mathbf{w}) \cdot \mathbf{w} \approx \lambda_{\max}\,(\mathbf{w} \cdot \mathbf{w}). Dividing both sides by the number w⋅w\mathbf{w} \cdot \mathbf{w} leaves λmax⁡\lambda_{\max} by itself:

λmax⁡≈(Aw)⋅ww⋅w=3.0385\lambda_{\max} \approx \frac{(\mathbf{A}\mathbf{w}) \cdot \mathbf{w}}{\mathbf{w} \cdot \mathbf{w}} = 3.0385

The stopping threshold of 10−710^{-7} on the squared distance, and the cap of 12 iterations, follow Goepel's analysis of numerical accuracy in AHP calculations. In practice five or six iterations give weights stable to four decimal places, far more precision than needed in most circumstances.

A hand method for checking

A quicker estimate needs no iteration: divide each column by its sum, then average each row. For the criteria matrix, the column sums are (1.533, 4.333, 9). Dividing and averaging gives (0.633, 0.261, 0.106), against the exact (0.637, 0.258, 0.105). The estimate is close because the matrix is nearly consistent, and it is exact whenever the matrix is fully consistent.

This column-normalisation method is sometimes mistaken for the AHP calculation itself, because it appears in so many tutorials and spreadsheets. It is not. Saaty (1980) presents it as one of several hand approximations to the eigenvector, which has been the definition of the priorities since his first paper in 1977. Treat it as a sanity check on an implementation, not as a substitute for the power method.

The same kind of check exists for λmax⁡\lambda_{\max}. The Rayleigh quotient above is the least-squares estimate: the value of λmax⁡\lambda_{\max} that makes Aw\mathbf{A}\mathbf{w} and λmax⁡w\lambda_{\max}\mathbf{w} as close as possible. The hand-friendly alternative is the one in the excerpt from Saaty's book at the top of this page: divide each entry of Aw\mathbf{A}\mathbf{w} by the matching entry of w\mathbf{w}, which gives nn separate estimates of λmax⁡\lambda_{\max}, and average them. For an exact eigenvector every estimate agrees; for an approximation the two formulas differ only in how they average out the residual error, and both give 3.0385 for the criteria matrix.

How is consistency measured?

Judgments can contradict each other. If Camera is 3 times Price and Price is 3 times Battery, then Camera should be 3 × 3 = 9 times Battery. The judge entered 5. Each such triple of judgments is called a triad, and perfect consistency means every triad obeys the rule:

aik=aij ajkfor all i,j,ka_{ik} = a_{ij}\, a_{jk} \quad \text{for all } i, j, k
How inconsistency shows up in a triad
33CameraPriceBattery3 × 3 = 9?59 implied
Two judgments: Camera is 3 times Price, and Price is 3 times Battery.
Step 1 of 4

Nobody meets that standard, and the AHP does not expect them to. Instead, it measures how far the judgments fall short, using a fact about eigenvalues: for a positive reciprocal matrix, λmax⁡≥n\lambda_{\max} \geq n always, with equality only when the matrix is consistent (Saaty 1977). The excess of λmax⁡\lambda_{\max} over nn, spread over the matrix size, is the consistency index:

CI=λmax⁡−nn−1\mathrm{CI} = \frac{\lambda_{\max} - n}{n - 1}

CI alone is hard to interpret, because larger matrices pick up more inconsistency by chance. Saaty's answer was to calibrate against randomness itself: generate many random reciprocal matrices of size nn, average their CI, and call the result the random index RIn\mathrm{RI}_n. The consistency ratio compares your matrix against that baseline:

CR=CIRIn\mathrm{CR} = \frac{\mathrm{CI}}{\mathrm{RI}_n}
nn3456789101112131415
RIn\mathrm{RI}_n0.580.901.121.241.321.411.451.491.511.481.561.571.59

These are Saaty's values, and they are what decisionpoint.io uses. The first eight are the classic table; the entries for 11 to 15 come from Saaty's later publications, and decisionpoint.io allows at most 15 elements in any one comparison set, so the table always covers the matrix at hand. The dip from 1.51 at nn = 11 to 1.48 at nn = 12 is in Saaty's published table; Donegan and Dodd (1991) trace it to a change in the number of random matrices sampled. RI is a simulation estimate, so published tables differ slightly: Brunelli's book, for example, tabulates Alonso and Lamata's estimates (0.5245 for nn = 3 against Saaty's 0.58). The differences move a CR by a few percent at most, but when two AHP tools disagree in the second decimal place of a CR, a different RI table is the usual reason.

The working rule, due to Saaty, is to accept the judgments when CR≤0.1\mathrm{CR} \leq 0.1, and revisit them when it is higher. A CR of 0.1 means the judgments are 10% as inconsistent as random noise. For the smartphone criteria matrix: λmax⁡=3.0385\lambda_{\max} = 3.0385, so CI = (3.0385 − 3) / 2 = 0.0193 and CR = 0.0193 / 0.58 = 0.033, which sits comfortably inside the threshold. When a matrix fails the check, decisionpoint.io can point at the problematic judgment triads and ask the user how they want to rework the judgments to make them more consistent.

The threshold is a convention about how much contradiction to tolerate, not a mathematical boundary, and it has been argued in both directions. Saaty himself suggested tighter limits for the smallest matrices, 0.05 for nn = 3 and 0.08 for nn = 4, on the grounds that random inconsistency is harder to come by with so few judgments. Goepel, whose AHP template and AHP-OS tool are widely used, argues from the other side: across corporate projects with about 80 participants he found a median CR of 0.16 on the 1–9 scale, so the 10% rule would have rejected most questionnaires. His template documentation recommends an acceptance threshold between 0.1 and 0.2, and in one project he accepted up to 0.3 (Goepel 2013). His tools also compute CR from Alonso and Lamata's linear fit to the random index rather than from a table,

CR=λmax⁡−n1.7699 n−4.3513\mathrm{CR} = \frac{\lambda_{\max} - n}{1.7699\, n - 4.3513}

which tracks Saaty's values closely for nn of 4 or more, extends beyond the end of any table, and gives 0.040 instead of 0.033 for the smartphone matrix (Goepel 2018). decisionpoint.io applies the 0.1 rule with Saaty's table at every size, which remains the common practice. Treat the stricter small-matrix limits and the looser survey-based practice as context for reading a borderline CR, not as alternative rules.

An implementation note: in floating-point arithmetic, λmax⁡\lambda_{\max} for a perfectly consistent matrix can come out slightly below nn, such as 2.9999999. Implementations clamp CI to zero in that case rather than report a negative value.

What happens when comparisons are missing?

Real decision makers skip comparisons. They run out of time, or cannot compare two unlike things with any confidence. The eigenvector method as described needs every entry, so a method of repairing incomplete matrices is required. The standard one is Harker's method (1987), which builds an auxiliary matrix C\mathbf{C}:

cij={1+miif i=jaijif i≠j and aij is given0if aij is missingc_{ij} = \begin{cases} 1 + m_i & \text{if } i = j \\ a_{ij} & \text{if } i \neq j \text{ and } a_{ij} \text{ is given} \\ 0 & \text{if } a_{ij} \text{ is missing} \end{cases}

where mim_i counts the missing entries in row ii. Each missing judgment becomes a zero, and the diagonal entry of its row goes up by one. Then compute the eigenvector of C\mathbf{C} the same way as before.

The trick might not be obvious until you see what the diagonal bump does. A missing entry aija_{ij} should ideally hold wi/wjw_i / w_j, and in the product Aw\mathbf{A}\mathbf{w} that entry would contribute (wi/wj)×wj=wi(w_i/w_j) \times w_j = w_i. Adding 1 to the diagonal contributes the same wiw_i. So C\mathbf{C} acts on the weight vector as if every missing judgment had been filled in perfectly consistently with the answer.

A worked example

Three elements, two judgments given, the 1–3 comparison skipped (dots mark the missing pair):

A˙=(12⋅1/212⋅1/21)⇒C=(2201/21201/22)\dot{\mathbf{A}} = \begin{pmatrix} 1 & 2 & \cdot \\ 1/2 & 1 & 2 \\ \cdot & 1/2 & 1 \end{pmatrix} \qquad \Rightarrow \qquad \mathbf{C} = \begin{pmatrix} 2 & 2 & 0 \\ 1/2 & 1 & 2 \\ 0 & 1/2 & 2 \end{pmatrix}

Rows 1 and 3 each lost one entry, so their diagonals rise from 1 to 2. The principal eigenvector of C\mathbf{C} is (4/7, 2/7, 1/7)≈(0.571, 0.286, 0.143)(4/7,\ 2/7,\ 1/7) \approx (0.571,\ 0.286,\ 0.143), and you can verify it yourself with one multiplication:

C(421)=(8+4+02+2+20+1+2)=(1263)=3(421)\mathbf{C} \begin{pmatrix} 4 \\ 2 \\ 1 \end{pmatrix} = \begin{pmatrix} 8 + 4 + 0 \\ 2 + 2 + 2 \\ 0 + 1 + 2 \end{pmatrix} = \begin{pmatrix} 12 \\ 6 \\ 3 \end{pmatrix} = 3 \begin{pmatrix} 4 \\ 2 \\ 1 \end{pmatrix}

The weights make sense: the given judgments say element 1 is twice element 2, and element 2 twice element 3, so the method fills the gap with the implied 4-to-1 ratio. Here λmax⁡=3=n\lambda_{\max} = 3 = n and CI = 0. That is no accident. Consistency can only be measured where judgments overlap, and with just n−1n - 1 comparisons there is no overlap to contradict. Which is also the floor: at least n−1n - 1 comparisons, forming a chain that connects every element, are needed before any weights can be computed at all. decisionpoint.io tracks this and reports which comparisons are missing and whether the set is connected.

How are group judgments combined?

When mm people each judge the same pair, the group value is the geometric mean of their judgments, calculated by multiplying them together and taking the mmth root. Applied entry by entry, it merges mm comparison matrices into one group matrix, which then goes through the same calculation as a regular comparison matrix:

aijG=(∏h=1maij(h))1/ma^{G}_{ij} = \left( \prod_{h=1}^{m} a^{(h)}_{ij} \right)^{1/m}

where aij(h)a^{(h)}_{ij} is participant hh's judgment on the pair. Two people judging 3 and 6 combine to 3×6=18≈4.24\sqrt{3 \times 6} = \sqrt{18} \approx 4.24.

Why the geometric mean rather than the familiar arithmetic one? Because the merged matrix still has to be a valid comparison matrix, which means every mirror pair of entries must stay reciprocals of each other. The arithmetic mean breaks that rule, while the geometric mean obeys it. Suppose two people take opposite views: one says 3, the other 1/3. The geometric mean gives 3×1/3=1\sqrt{3 \times 1/3} = 1, a balanced group. The arithmetic mean gives (3 + 1/3) / 2 = 1.67, and averaging the mirror entries below the diagonal also gives 1.67. But a comparison matrix needs the mirror entry to be the reciprocal, 1/1.67 = 0.6, so the aggregated matrix is no longer a valid comparison matrix at all. Aczél and Saaty (1983) proved that the geometric mean is the only aggregation rule satisfying their natural conditions: unanimity (if every participant gives the same judgment, the group judgment is that value) and the reciprocal property (aggregating everyone's reciprocal judgments gives the reciprocal of the aggregate), along with mild regularity requirements such as treating participants symmetrically. Forman and Peniwati (1998) call this approach aggregation of individual judgments (AIJ); the alternative, computing each person's weights first and averaging those (AIP), suits groups that do not share one model of the decision. decisionpoint.io uses AIJ with equal participant weights, as described in the group AHP announcement.

A small implementation detail: decisionpoint.io stores every judgment as a fraction, so "Battery is 3 times Camera" on Camera's row is 1/3 exactly, not 0.3333…. The geometric mean is computed as the geometric mean of the numerators over the geometric mean of the denominators, which is the same number with less floating-point drift, and it keeps aggregated reciprocal pairs exact mirror images of each other.

How do weights turn into final scores?

A full AHP decision produces one comparison matrix for the criteria and one matrix of alternatives per criterion. The criteria matrix yields the criteria weights w^k\hat{w}_k; each per-criterion matrix yields local priorities wi(k)w^{(k)}_i, how well alternative ii does on criterion kk. The final score is a weighted sum:

si=∑kw^k wi(k)s_i = \sum_{k} \hat{w}_k\, w^{(k)}_i

This is the distributive mode of synthesis, in which each criterion's local priorities sum to 1, and it is what decisionpoint.io uses. The literature also has an ideal mode, which instead divides each criterion's local priorities by the largest of them, so the best alternative on every criterion scores 1. The two modes usually agree on the ranking. They differ in rank reversal: under the distributive mode, adding or removing an alternative can reorder the others, which Belton and Gear (1983) raised as an objection and the ideal mode was introduced to address. Saaty's position is that the distributive mode is right when alternatives compete for a share of something, and the ideal mode when only the single best alternative matters.

With subcriteria, weights multiply down the tree. If Cost carries 0.6 of the decision and splits into Purchase price at 0.7 and Running cost at 0.3, their global weights are 0.6 × 0.7 = 0.42 and 0.6 × 0.3 = 0.18. The synthesis then sums over the leaf criteria only, each with its global weight. Every level is normalised to sum to 1, so the final scores do too.

The synthesis step is also where a decision can stop early. A criteria-only analysis ends with the weights w^k\hat{w}_k themselves, for problems where the weights are the deliverable, such as budget shares, scoring rubrics, and KPI weighting.

A complete worked example

This section applies everything above to one decision, end to end: choose a smartphone from X, Y and Z, using Camera, Price and Battery. Twelve judgments in total: 3 for the criteria, 9 for the alternatives.

The criteria matrix and its results, from the power method section:

(1351/3131/51/31)  ⇒  w^=(0.637, 0.258, 0.105),λmax⁡=3.0385,CR=0.033\begin{pmatrix} 1 & 3 & 5 \\ 1/3 & 1 & 3 \\ 1/5 & 1/3 & 1 \end{pmatrix} \;\Rightarrow\; \hat{\mathbf{w}} = (0.637,\ 0.258,\ 0.105), \quad \lambda_{\max} = 3.0385, \quad \mathrm{CR} = 0.033

The alternatives are compared three times, once per criterion. Each 3×3 matrix goes through the same power method. All three happen to share one structure (the judgments are permutations of 1/5, 1/3 and 2), so each has λmax⁡=3.0037\lambda_{\max} = 3.0037 and CR = 0.003:

With respect toX vs YX vs ZY vs ZLocal priorities (X, Y, Z)
Camera1/51/320.109, 0.582, 0.309
Price521/30.582, 0.109, 0.309
Battery31/21/50.309, 0.109, 0.582

Synthesis is one weighted sum per phone. For Phone Y: 0.637 × 0.582 + 0.258 × 0.109 + 0.105 × 0.109 = 0.410.

Criterion (weight)Phone XPhone YPhone Z
Camera (0.637)0.1090.5820.309
Price (0.258)0.5820.1090.309
Battery (0.105)0.3090.1090.582
Final score0.2520.4100.338

Phone Y wins on the strength of its camera under the most important criterion. These are the same numbers shown in Introduction to the AHP; now you can see how they were derived. To see the pipeline run on a larger decision, open the worked AHP example: family car selection in decisionpoint.io.

How is sensitivity analysis computed?

The final scores depend on the criteria weights, and the weights came from human judgments. Sensitivity analysis asks how much the result would change if one of those weights were different. Pick a criterion kk and give its weight a new value tt between 0 and 1. The other criteria must still account for the rest of the decision, so their weights are rescaled proportionally: each keeps the share of the remainder it had before.

w^j(t)=w^j 1−t1−w^kfor j≠k\hat{w}_j(t) = \hat{w}_j\, \frac{1 - t}{1 - \hat{w}_k} \quad \text{for } j \neq k

Substituting these into the synthesis formula gives each alternative's score as a function of tt:

si(t)=t wi(k)+1−t1−w^k∑j≠kw^j wi(j)s_i(t) = t\, w^{(k)}_i + \frac{1 - t}{1 - \hat{w}_k} \sum_{j \neq k} \hat{w}_j\, w^{(j)}_i

Everything in that expression except tt is a constant, so each alternative's score is a straight line in tt. At t=0t = 0 the criterion is switched off, and at t=1t = 1 it is the only criterion, where the score is just the local priority wi(k)w^{(k)}_i. The sensitivity chart in decisionpoint.io is exactly this picture: one line per alternative, with the current weight marked, and the current scores where the lines meet that mark. A tipping point is a weight at which two lines cross and the alternatives swap places. Because the lines are straight, two scores evaluated at the ends of the range fix each line completely, and the crossing of alternatives ii and ll can be solved exactly rather than searched for by stepping through weights:

t∗=d(0)d(0)−d(1),d(t)=si(t)−sl(t)t^{*} = \frac{d(0)}{d(0) - d(1)}, \qquad d(t) = s_i(t) - s_l(t)

A crossing only counts if t∗t^{*} falls strictly inside the range; two lines that meet only at an endpoint, or that coincide throughout, do not swap anything.

Rating stability

Tipping points are plentiful on any real decision, so the Stability Overview in decisionpoint.io reduces them to one number per criterion, following Triantaphyllou and Sánchez (1997). Their analysis shows that a sensitivity measure must make two choices: whether to count any swap of positions or only a change of winner, and whether to measure the change to a weight in absolute points or relative to the weight itself. The measure they call Percent-Top takes the second option both times. For criterion kk, find the nearest crossing in either direction at which some other alternative overtakes the current leader, and report it relative to the current weight:

δk=t∗−w^kw^k\delta_k = \frac{t^{*} - \hat{w}_k}{\hat{w}_k}

Swaps further down the ranking are ignored, and a two-point change counts for more on a weight of 4% than on a weight of 50%. decisionpoint.io labels ∣δk∣<10%|\delta_k| < 10\% as sensitive, 10% to 25% as moderate, and anything larger as stable; a criterion with no such crossing in either direction can never change the winner and is stable too. The bands are our convention, as the paper leaves labelling to the reader. For a subcriterion, the weight is varied within its own group while the parent's weight stays fixed, so the relative change in its local weight equals the relative change in its global weight, and top-level criteria and subcriteria read on the same scale. The stability analysis announcement shows the measure applied to a ten-criterion decision.

The smartphone example

Take Camera, the heaviest criterion at 0.637. Setting t=0t = 0 rescales Price and Battery to 0.712 and 0.288; setting t=1t = 1 leaves only the Camera priorities. Evaluating the three scores at each end gives the lines:

PhoneScore at t=0t = 0Score at t=1t = 1Score at t=0.637t = 0.637
X0.5030.1090.252
Y0.1090.5820.410
Z0.3880.3090.338

Phone Y's line is the only one rising, so increasing the Camera weight can never unseat it. Decreasing it, Y first meets Z: d(0)d(0) = 0.109 − 0.388 = −0.279 and d(1)d(1) = 0.582 − 0.309 = 0.273, so the crossing is at t∗t^{*} = −0.279 / (−0.279 − 0.273) = 0.505. That is a relative change of (0.505 − 0.637) / 0.637 = −20.7%: if Camera matters about a fifth less than the judgments say, Phone Z wins instead, and Camera is rated moderate. Running the same calculation for the other two criteria, Price would have to rise from 0.258 to 0.444 (+72%) before Phone X overtakes Y, and Battery from 0.105 to 0.224 (+114%) before Z does, so both are stable. The decision rests mainly on how much the camera really matters, which is a useful thing to know before acting on it.

Quick reference

A recap of key concepts that we encountered above.

NameFormulaMeaning
Reciprocityaji=1/aij,  aii=1a_{ji} = 1/a_{ij},\; a_{ii} = 1Each pair needs one judgment; the diagonal is 1.
Consistency conditionaik=aij ajka_{ik} = a_{ij}\, a_{jk}Every indirect path agrees with the direct judgment.
Priority vectorAw=λmax⁡w,  wT1=1\mathbf{A}\mathbf{w} = \lambda_{\max}\mathbf{w},\; \mathbf{w}^T\mathbf{1} = 1Weights are the principal eigenvector, scaled to sum to 1.
Power method stepv←Av/(1TAv)\mathbf{v} \leftarrow \mathbf{A}\mathbf{v} / (\mathbf{1}^T \mathbf{A}\mathbf{v})Multiply and normalise until the change is below 10−710^{-7}.
Rayleigh quotientλmax⁡≈(Aw)⋅ww⋅w\lambda_{\max} \approx \frac{(\mathbf{A}\mathbf{w}) \cdot \mathbf{w}}{\mathbf{w} \cdot \mathbf{w}}Estimates the largest eigenvalue from the eigenvector.
Consistency indexCI=λmax⁡−nn−1\mathrm{CI} = \frac{\lambda_{\max} - n}{n-1}Zero when consistent; grows with contradiction.
Consistency ratioCR=CI/RIn\mathrm{CR} = \mathrm{CI} / \mathrm{RI}_nCI against random baseline; accept at ≤0.1\leq 0.1.
Harker fillcii=1+mic_{ii} = 1 + m_i, missing →0\to 0Handles missing comparisons; then proceed as normal.
Group aggregationaijG=(∏haij(h))1/ma^G_{ij} = (\prod_h a^{(h)}_{ij})^{1/m}Geometric mean of the participants' judgments, per pair.
Synthesissi=∑kw^k wi(k)s_i = \sum_k \hat{w}_k\, w^{(k)}_iFinal score: local priorities weighted by criteria weights.
Sensitivity linesi(t)=t wi(k)+1−t1−w^k∑j≠kw^j wi(j)s_i(t) = t\, w^{(k)}_i + \frac{1-t}{1-\hat{w}_k} \sum_{j \neq k} \hat{w}_j\, w^{(j)}_iScore as criterion kk's weight varies; straight in tt, so crossings solve exactly.
Percent-Top stabilityδk=(t∗−w^k)/w^k\delta_k = (t^{*} - \hat{w}_k) / \hat{w}_kNearest relative weight change that changes the winner; sensitive below 10%, moderate to 25%, else stable.

References

Most of these papers are annotated, with verified links and notes on what each contributed, in the AHP Library.

Aczél, J. & Saaty, T.L. (1983). "Procedures for synthesizing ratio judgements." Journal of Mathematical Psychology, 27(1), 93-102.

Alonso, J.A. & Lamata, M.T. (2006). "Consistency in the analytic hierarchy process: a new approach." International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 14(4), 445-459.

Belton, V. & Gear, T. (1983). "On a short-coming of Saaty's method of analytic hierarchies." Omega, 11(3), 228-230.

Brunelli, M. (2015). Introduction to the Analytic Hierarchy Process. SpringerBriefs in Operations Research. doi:10.1007/978-3-319-12502-2. Open-access postprint at Aaltodoc.

Donegan, H.A. & Dodd, F.J. (1991). "A note on Saaty's random indexes." Mathematical and Computer Modelling, 15(10), 135-137.

Forman, E. & Peniwati, K. (1998). "Aggregating individual judgments and priorities with the Analytic Hierarchy Process." European Journal of Operational Research, 108(1), 165-169.

Goepel, K.D. (2013). "Implementing the Analytic Hierarchy Process as a standard method for multi-criteria decision making in corporate enterprises: a new AHP Excel template with multiple inputs." Proceedings of the International Symposium on the Analytic Hierarchy Process, Kuala Lumpur. bpmsg.com.

Goepel, K.D. (2018). "Implementation of an online software tool for the Analytic Hierarchy Process (AHP-OS)." International Journal of the Analytic Hierarchy Process, 10(3), 469-487. doi:10.13033/ijahp.v10i3.590.

Goepel, K.D. (2013). "AHP Excel template numerical accuracy." bpmsg.com.

Harker, P.T. (1987). "Incomplete pairwise comparisons in the analytic hierarchy process." Mathematical Modelling, 9(11), 837-848.

Hefferon, J. Linear Algebra. Free textbook, for readers who want the matrix material in full. hefferon.net/linearalgebra.

Saaty, T.L. (1977). "A scaling method for priorities in hierarchical structures." Journal of Mathematical Psychology, 15(3), 234-281.

Saaty, T.L. (1980). The Analytic Hierarchy Process. McGraw-Hill. Chapter 7 covers positive reciprocal matrices, the computation of the eigenvector (§7-4) and consistency (§7-5).

Saaty, T.L. (2008). "Decision making with the analytic hierarchy process." International Journal of Services Sciences, 1(1), 83-98.

Triantaphyllou, E. & Sánchez, A. (1997). "A sensitivity analysis approach for some deterministic multi-criteria decision-making methods." Decision Sciences, 28(1), 151-194. doi:10.1111/j.1540-5915.1997.tb01306.x.