Why Center Genotype Counts?
A raw genotype dosage counts copies of a chosen allele, but a dosage of 1 does not have the same meaning at every variant. If an allele is common, a dosage near 2 is unsurprising; if it is rare, the same dosage is unusual. A genomic relationship matrix accounts for this by centering each dosage at its frequency-based expectation and scaling the resulting products by their expected variation.
The matrix summarizes how similarly individuals deviate from allele-frequency expectations across the included markers. It is a measure of genomic similarity relative to that frequency baseline, not a direct probability of identity by descent and not, by itself, a pedigree kinship coefficient.
The allele designated as counted is arbitrary, but it must be used consistently with its frequency. Genotype dosage 0 means no copies of that allele, 1 means one copy, and 2 means two copies. The frequency \(p_j\) may be estimated in the analysis sample or taken from a stated reference population; those choices define different centering baselines.
From Genotype Variance to the Matrix Formula
Under random mating at a biallelic locus, the two allele copies can be represented as independent Bernoulli variables with probability \(p_j\) of carrying the counted allele. Their sum is the dosage \(X_{ij}\). Thus its expected value is \(2p_j\), and its variance is \(2p_j(1-p_j)\). The centered count \(Z_{ij}\) therefore has expectation zero and this same variance under that model.
For a single marker, the product \(Z_{ij}Z_{kj}\) is positive when two individuals' dosages lie on the same side of the expected dosage, negative when they lie on opposite sides, and zero if either centered dosage is zero. Summing these products across markers gives a total measure of matching deviations. The denominator is the sum of the expected single-individual genotype variances, which puts the sum on a frequency-aware scale.
This expression shows the role of standardization. Each centered count is divided by its expected standard deviation, and the resulting product is weighted by the marker's share of total expected genotype variance. The weights are nonnegative and sum to 1. Consequently, markers with greater expected genotype variance contribute more to this particular normalized matrix; it is not the same as assigning every locus equal weight to its standardized product.
If \(Z\) denotes the matrix of centered counts and \(d=\sum_j2p_j(1-p_j)\), the same definition is \(G=ZZ^{\mathsf T}/d\). This form also establishes two basic properties. The matrix is symmetric because \(Z_{ij}Z_{kj}=Z_{kj}Z_{ij}\). It is positive semidefinite because for any vector \(a\), $$ a^{\mathsf T}Ga=\frac{a^{\mathsf T}ZZ^{\mathsf T}a}{d} =\frac{\lVert Z^{\mathsf T}a\rVert^2}{d}\geq 0, $$ provided \(d>0\). These properties follow from the construction; they do not imply that every entry is positive.
Worked Example: Centering and Scaling One Genotype
Suppose a reference population gives a counted-allele frequency \(p=0.30\) at a biallelic marker. A hypothetical individual has dosage \(X=0\). Find the centered dosage, its standardized value, and its contribution to the diagonal numerator at this marker.
The expected dosage is \(2p=2(0.30)=0.60\), so the centered dosage is \(Z=X-2p=0-0.60=-0.60\). The expected genotype variance under the model is \(2p(1-p)=2(0.30)(0.70)=0.42\), with standard deviation \(\sqrt{0.42}\approx0.6481\). The standardized centered dosage is therefore \(-0.60/\sqrt{0.42}\approx-0.9258\).
For this marker alone, the diagonal entry is \(Z^2/[2p(1-p)]=(-0.60)^2/0.42=0.36/0.42\approx0.8571\). The value reflects the squared deviation from the frequency-based expectation relative to expected genotype variance at this locus. A multi-marker diagonal combines such contributions and uses their total variance in the denominator.
What an Off-Diagonal Entry Means
For two different individuals, an off-diagonal entry \(G_{ik}\) aggregates the products of their centered dosages. A positive entry indicates that, across the markers in the calculation, their dosage deviations tend to point in the same direction more than in opposite directions. A negative entry indicates net opposite-direction deviation relative to the allele-frequency baseline. A value near zero indicates little net centered covariance in this aggregate; it does not prove that the individuals share no alleles or have no relationship.
In particular, a negative entry is not “negative kinship.” It can arise when one person tends to have more copies of the counted allele than expected at markers where the other tends to have fewer. The statistic is centered on the chosen allele frequencies, so its sign describes relative covariance around that baseline. Its magnitude also depends on the marker set and frequency inputs.
Worked Example: Calculating an Off-Diagonal Entry
Consider two hypothetical individuals at two markers, each with \(p_j=0.50\). Individual A has dosages \((0,0)\), and individual B has dosages \((0,1)\). Calculate their off-diagonal entry using the normalized matrix formula.
At both markers the expected dosage is \(2p_j=1\), so A's centered dosages are \((-1,-1)\) and B's are \((-1,0)\). Each marker has expected variance \(2(0.50)(0.50)=0.50\); the denominator across the two markers is \(0.50+0.50=1.00\). The numerator is \( (-1)(-1)+(-1)(0)=1+0=1 \). Therefore \(G_{AB}=1/1=1.000\).
The positive value comes from the first marker, where both dosages are below expectation; the second marker contributes zero because B's dosage equals expectation. This calculation describes their centered genotype similarity for these markers, not a probability or a causal effect.
Worked Matrix From a Genotype Table
The calculation is easiest to audit by writing the dosage table, the frequencies, and the centered-count table separately. In the following hypothetical example, frequencies are estimated from the three individuals shown. There are no missing genotypes, and all markers are polymorphic.
| Individual | Marker 1 dosage | Marker 2 dosage | Marker 3 dosage |
|---|---|---|---|
| A | 0 | 0 | 1 |
| B | 1 | 0 | 1 |
| C | 2 | 1 | 0 |
The counted-allele frequencies are the total dosages divided by the six allele copies observed at each marker. Thus \(p_1=(0+1+2)/6=1/2\), \(p_2=(0+0+1)/6=1/6\), and \(p_3=(1+1+0)/6=1/3\). The expected dosages are consequently \(1\), \(1/3\), and \(2/3\). Subtracting these expectations gives:
| Individual | \(Z_{i1}\) | \(Z_{i2}\) | \(Z_{i3}\) |
|---|---|---|---|
| A | -1 | -1/3 | 1/3 |
| B | 0 | -1/3 | 1/3 |
| C | 1 | 2/3 | -2/3 |
Worked Example: Building the Full Three-Individual Matrix
First calculate the shared denominator. The three marker variances are \(2(1/2)(1/2)=1/2\), \(2(1/6)(5/6)=5/18\), and \(2(1/3)(2/3)=4/9\). Therefore \(d=1/2+5/18+4/9=9/18+5/18+8/18=22/18=11/9\approx1.2222\).
For A and B, the numerator is \( (-1)(0)+(-1/3)(-1/3)+(1/3)(1/3)=2/9 \). Hence \(G_{AB}=(2/9)/(11/9)=2/11\approx0.1818\).
For A and C, the numerator is \( (-1)(1)+(-1/3)(2/3)+(1/3)(-2/3)=-1-2/9-2/9=-13/9 \). Hence \(G_{AC}=(-13/9)/(11/9)=-13/11\approx-1.182\).
For B and C, the numerator is \( (0)(1)+(-1/3)(2/3)+(1/3)(-2/3)=-4/9 \). Hence \(G_{BC}=(-4/9)/(11/9)=-4/11\approx-0.3636\).
The diagonal numerators are dot products of each centered row with itself. For A this is \(1+1/9+1/9=11/9\), giving \(G_{AA}=1\). For B it is \(0+1/9+1/9=2/9\), giving \(G_{BB}=2/11\approx0.1818\). For C it is \(1+4/9+4/9=17/9\), giving \(G_{CC}=17/11\approx1.545\). Putting the entries together gives
The symmetry is visible: \(G_{AB}=G_{BA}\), \(G_{AC}=G_{CA}\), and \(G_{BC}=G_{CB}\). The negative A–C entry means their centered dosage deviations have net opposite direction across these three markers. It does not establish that A and C are unrelated, and the entry should not be read as a negative probability.
Assumptions, Limits, and a Common Pitfall
The dosage formula applies to diploid biallelic genotypes represented as counts from 0 to 2. The variance normalization \(2p_j(1-p_j)\) is the genotype variance under Hardy–Weinberg proportions, or equivalently under the independent-allele model used in the derivation. The matrix can still be computed as an algebraic summary when observed genotypes depart from that model, but the variance-based interpretation of the scaling then needs care.
A marker with \(p_j=0\) or \(p_j=1\) has zero denominator contribution and no variation to distinguish individuals; it must be excluded from this calculation. The full matrix also requires a consistent set of included markers and allele-frequency inputs. For the worked table, every individual had a complete dosage at every marker, so the same marker set and denominator were used for every pair.
- Pitfall: treating raw dosage products as relationships. Multiplying dosages directly makes common alleles and high expected dosages dominate, even when two people's counts are not unusual relative to the allele frequencies. Center first using \(X_{ij}-2p_j\), then apply the stated normalization.
- Pitfall: reading a negative entry as negative kinship. The entry is a centered covariance-like summary, not a probability. A negative value means net opposite deviations from the selected frequency baseline across the markers used.
- Pitfall: assuming all standardized GRMs use identical locus weights. The formula here pools centered products and divides by the sum of expected variances. Averaging per-marker standardized products equally defines a different weighting scheme; state which convention is being used before comparing values.
The matrix's diagonal values are also produced by this same formula, but their detailed interpretation is a separate question. For now, the central point is that every entry comes from frequency-centered dosage products on a shared variance scale. Off-diagonal entries summarize pairwise similarity around that baseline, and the chosen frequencies and markers are part of what the summary means.
Check Your Understanding
Answer each question using the frequency-centered, variance-normalized definition in this tutorial.
- For a marker with \(p=0.20\), what is the expected dosage and the expected genotype variance under the independent-allele model?
- Two individuals have centered dosages of \(-1\) and \(0.5\) at a marker. Is their product positive, negative, or zero, and what does its sign indicate?
- Why is a marker with allele frequency 0 or 1 excluded from this normalization?
- In the three-person example, why was \(G_{AC}\) negative even though a relationship matrix is positive semidefinite?
- How does the pooled variance-normalized formula weight a marker compared with an equal-weight average of per-marker standardized products?