Singular values, the two Gram spectra, and the singular system #
Mathlib defines the singular values of a linear map A : E โโ[๐] F between finite-dimensional
inner product spaces from the source Gram operator Aโ A (LinearMap.singularValues). This file
shows that the target Gram operator A Aโ carries the same information: the nonzero eigenvalues
of Aโ A and A Aโ agree with multiplicity, so their sorted eigenvalue lists agree through the
common dimension and vanish beyond the rank of A. Equivalently, A and Aโ have the same
singular values.
The multiplicity statement is Module.End.finrank_eigenspace_comp_comm applied to A and Aโ .
A positive value s occurs among the singular values of A as often as sยฒ occurs among the
eigenvalues of Aโ A (LinearMap.ncard_ofPred_singularValues_eq), and a sorted zero-padded
sequence is determined by these multiplicities (Finsupp.eq_of_antitone_of_ncard_eq).
Main declarations #
LinearMap.ncard_ofPred_singularValues_eq: the multiplicity of a positive singular valuesis the dimension of thesยฒ-eigenspace ofAโ A.LinearMap.singularValues_adjoint:Aโhas the same singular values asA.LinearMap.sq_singularValues_eq_eigenvalues_self_comp_adjoint: the squared singular values are also the sorted eigenvalues ofA Aโ.LinearMap.eigenvalues_adjoint_comp_self_eq_eigenvalues_self_comp_adjoint: the sorted eigenvalues ofAโ AandA Aโagree at every index below both dimensions.LinearMap.eigenvalues_adjoint_comp_self_eq_zero_iff,LinearMap.eigenvalues_self_comp_adjoint_eq_zero_iff: both sorted eigenvalue lists vanish exactly from the rank ofAon.
The singular system #
The second half of the file builds the singular system of A from these spectra. The right
singular basis (vแตข) = A.rightSingularBasis is the ordered orthonormal eigenbasis of Aโ A, in
whose order the singular values are listed (LinearMap.sq_singularValues_fin), and the left
singular vectors are uแตข = ฯแตขโปยน A vแตข = A.leftSingularVector i, using total field inversion so
that uแตข = 0 when ฯแตข = 0. The singular relations hold at every index, which lets the expansion
of A run over the whole basis without splitting off the kernel.
LinearMap.sq_singularValues_antitone: the squared singular values are nonincreasing.LinearMap.sq_singularValues_eq_of_adjoint_comp_self_eigenbasis: any sorted orthonormal Gram eigenbasis recovers the squared singular values, with a zero tail.LinearMap.norm_apply_le_of_mem_spanIndices_of_adjoint_comp_self_eigenbasis: an upper bound forโA xโon a span of Gram eigenvectors with bounded eigenvalues.LinearMap.adjoint_comp_self_rightSingularBasis:Aโ A vแตข = ฯแตขยฒ vแตข.LinearMap.singularValues_eq_single_of_finrank_eq_one: on a one-dimensional source the only singular value isโA xโfor a unit vectorx.LinearMap.singularValues_mul_norm_le_norm_apply,LinearMap.norm_apply_le_singularValues_mul_norm:ฯโ โxโ โค โA xโon the span of thevแตขwithi โค n, andโA xโ โค ฯโ โxโon the span of thevแตขwithn โค i.LinearMap.apply_rightSingularBasis:A vแตข = ฯแตข uแตข.LinearMap.adjoint_leftSingularVector:Aโ uแตข = ฯแตข vแตข.LinearMap.self_comp_adjoint_leftSingularVector:A Aโ uแตข = ฯแตขยฒ uแตข.LinearMap.orthonormal_leftSingularVector: theuแตขwithฯแตข โ 0are orthonormal.LinearMap.sum_norm_inner_leftSingularVector_sq_le: Bessel's inequality for the whole family(uแตข), zero vectors included.LinearMap.apply_eq_sum_singularValues_smul:A x = โแตข ฯแตข โชvแตข, xโซ uแตข.LinearMap.eq_sum_singularValues_smul_rankOne:A = โแตข ฯแตข uแตข โ vแตข, the singular value decomposition in rank-one form.LinearMap.exists_orthonormalBasis_apply_eq_leftSingularVector: the nonzero left singular vectors extend, index by index, to an orthonormal basis of the codomain.
Comparison of singular values #
The comparison section compares the singular values of two maps with the same source through the CourantโFischer minโmax principle for their source Gram operators.
LinearMap.singularValues_le_mul_of_norm_apply_le: ifโB xโ โค c โA xโfor everyx, thenฯแตข(B) โค c ฯแตข(A)for everyi.LinearMap.singularValues_comp_le: ifโC yโ โค c โyโfor everyy, thenฯแตข(C A) โค c ฯแตข(A)for everyi.LinearMap.singularValues_le_of_norm_apply_le: ifโA xโ โค c โxโfor everyx, withc โฅ 0, thenฯแตข(A) โค cfor everyi.LinearMap.singularValues_eq_of_norm_apply_eq: ifโB xโ = โA xโfor everyx, thenAandBhave the same singular values.LinearMap.singularValues_operatorAbs: the modulus|A| = โ(Aโ A)has the same singular values asA.LinearMap.singularValues_linearIsometry_comp,LinearMap.singularValues_comp_adjoint_linearIsometry: composing on the left with a linear isometry, or on the right with the adjoint of one, leaves the singular values unchanged.LinearMap.singularValues_linearIsometryEquiv_comp,LinearMap.singularValues_comp_linearIsometryEquiv: composing with isometric isomorphisms on either side leaves the singular values unchanged.ContinuousLinearMap.singularValues_comp_starProjection_range: an operator into any finite- dimensional inner product space has the same singular values after a range projection as after the corresponding isometric trial map.
Diagonal models #
For an orthonormal basis (eแตข) of E and scalars (dแตข), the diagonal operator with eแตข as
eigenvectors and diagonal entries dแตข is Mathlib's
Matrix.toLin e.toBasis e.toBasis (Matrix.diagonal d). Its additivity in d
(Matrix.diagonal_add), its adjoint (Matrix.toLin_conjTranspose with
Matrix.diagonal_conjTranspose) and its symmetry for real entries (Matrix.isSymmetric_toLin_iff)
are in Mathlib. The diagonal section computes its singular values and shows that every map is a
diagonal map up to isometries on both sides.
Matrix.toLin_diagonal_apply_self: the diagonal operator sendseแตขtodแตข eแตข.Matrix.adjoint_comp_self_toLin_diagonal_apply: the Gram operator sendseแตขtoโdแตขโยฒ eแตข.OrthonormalBasis.adjoint_comp_self_toLin_diagonal_reindex_apply: the same Gram relation in a reordered diagonal basis.Matrix.singularValues_toLin_diagonal: the singular values of the diagonal operator are the normsโdแตขโlisted in nonincreasing order.Matrix.toLin_of_ite_val_eq_apply: the rectangular diagonal map with entriesdโsendseแตขtodแตข fแตขwheniis also an index of(fโฑผ), and to0otherwise.LinearMap.exists_linearIsometryEquiv_eq_comp_toLin_comp: every mapA : E โโ[๐] FisU D Vfor linear isometric equivalencesUofFandVofEand the rectangular diagonal mapDwith the singular values ofAon its diagonal, in any prescribed orthonormal bases.LinearMap.exists_linearIsometryEquiv_eq_comp_toLin_diagonal_comp: every endomorphismAisU D Vfor linear isometric equivalencesU,Vand the diagonal operatorDwith the singular values ofAas entries, in any prescribed orthonormal basis.LinearMap.exists_orthonormal_eq_sum_singularValues_smul_rankOne: the compact singular value decompositionA = โ_{i < p} ฯแตข wแตข โ vแตข, withp = min (dim E) (dim F)and both families orthonormal.
Orthogonal-tail bound for bounded maps #
The final section transfers the Gram-eigenbasis estimate to bounded maps, supplying the tail bound used in the EckartโYoung and attainment theorems.
ContinuousLinearMap.norm_comp_orthogonal_spanIndices_le_of_adjoint_comp_self_eigenbasis: the norm on the orthogonal complement of the firstnvectors of a sorted Gram eigenbasis is at most then-th singular value, including indices beyond the source dimension.
Source #
The singular-system definitions LinearMap.rightSingularBasis and
LinearMap.leftSingularVector are adapted from the
AIQ-Kitware DKPS formalization.
Original copyright (c) 2026 Kitware, Inc.; Apache-2.0.
References #
- R. A. Horn and C. R. Johnson, Matrix Analysis, second edition, Cambridge University Press, 2013, Theorem 1.3.22, Theorem 2.6.3 and Section 7.3.
- R. A. Horn and C. R. Johnson, Topics in Matrix Analysis, Cambridge University Press, 1991, Section 3.3.
- R. Bhatia, Matrix Analysis, Graduate Texts in Mathematics 169, Springer, 1997, Section I.2 (the singular value decomposition).
A positive value s occurs among the singular values of T as many times as the dimension
of the sยฒ-eigenspace of Tโ T.
A linear map and its adjoint have the same singular values.
The singular values of A : E โโ[๐] F vanish from the dimension of the target on.
A sum โแตข f(ฯแตข(A)) over the first dim E singular values is the Finsupp sum of f over
all singular values, provided f 0 = 0.
The squared singular values of A are the sorted eigenvalues of the target Gram operator
A Aโ , at every index below the dimension of the target.
The sorted eigenvalues of the source Gram operator Aโ A and the target Gram operator A Aโ
agree at every index below both dimensions.
The sorted eigenvalues of the source Gram operator Aโ A vanish exactly from the rank of A
on.
The sorted eigenvalues of the target Gram operator A Aโ vanish exactly from the rank of A
on.
The squared singular values are nonincreasing, including the zero tail.
The right singular basis of A: the orthonormal eigenbasis (vแตข) of the source Gram
operator Aโ A, ordered so that Aโ A vแตข = ฯแตขยฒ vแตข for the singular values
ฯแตข = A.singularValues i of A, listed in nonincreasing order.
Instances For
The right singular basis is Mathlib's ordered eigenbasis of Aโ A; this connects it to the
LinearMap.IsSymmetric.eigenvectorBasis API.
The right singular vectors are eigenvectors of Aโ A for the squared singular values.
Inner products of A vแตข against the range of A: โชA vแตข, A xโซ = ฯแตขยฒ โชvแตข, xโซ for a right
singular vector vแตข.
A stretches the i-th right singular vector by the i-th singular value:
โA vแตขโ = ฯแตข.
On a one-dimensional source, the singular values of A are โA xโ for any unit vector x,
followed by zeros.
A right singular vector lies in the kernel of A exactly when its singular value
vanishes.
On the span of the right singular vectors vแตข with i โค n, A stretches every vector by at
least the n-th singular value: ฯโ โxโ โค โA xโ.
An upper bound on the Gram eigenvalues of a selected span bounds the norm of A there.
A sorted orthonormal eigenbasis of the Gram operator computes the squared singular values.
On the span of the right singular vectors vแตข with n โค i, A stretches every vector by at
most the n-th singular value: โA xโ โค ฯโ โxโ.
A right singular vector with singular value zero lies in the kernel, so A vแตข is fixed by
the scalar ฯแตขโปยฒ ฯแตขยฒ (with total field inversion) even when ฯแตข = 0.
The left singular vectors of A: uแตข = ฯแตขโปยน A vแตข for the right singular basis (vแตข),
with total field inversion, so that uแตข = 0 when ฯแตข = 0. The vectors with ฯแตข โ 0 form an
orthonormal family (LinearMap.orthonormal_leftSingularVector).
Instances For
Unfolds the left singular vector uแตข = ฯแตขโปยน A vแตข.
The singular relation A vแตข = ฯแตข uแตข, valid at every index, including those with
ฯแตข = 0.
The left singular vectors are orthonormal up to the zero vectors at the vanishing singular
values: โชuแตข, uโฑผโซ is 1 if i = j and ฯแตข โ 0, and 0 otherwise.
The left singular vectors with nonzero singular value form an orthonormal family.
A left singular vector vanishes exactly when its singular value does.
A left singular vector has norm at most one: it is a unit vector when its singular value is nonzero and zero otherwise.
Bessel's inequality for the left singular vectors: โแตข โโชuแตข, xโซโยฒ โค โxโยฒ. The vectors at
the vanishing singular values are zero, so the orthonormal subfamily carries the whole sum.
The adjoint singular relation Aโ uแตข = ฯแตข vแตข, valid at every index, including those with
ฯแตข = 0.
The eigenvalue equation A Aโ uแตข = ฯแตขยฒ uแตข for the target Gram operator, at every index.
When ฯแตข โ 0, uแตข is an eigenvector of A Aโ for ฯแตขยฒ; when ฯแตข = 0, uแตข = 0.
The singular expansion of a vector: A x = โแตข ฯแตข โชvแตข, xโซ uแตข.
The singular value decomposition in rank-one form: A = โแตข ฯแตข uแตข โ vแตข, where
u โ v is the rank-one map x โฆ โชv, xโซ u.
The left singular vectors with nonzero singular value extend to an orthonormal basis of the
codomain, indexed compatibly with the right singular basis: there is an orthonormal basis (wโฑผ)
of F with wแตข = uแตข whenever ฯแตข โ 0. Together with LinearMap.apply_rightSingularBasis
this gives A vแตข = ฯแตข wแตข at every index below both dimensions.
If โB xโ โค c * โA xโ for every x, then every singular value of B is at most c times the
corresponding singular value of A.
Bounded-factor domination. If โC yโ โค c * โyโ for every y (for c โฅ 0: if C has
operator norm at most c), then ฯแตข(C A) โค c ฯแตข(A) for every i.
If โA xโ โค c * โxโ for every x (for c โฅ 0: if A has operator norm at most c), then
every singular value of A is at most c.
Two maps with the same source and โB xโ = โA xโ for every x have the same singular
values.
The modulus |A| = โ(Aโ A) of a map has the same singular values as the map itself.
Composing on the left with a linear isometry leaves the singular values unchanged.
Composing on the right with the adjoint of a linear isometry leaves the singular values unchanged.
Composing on the left with an isometric isomorphism leaves the singular values unchanged.
Composing on the right with an isometric isomorphism leaves the singular values unchanged.
Scaling a map by c scales its singular values by โcโ.
The diagonal operator of an orthonormal basis (eแตข) with entries (dแตข) has eแตข as an
eigenvector with eigenvalue dแตข.
The Gram operator of a diagonal map has eigenvalues equal to the squared diagonal norms.
Reindexing a diagonal basis preserves the Gram eigenvector equations, with the squared diagonal norms reindexed by the same equivalence.
Singular values of a diagonal operator. If ฯ lists the indices so that the norms
โd (ฯ k)โ are nonincreasing, then the k-th singular value of the diagonal operator with entries
d in an orthonormal basis is โd (ฯ k)โ. The singular values from Fintype.card ฮน on vanish
(LinearMap.singularValues_of_finrank_le).
The rectangular diagonal map with entries d in orthonormal bases (eแตข)_{i < m} and
(fโฑผ)_{j < n} sends eแตข to dแตข fแตข when i < n, and to 0 otherwise.
Rectangular singular-value factorization. Every linear map A : E โโ[๐] F between
finite-dimensional inner product spaces factors as A = U D V, where U and V are linear
isometric equivalences of F and E, and D is the rectangular diagonal map whose matrix in
prescribed orthonormal bases (eแตข) of E and (fโฑผ) of F has the singular values of A on its
diagonal: D eแตข = ฯแตข fแตข when i is also an index of (fโฑผ), and D eแตข = 0 otherwise.
Singular-value diagonal factorization. Every endomorphism A of a finite-dimensional
inner product space factors as A = U D V, where U and V are linear isometric equivalences
and D is the diagonal operator whose entries in a prescribed orthonormal basis (eแตข) are the
singular values of A.
Compact singular value decomposition. With p = min (dim E) (dim F), every map
A : E โโ[๐] F is โ_{i < p} ฯแตข wแตข โ vแตข for orthonormal families (vแตข) in E and (wแตข) in
F, where u โ v is the rank-one map x โฆ โชv, xโซ u. Unlike
LinearMap.eq_sum_singularValues_smul_rankOne, both families are orthonormal, including at the
indices where ฯแตข = 0.
For a sorted orthonormal eigenbasis of Tโ T, the norm on the orthogonal complement
of its first n vectors is at most the n-th singular value, including the zero tail.
For an isometry X, an operator T has the same singular values after the projection onto
range X as after X itself: T P_{range X} = (T X) Xโ and Xโ is the adjoint of an isometry.