Skip to content

FiniteRankFreeModuleMorphism: Add method SVD (singular value decomposition) #31992

Open
@mkoeppe

Description

@mkoeppe

This operation is currently available for matrices over RDF.

The version for FiniteRankFreeModuleMorphism would define a new basis on each of the domain and codomain (with an orthogonal change of basis) so that the matrix of the morphism in the new bases is the diagonal of the singular values.

Example:

sage: M = FiniteRankFreeModule(ZZ, 3, name='M') 
sage: N = FiniteRankFreeModule(ZZ, 2, name='N') 
sage: e = M.basis('e') ; f = N.basis('f') 
sage: H = Hom(M,N) ; H 
Set of Morphisms from Rank-3 free module M over the Integer Ring to Rank-2 free module N over the Integer Ring in Category of finite dimensional modules over Integer Ring
sage: phi = H([[2,-1,3], [1,0,-4]], name='phi', latex_name=r'\phi') ; phi 
Generic morphism:
  From: Rank-3 free module M over the Integer Ring
  To:   Rank-2 free module N over the Integer Ring
sage: phi.matrix(e, f)                                                   
[ 2 -1  3]
[ 1  0 -4]
sage: f_prime = N.basis('f_prime', from_family=(f[0]-f[1], -2*f[0]+3*f[1]
# pretend that this basis is the right orthogonal matrix of the SVD...
sage: phi.matrix(e, f_prime)                                             
[ 8 -3  1]
[ 3 -1 -1]

CC: @egourgoulhon @mjungmath @honglizhaobob

Component: linear algebra

Branch/Commit: u/gh-honglizhaobob/finiterankfreemodulemorphism__add_method_svd__singular_value_decomposition_ @ 38bcecc

Issue created by migration from https://trac.sagemath.org/ticket/31992

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions