Documentation

TauCeti.Analysis.InnerProductSpace.SingularValues

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 #

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.

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.

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.

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.

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 #

theorem LinearMap.ncard_ofPred_singularValues_eq {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (T : E โ†’โ‚—[๐•œ] F) {s : โ„} (hs : 0 < s) :

A positive value s occurs among the singular values of T as many times as the dimension of the sยฒ-eigenspace of Tโ€  T.

@[simp]
theorem LinearMap.singularValues_adjoint {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :

A linear map and its adjoint have the same singular values.

theorem LinearMap.singularValues_of_finrank_le_right {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {i : โ„•} (hi : Module.finrank ๐•œ F โ‰ค i) :

The singular values of A : E โ†’โ‚—[๐•œ] F vanish from the dimension of the target on.

theorem LinearMap.sum_fin_singularValues {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {M : Type u_4} [AddCommMonoid M] (A : E โ†’โ‚—[๐•œ] F) (f : โ„ โ†’ M) (hf : f 0 = 0) :
โˆ‘ i : Fin (Module.finrank ๐•œ E), f (A.singularValues โ†‘i) = A.singularValues.sum fun (x : โ„•) (s : โ„) => f s

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.

theorem LinearMap.sq_singularValues_eq_eigenvalues_self_comp_adjoint {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {n : โ„•} (hn : Module.finrank ๐•œ F = n) {i : โ„•} (hin : i < n) :

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.

theorem LinearMap.eigenvalues_adjoint_comp_self_eq_eigenvalues_self_comp_adjoint {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {m n : โ„•} (hm : Module.finrank ๐•œ E = m) (hn : Module.finrank ๐•œ F = n) {i : โ„•} (him : i < m) (hin : i < n) :
โ‹ฏ.eigenvalues hm โŸจi, himโŸฉ = โ‹ฏ.eigenvalues hn โŸจi, hinโŸฉ

The sorted eigenvalues of the source Gram operator Aโ€  A and the target Gram operator A Aโ€  agree at every index below both dimensions.

theorem LinearMap.eigenvalues_adjoint_comp_self_eq_zero_iff {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {m : โ„•} (hm : Module.finrank ๐•œ E = m) {i : โ„•} (him : i < m) :
โ‹ฏ.eigenvalues hm โŸจi, himโŸฉ = 0 โ†” Module.finrank ๐•œ โ†ฅA.range โ‰ค i

The sorted eigenvalues of the source Gram operator Aโ€  A vanish exactly from the rank of A on.

theorem LinearMap.eigenvalues_self_comp_adjoint_eq_zero_iff {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {n : โ„•} (hn : Module.finrank ๐•œ F = n) {i : โ„•} (hin : i < n) :
โ‹ฏ.eigenvalues hn โŸจi, hinโŸฉ = 0 โ†” Module.finrank ๐•œ โ†ฅA.range โ‰ค i

The sorted eigenvalues of the target Gram operator A Aโ€  vanish exactly from the rank of A on.

theorem LinearMap.sq_singularValues_antitone {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :
Antitone fun (i : โ„•) => A.singularValues i ^ 2

The squared singular values are nonincreasing, including the zero tail.

noncomputable def LinearMap.rightSingularBasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :
OrthonormalBasis (Fin (Module.finrank ๐•œ E)) ๐•œ E

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
    theorem LinearMap.rightSingularBasis_def {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :

    The right singular basis is Mathlib's ordered eigenbasis of Aโ€  A; this connects it to the LinearMap.IsSymmetric.eigenvectorBasis API.

    theorem LinearMap.adjoint_comp_self_rightSingularBasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :

    The right singular vectors are eigenvectors of Aโ€  A for the squared singular values.

    theorem LinearMap.inner_apply_rightSingularBasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) (x : E) :
    inner ๐•œ (A (A.rightSingularBasis i)) (A x) = โ†‘(A.singularValues โ†‘i ^ 2) * inner ๐•œ (A.rightSingularBasis i) x

    Inner products of A vแตข against the range of A: โŸชA vแตข, A xโŸซ = ฯƒแตขยฒ โŸชvแตข, xโŸซ for a right singular vector vแตข.

    @[simp]
    theorem LinearMap.norm_apply_rightSingularBasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :

    A stretches the i-th right singular vector by the i-th singular value: โ€–A vแตขโ€– = ฯƒแตข.

    theorem LinearMap.singularValues_eq_single_of_finrank_eq_one {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (hE : Module.finrank ๐•œ E = 1) {x : E} (hx : โ€–xโ€– = 1) :

    On a one-dimensional source, the singular values of A are โ€–A xโ€– for any unit vector x, followed by zeros.

    @[simp]
    theorem LinearMap.apply_rightSingularBasis_eq_zero_iff {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {i : Fin (Module.finrank ๐•œ E)} :

    A right singular vector lies in the kernel of A exactly when its singular value vanishes.

    theorem LinearMap.singularValues_mul_norm_le_norm_apply {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {n : โ„•} {x : E} (hx : x โˆˆ A.rightSingularBasis.spanIndices {i : Fin (Module.finrank ๐•œ E) | โ†‘i โ‰ค n}) :

    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โ€–.

    theorem LinearMap.norm_apply_le_of_mem_spanIndices_of_adjoint_comp_self_eigenbasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {m : โ„•} (e : OrthonormalBasis (Fin m) ๐•œ E) {ฮผ : Fin m โ†’ โ„} (he : โˆ€ (i : Fin m), (adjoint A โˆ˜โ‚— A) (e i) = โ†‘(ฮผ i) โ€ข e i) {s : Set (Fin m)} {c : โ„} (hc : 0 โ‰ค c) (hฮผ : โˆ€ i โˆˆ s, ฮผ i โ‰ค c ^ 2) {x : E} (hx : x โˆˆ e.spanIndices s) :

    An upper bound on the Gram eigenvalues of a selected span bounds the norm of A there.

    theorem LinearMap.sq_singularValues_eq_of_adjoint_comp_self_eigenbasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {m : โ„•} (e : OrthonormalBasis (Fin m) ๐•œ E) {ฮผ : Fin m โ†’ โ„} (hฮผ : Antitone ฮผ) (he : โˆ€ (i : Fin m), (adjoint A โˆ˜โ‚— A) (e i) = โ†‘(ฮผ i) โ€ข e i) (k : Fin m) :
    A.singularValues โ†‘k ^ 2 = ฮผ k

    A sorted orthonormal eigenbasis of the Gram operator computes the squared singular values.

    theorem LinearMap.norm_apply_le_singularValues_mul_norm {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {n : โ„•} {x : E} (hx : x โˆˆ A.rightSingularBasis.spanIndices {i : Fin (Module.finrank ๐•œ E) | n โ‰ค โ†‘i}) :

    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โ€–.

    theorem LinearMap.inv_mul_smul_apply_rightSingularBasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :
    ((โ†‘(A.singularValues โ†‘i ^ 2))โปยน * โ†‘(A.singularValues โ†‘i ^ 2)) โ€ข A (A.rightSingularBasis i) = A (A.rightSingularBasis i)

    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.

    noncomputable def LinearMap.leftSingularVector {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :
    F

    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
      theorem LinearMap.leftSingularVector_def {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :

      Unfolds the left singular vector uแตข = ฯƒแตขโปยน A vแตข.

      theorem LinearMap.apply_rightSingularBasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :

      The singular relation A vแตข = ฯƒแตข uแตข, valid at every index, including those with ฯƒแตข = 0.

      theorem LinearMap.inner_leftSingularVector {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i j : Fin (Module.finrank ๐•œ E)) :

      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.

      theorem LinearMap.orthonormal_leftSingularVector {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :
      Orthonormal ๐•œ fun (i : { i : Fin (Module.finrank ๐•œ E) // A.singularValues โ†‘i โ‰  0 }) => A.leftSingularVector โ†‘i

      The left singular vectors with nonzero singular value form an orthonormal family.

      @[simp]
      theorem LinearMap.leftSingularVector_eq_zero_iff {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {i : Fin (Module.finrank ๐•œ E)} :

      A left singular vector vanishes exactly when its singular value does.

      theorem LinearMap.norm_leftSingularVector_le_one {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :

      A left singular vector has norm at most one: it is a unit vector when its singular value is nonzero and zero otherwise.

      theorem LinearMap.sum_norm_inner_leftSingularVector_sq_le {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (x : F) :
      โˆ‘ i : Fin (Module.finrank ๐•œ E), โ€–inner ๐•œ (A.leftSingularVector i) xโ€– ^ 2 โ‰ค โ€–xโ€– ^ 2

      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.

      @[simp]
      theorem LinearMap.adjoint_leftSingularVector {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :

      The adjoint singular relation Aโ€  uแตข = ฯƒแตข vแตข, valid at every index, including those with ฯƒแตข = 0.

      theorem LinearMap.self_comp_adjoint_leftSingularVector {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (i : Fin (Module.finrank ๐•œ E)) :

      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.

      theorem LinearMap.apply_eq_sum_singularValues_smul {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) (x : E) :
      A x = โˆ‘ i : Fin (Module.finrank ๐•œ E), โ†‘(A.singularValues โ†‘i) โ€ข inner ๐•œ (A.rightSingularBasis i) x โ€ข A.leftSingularVector i

      The singular expansion of a vector: A x = โˆ‘แตข ฯƒแตข โŸชvแตข, xโŸซ uแตข.

      theorem LinearMap.eq_sum_singularValues_smul_rankOne {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :
      A = โˆ‘ i : Fin (Module.finrank ๐•œ E), โ†‘(A.singularValues โ†‘i) โ€ข โ†‘(((InnerProductSpace.rankOne ๐•œ) (A.leftSingularVector i)) (A.rightSingularBasis i))

      The singular value decomposition in rank-one form: A = โˆ‘แตข ฯƒแตข uแตข โŠ— vแตข, where u โŠ— v is the rank-one map x โ†ฆ โŸชv, xโŸซ u.

      theorem LinearMap.exists_orthonormalBasis_apply_eq_leftSingularVector {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :
      โˆƒ (w : OrthonormalBasis (Fin (Module.finrank ๐•œ F)) ๐•œ F), โˆ€ (i : Fin (Module.finrank ๐•œ E)) (j : Fin (Module.finrank ๐•œ F)), โ†‘i = โ†‘j โ†’ A.singularValues โ†‘i โ‰  0 โ†’ w j = A.leftSingularVector i

      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.

      theorem LinearMap.singularValues_le_mul_of_norm_apply_le {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] {A : E โ†’โ‚—[๐•œ] F} {B : E โ†’โ‚—[๐•œ] G} {c : โ„} (h : โˆ€ (x : E), โ€–B xโ€– โ‰ค c * โ€–A xโ€–) (i : โ„•) :

      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.

      theorem LinearMap.singularValues_comp_le {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] (C : F โ†’โ‚—[๐•œ] G) (A : E โ†’โ‚—[๐•œ] F) {c : โ„} (hC : โˆ€ (y : F), โ€–C yโ€– โ‰ค c * โ€–yโ€–) (i : โ„•) :

      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.

      theorem LinearMap.singularValues_le_of_norm_apply_le {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {A : E โ†’โ‚—[๐•œ] F} {c : โ„} (hc : 0 โ‰ค c) (h : โˆ€ (x : E), โ€–A xโ€– โ‰ค c * โ€–xโ€–) (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.

      theorem LinearMap.singularValues_eq_of_norm_apply_eq {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] {A : E โ†’โ‚—[๐•œ] F} {B : E โ†’โ‚—[๐•œ] G} (h : โˆ€ (x : E), โ€–B xโ€– = โ€–A xโ€–) :

      Two maps with the same source and โ€–B xโ€– = โ€–A xโ€– for every x have the same singular values.

      @[simp]
      theorem LinearMap.singularValues_operatorAbs {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :

      The modulus |A| = โˆš(Aโ€  A) of a map has the same singular values as the map itself.

      @[simp]
      theorem LinearMap.singularValues_linearIsometry_comp {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] (W : F โ†’โ‚—แตข[๐•œ] G) (A : E โ†’โ‚—[๐•œ] F) :

      Composing on the left with a linear isometry leaves the singular values unchanged.

      @[simp]
      theorem LinearMap.singularValues_comp_adjoint_linearIsometry {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] (A : E โ†’โ‚—[๐•œ] F) (W : E โ†’โ‚—แตข[๐•œ] G) :

      Composing on the right with the adjoint of a linear isometry leaves the singular values unchanged.

      @[simp]
      theorem LinearMap.singularValues_linearIsometryEquiv_comp {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] (U : F โ‰ƒโ‚—แตข[๐•œ] G) (A : E โ†’โ‚—[๐•œ] F) :
      (โ†‘โ†‘โ†‘U โˆ˜โ‚— A).singularValues = A.singularValues

      Composing on the left with an isometric isomorphism leaves the singular values unchanged.

      @[simp]
      theorem LinearMap.singularValues_comp_linearIsometryEquiv {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] (A : E โ†’โ‚—[๐•œ] F) (V : G โ‰ƒโ‚—แตข[๐•œ] E) :
      (A โˆ˜โ‚— โ†‘โ†‘โ†‘V).singularValues = A.singularValues

      Composing on the right with an isometric isomorphism leaves the singular values unchanged.

      @[simp]
      theorem LinearMap.singularValues_smul {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (c : ๐•œ) (A : E โ†’โ‚—[๐•œ] F) :

      Scaling a map by c scales its singular values by โ€–cโ€–.

      @[simp]
      theorem Matrix.toLin_diagonal_apply_self {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_4} [Fintype ฮน] [DecidableEq ฮน] (e : OrthonormalBasis ฮน ๐•œ E) (d : ฮน โ†’ ๐•œ) (i : ฮน) :
      ((toLin e.toBasis e.toBasis) (diagonal d)) (e i) = d i โ€ข e i

      The diagonal operator of an orthonormal basis (eแตข) with entries (dแตข) has eแตข as an eigenvector with eigenvalue dแตข.

      @[simp]
      theorem Matrix.adjoint_comp_self_toLin_diagonal_apply {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_4} [Fintype ฮน] [DecidableEq ฮน] (e : OrthonormalBasis ฮน ๐•œ E) (d : ฮน โ†’ ๐•œ) (i : ฮน) :
      have this := โ‹ฏ; have D := (toLin e.toBasis e.toBasis) (diagonal d); (LinearMap.adjoint D โˆ˜โ‚— D) (e i) = โ†‘(โ€–d iโ€– ^ 2) โ€ข e i

      The Gram operator of a diagonal map has eigenvalues equal to the squared diagonal norms.

      theorem OrthonormalBasis.adjoint_comp_self_toLin_diagonal_reindex_apply {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] {ฮน : Type u_4} [Fintype ฮน] [DecidableEq ฮน] (e : OrthonormalBasis ฮน ๐•œ E) (d : ฮน โ†’ ๐•œ) {ฮบ : Type u_5} [Fintype ฮบ] (ฯ€ : ฮบ โ‰ƒ ฮน) (i : ฮบ) :
      have this := โ‹ฏ; have D := (Matrix.toLin e.toBasis e.toBasis) (Matrix.diagonal d); (LinearMap.adjoint D โˆ˜โ‚— D) ((e.reindex ฯ€.symm) i) = โ†‘(โ€–d (ฯ€ i)โ€– ^ 2) โ€ข (e.reindex ฯ€.symm) i

      Reindexing a diagonal basis preserves the Gram eigenvector equations, with the squared diagonal norms reindexed by the same equivalence.

      theorem Matrix.singularValues_toLin_diagonal {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] {ฮน : Type u_4} [Fintype ฮน] [DecidableEq ฮน] (e : OrthonormalBasis ฮน ๐•œ E) (d : ฮน โ†’ ๐•œ) {n : โ„•} (ฯ€ : Fin n โ‰ƒ ฮน) (hฯ€ : Antitone fun (k : Fin n) => โ€–d (ฯ€ k)โ€–) (k : Fin n) :
      ((toLin e.toBasis e.toBasis) (diagonal d)).singularValues โ†‘k = โ€–d (ฯ€ k)โ€–

      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).

      theorem Matrix.toLin_of_ite_val_eq_apply {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] {m n : โ„•} (e : OrthonormalBasis (Fin m) ๐•œ E) (f : OrthonormalBasis (Fin n) ๐•œ F) (d : โ„• โ†’ ๐•œ) (i : Fin m) :
      ((toLin e.toBasis f.toBasis) (of fun (j : Fin n) (i : Fin m) => if โ†‘j = โ†‘i then d โ†‘i else 0)) (e i) = if h : โ†‘i < n then d โ†‘i โ€ข f โŸจโ†‘i, hโŸฉ else 0

      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.

      theorem LinearMap.exists_linearIsometryEquiv_eq_comp_toLin_comp {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) {m n : โ„•} (e : OrthonormalBasis (Fin m) ๐•œ E) (f : OrthonormalBasis (Fin n) ๐•œ F) :
      โˆƒ (U : F โ‰ƒโ‚—แตข[๐•œ] F) (V : E โ‰ƒโ‚—แตข[๐•œ] E), A = โ†‘โ†‘โ†‘U โˆ˜โ‚— (Matrix.toLin e.toBasis f.toBasis) (Matrix.of fun (j : Fin n) (i : Fin m) => if โ†‘j = โ†‘i then โ†‘(A.singularValues โ†‘i) else 0) โˆ˜โ‚— โ†‘โ†‘โ†‘V

      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.

      theorem LinearMap.exists_linearIsometryEquiv_eq_comp_toLin_diagonal_comp {๐•œ : Type u_1} {E : Type u_2} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] (A : E โ†’โ‚—[๐•œ] E) {n : โ„•} (e : OrthonormalBasis (Fin n) ๐•œ E) :
      โˆƒ (U : E โ‰ƒโ‚—แตข[๐•œ] E) (V : E โ‰ƒโ‚—แตข[๐•œ] E), A = โ†‘โ†‘โ†‘U โˆ˜โ‚— (Matrix.toLin e.toBasis e.toBasis) (Matrix.diagonal fun (i : Fin n) => โ†‘(A.singularValues โ†‘i)) โˆ˜โ‚— โ†‘โ†‘โ†‘V

      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.

      theorem LinearMap.exists_orthonormal_eq_sum_singularValues_smul_rankOne {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (A : E โ†’โ‚—[๐•œ] F) :
      โˆƒ (v : Fin (min (Module.finrank ๐•œ E) (Module.finrank ๐•œ F)) โ†’ E) (w : Fin (min (Module.finrank ๐•œ E) (Module.finrank ๐•œ F)) โ†’ F), Orthonormal ๐•œ v โˆง Orthonormal ๐•œ w โˆง A = โˆ‘ i : Fin (min (Module.finrank ๐•œ E) (Module.finrank ๐•œ F)), โ†‘(A.singularValues โ†‘i) โ€ข โ†‘(((InnerProductSpace.rankOne ๐•œ) (w i)) (v i))

      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.

      theorem ContinuousLinearMap.norm_comp_orthogonal_spanIndices_le_of_adjoint_comp_self_eigenbasis {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] (T : E โ†’L[๐•œ] F) {m : โ„•} (e : OrthonormalBasis (Fin m) ๐•œ E) {ฮผ : Fin m โ†’ โ„} (hฮผ : Antitone ฮผ) (he : โˆ€ (i : Fin m), (LinearMap.adjoint โ†‘T โˆ˜โ‚— โ†‘T) (e i) = โ†‘(ฮผ i) โ€ข e i) (n : โ„•) :
      โ€–T โˆ˜SL (e.spanIndices โ†‘{i : Fin m | โ†‘i < n})แ—ฎ.subtypeLโ€– โ‰ค (โ†‘T).singularValues n

      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.

      theorem ContinuousLinearMap.singularValues_comp_starProjection_range {๐•œ : Type u_1} {E : Type u_2} {F : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup E] [InnerProductSpace ๐•œ E] [FiniteDimensional ๐•œ E] [NormedAddCommGroup F] [InnerProductSpace ๐•œ F] [FiniteDimensional ๐•œ F] {G : Type u_4} [NormedAddCommGroup G] [InnerProductSpace ๐•œ G] [FiniteDimensional ๐•œ G] {X : F โ†’L[๐•œ] E} (hX : Isometry โ‡‘X) (T : E โ†’L[๐•œ] G) :
      (โ†‘(T โˆ˜SL (โ†‘X).range.starProjection)).singularValues = (โ†‘(T โˆ˜SL X)).singularValues

      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.