Coordinates and representation quality
An MFA map gives coordinates that locate individuals and features along axes. A coordinate can be large because the point is far from the origin, because the axis points in a direction that aligns well with the point, or both. Squared cosine separates these ideas: it measures how well a point’s direction is represented by an axis, not how large its coordinate is. This distinction matters when a map is used to describe multi-omics patterns: a prominent coordinate alone does not establish that the plotted axis is a good summary of that individual or feature.
Use the MFA preprocessing and global-space construction established in the earlier material on the MFA compromise space and block scaling. For the formulas below, assume the transformed block matrices have centered columns, individuals have equal weight, and the global PCA axes are orthonormal in the Euclidean coordinates being analyzed. Write \(Y_g\) for the scaled coordinate matrix of block \(g\), and \(y_{ig}\) for its row vector for individual \(i\). Concatenate the blocks to obtain \(Y\), with row \(y_i=(y_{i1},\ldots,y_{iG})\). Let \(u_l\) be a unit global eigenvector for axis \(l\), partitioned into block portions \(v_{gl}\), so \(u_l=(v_{1l},\ldots,v_{Gl})\) and \(\sum_g\|v_{gl}\|^2=1\). The global score of individual \(i\) is \(F_{il}=y_i u_l\), and its partial coordinate from block \(g\) on that global axis is \(f_{igl}=y_{ig}v_{gl}\).
For an individual, the global squared cosine compares the individual’s full concatenated vector with the global axis. A partial squared cosine instead compares the individual’s coordinates in one block with the direction of that axis restricted to the block. Because a restricted vector \(v_{gl}\) is generally not a unit vector, its norm must appear in the partial squared-cosine denominator.
Why the normalization matters
The global formula follows directly because \(u_l\) has unit norm: the general squared cosine between \(y_i\) and \(u_l\) is \((y_i u_l)^2/(\|y_i\|^2\|u_l\|^2)\), and \(\|u_l\|^2=1\). The partial formula follows the same geometric definition, but the restricted direction \(v_{gl}\) need not have unit norm.
The second equality shows the geometric meaning: the numerator on the right is the squared length of the orthogonal projection of \(y_{ig}\) onto the line in direction \(v_{gl}\). In contrast, \(f_{igl}^2/\|y_{ig}\|^2\) is only a score-to-distance ratio when \(v_{gl}\) is not unit length; it is not generally a squared cosine or a proportion of the block vector’s squared length aligned with the partial direction.
For features, use the corresponding geometric comparison in individual space. Let \(x_{gj}\) be the centered column vector of feature \(j\) in block \(g\), and let \(F_l\) be the vector of all individual global scores on axis \(l\). Define the partial score vector \(f_{gl}=Y_gv_{gl}\). The feature’s squared cosine on a global or partial axis compares its sample-space direction with the relevant score vector.
Worked calculations
Worked Example: A Global Individual Squared Cosine
Suppose a hypothetical individual has full MFA coordinates \(y_i=(2,1)\), and the unit global eigenvector for an axis is \(u_l=(0.6,0.8)\). The individual’s global score is \(F_{il}=2(0.6)+1(0.8)=2.0\), and its squared distance from the origin is \(\|y_i\|^2=2^2+1^2=5\). Therefore
The axis represents 80.0% of this individual’s squared distance in the two-dimensional space shown. This is a strong directional representation. It does not say that the individual’s coordinate is large compared with other individuals, nor that the axis explains 80.0% of total data inertia.
Worked Example: Correctly Normalizing a Partial Individual Axis
For a hypothetical individual in one block, let \(y_{ig}=(2,1)\), and let the block portion of a global eigenvector be \(v_{gl}=(0.5,0.5)\). The partial coordinate is \(f_{igl}=2(0.5)+1(0.5)=1.5\). The individual’s squared block distance is \(2^2+1^2=5\), while the squared norm of the partial direction is \(0.5^2+0.5^2=0.5\). Thus
The block portion of the global direction is strongly aligned with this individual’s block vector. Omitting the direction norm would instead yield \(1.5^2/5=0.450\), which is not the geometric squared cosine. For example, if \(y_{ig}=v_{gl}\ne0\), the geometric squared cosine is 1, whatever the nonzero norm of \(v_{gl}\); the formula with the direction norm has this property.
Worked Example: Global and Partial Feature Squared Cosines
Consider a hypothetical centered feature vector \(x_{gj}=(1,-1,0)\) across three individuals. Suppose the global score vector is \(F_l=(2,-1,-1)\) and the partial score vector for this block is \(f_{gl}=(1,0,-1)\). Their squared norms are \(\|x_{gj}\|^2=2\), \(\|F_l\|^2=6\), and \(\|f_{gl}\|^2=2\). The global dot product is \(x_{gj}^{\mathsf T}F_l=2+1+0=3\), and the partial dot product is \(x_{gj}^{\mathsf T}f_{gl}=1+0+0=1\). Therefore
In this hypothetical example the feature aligns more strongly with the global score pattern than with the block’s partial score pattern. These values are squared cosines, equivalently squared correlations here because the vectors are centered. They are not proportions of total feature variance explained unless the interpretation is restricted to the corresponding one-dimensional score direction.
Using squared cosines responsibly
A coordinate and its squared cosine answer different questions. For individuals, the coordinate is a signed projection: its magnitude describes position along the axis, while its sign indicates which side of the origin the individual lies on. The squared cosine is unsigned and describes how much of the individual’s direction is captured by that axis. Thus a distant individual can have a small coordinate on an axis and a low squared cosine there, while a close-to-origin individual can have a high squared cosine despite a small coordinate. Always inspect distances or coordinates alongside squared cosines.
For global individual axes, the squared cosines across a complete orthonormal basis sum to 1 for each nonzero individual. For a displayed subset of axes, their sum is the fraction of that individual’s squared distance represented in the displayed subspace. This property does not automatically apply to partial axes: the block portions of different global eigenvectors need not form an orthonormal set within a block. Nor should feature squared cosines across axes be added as if they were explained-variance proportions; such an interpretation requires suitable orthogonality and a clearly specified set of score directions.
Feature squared cosines are useful for deciding whether a feature is well represented in a plotted score direction. They are not block contributions. A feature may align with an axis without having played a large role in defining it, and the reverse can also occur. Block contributions to global components answer a different question, covered in the earlier material on block contributions.
Diagnostics, alternatives, and limitations
Check the geometry before interpreting any reported value. Confirm whether the point is an individual vector or a feature vector, whether the axis is global or partial, and whether the vectors used in the denominator match that comparison. Verify that a global eigenvector is unit length, and calculate \(\|v_{gl}\|^2\) rather than assuming a block portion is unit length. For partial features, confirm that \(f_{gl}\) is nonzero. A zero individual vector, constant feature vector, zero block direction, or zero score vector makes the relevant squared cosine undefined. Numerical values slightly outside \([0,1]\) can arise from rounding; substantial violations indicate a formula, scaling, or coding error.
A useful alternative for describing global individual representation is the cumulative squared cosine across several displayed axes. For orthonormal global axes this is exactly the fraction of squared distance represented by their joint subspace. Coordinates themselves remain preferable when direction and magnitude are important; squared cosines discard sign and do not rank absolute distances. For partial axes, report the individual partial coordinate and its properly normalized squared cosine together. A raw squared partial coordinate divided by distance may be reported as a score-to-distance ratio, but it must not be labeled a squared cosine.
Squared cosines are descriptive and depend on the chosen preprocessing, scaling, and axes. They do not establish biological causation or statistical significance. A high value for an individual says that its vector aligns with an axis; it does not show that the axis is reproducible, biologically important, or shared across blocks. Those questions require separate assessment. A low value on one axis means poor representation on that direction, not absence of structure elsewhere.
Check Your Understanding
Answer each question, then compare with the solutions below.
- An individual has squared distance 8 and global score 2 on a unit axis. What is its squared cosine, and what does it mean?
- A partial coordinate is 1, the individual’s block squared distance is 4, and the squared norm of the block direction is 0.5. Calculate the partial squared cosine.
- A feature and a nonzero score vector have squared norms 5 and 10, and their dot product is 5. Calculate their squared cosine.
- Why can squared cosines across partial axes in one block fail to sum to at most 1?
Solutions. (1) \(2^2/8=0.500\): the global axis represents half the individual’s squared distance along that direction. (2) \(1^2/(4(0.5))=0.500\). (3) \(5^2/(5(10))=0.500\). (4) Restricted portions of orthonormal global eigenvectors need not be orthogonal within a block; the projection fractions therefore do not generally add as they do for a global orthonormal basis.