When discussing one person without naming them, write , , and for their unit profile , centered profile , and retained score row . The rows have coordinates and has . Let be the reconstruction of ; the hat denotes an approximation returned from retained coordinates. After calculating , multiply by the transpose:
Adding gives the corresponding reconstruction of the unit news profile. It does not give back the original articles.
An orthogonal projector keeps a vector’s component in a chosen subspace and discards its perpendicular component. Let be the forward-and-return matrix, defined by . A symmetric matrix equals its transpose; an idempotent matrix has the same effect when applied twice as once. Because the columns of are orthonormal, has both properties:
The first equality expresses symmetry and the second idempotence. Together these identify an orthogonal projector. Once a row lies in the retained plane, projecting it onto that plane again changes nothing.
The residual is the difference between the original centered row and its reconstruction, . It is perpendicular to the retained directions. Consequently,
This is the familiar right-triangle rule, now applied to components of a vector. In the fitted toy example, A’s discarded squared length is approximately 0.2650. The example script checks the decomposition and the orthogonality of the residual using unrounded values.
To see the loss without decimals, set aside the fitted toy matrix for a moment. Let denote this deliberately chosen matrix; the star distinguishes it from the fitted :
This is an illustration, not another fit. It retains the shared direction of the first two coordinates and retains the third coordinate separately. A query goes forward to and returns as . The first-versus-second distinction was discarded.
A linear map preserves addition and scaling; multiplication by a fixed matrix is an example. An adjoint transfers a linear map to the other side of a dot product; for real matrices with Euclidean dot products, it is the transpose. Least squares means minimizing the sum of squared coordinate discrepancies. A Moore-Penrose pseudoinverse is a generalized inverse that gives least-squares solutions, choosing the shortest solution when several are possible. Because has orthonormal columns, is both its adjoint and its pseudoinverse. It returns the least-squares reconstruction of a centered profile in the retained subspace. A two-sided inverse would undo the map in both directions for every input; this transpose cannot do that. With 24 retained directions out of 60, there is no way to recover every possible original 60-coordinate row.
The first retained coordinate of is ; the second is zero. Returning multiplies the first column by , giving . Subtraction leaves . Its squared length is , and its dot products with both retained columns are zero. The returned part also has squared length , so .
Any alternative reconstruction inside the retained plane can be written , where and are real scalar choices. Its squared discrepancy from is
Squares cannot be negative, so the minimum is , achieved at and . This proves the least-squares claim for this example without asking the reader to trust an inverse formula.
Even retaining every people direction would not recover an article list from a person profile. The earlier pipeline also reduced a 384-coordinate embedding to 60 news coordinates, averaged articles, subtracted backgrounds, and normalized lengths. Many different inputs can give the same output after those operations.
Navigation is valuable without being invertible. It provides linked views of a representation and routes back to stored evidence. The article links and factual sources are retained separately precisely because the vector cannot reconstruct them.
Singular value decomposition (SVD) factors a matrix into two sets of orthonormal directions and nonnegative scale factors called singular values. For a longer prerequisite, revisit the Eigen Times SVD chapter. The operator selects the smaller of two numbers. For the centered matrix , let . In the thin decomposition, is an matrix of left directions, indexed by people, and is a matrix of right directions, indexed by news coordinates. Both have orthonormal columns. Let be the diagonal matrix of singular values in descending order. Then
Recall that counts retained positive people directions. Let and contain the first columns of their respective matrices, and let contain the leading diagonal block of . Thus has shape and shape . Using the same ordering and orientation as the people eigendecomposition gives and
The scores include the singular values; they are not just the columns of . Each squared singular value divided by equals the corresponding eigenvalue of the earlier people covariance. The right directions come from , while the left directions come from . These are two sides of the same centered profile matrix. An adjacency matrix instead records which graph nodes have edges between them. Neither calculation uses that matrix from Anthropology’s relationship graph. A graph community is a group of nodes relatively densely linked to one another. Communities and people patterns can be interesting to compare, but they are not the same construction.
Check 6. For above, project forward and back. Compare its returned row with the return from . What information can the map no longer distinguish?
Use a separate centered table with four rows , , , and . Each column sums to zero. Multiplication gives : the first column’s squares sum to two, the second’s to eight, and their paired products are zero.
The largest right direction is therefore , followed by . The singular values are the square roots of eight and two: and . Projecting the rows onto the first right direction gives . Divide that column by to obtain its unit left direction . The second left direction is .
Now multiply back: the first left column times times the first right row restores only the second coordinate; the second term restores only the first coordinate. Adding the two restores every entry of . With four observations, the covariance eigenvalues are and . Keeping only the first singular direction retains of the total squared length. The discarded first-coordinate column has squared length two. This shows explicitly why scores contain singular values: the left direction has unit length, while its score column here has length .
The native OCaml teaching routine obtains a small SVD through a symmetric Gram matrix, the product . That is adequate for these tiny well-scaled demonstrations; it is not presented as a numerically preferred algorithm for a large production fit. Both notebooks verify reconstruction, orthonormality, and the independent singular values.