Skip to content

Wishlist for eigenspace and eigenspaces #4388

Open
@fingolfin

Description

@fingolfin

Some wishes:

  • searching for eigenspace or eigenspaces on https://docs.oscar-system.org/stable/ should yield more than 0 hits
    - I think this is because Nemo defines and exports these function, including docstrings, but they are not put into the manual
    - so someone should add it to the Nemo manual and/or the Oscar manual
  • generalize these rings from matrices over fields to matrices over rings
    - the kernel function they use may not always be available then, but that's no reason to not support this for e.g. Z ?
  • there should be a variant for eigenspaces which takes a coefficient ring and a matrix (example below)
  • there should be a variant for eigenspace which takes a matrix and an eigenvalue of a different type (e.g.: matrix over Z, eigenvalue in QQBar)

For the last two points, this currently works:

julia> m = matrix(ZZ, [0 1; -1 0])
[ 0   1]
[-1   0]

julia> eigenvalues(m)
ZZRingElem[]

julia> K = algebraic_closure(QQ)
Field of algebraic numbers

julia> lambda1, lambda2 = eigenvalues(K, m)
2-element Vector{QQBarFieldElem}:
 Root 1.00000*im of x^2 + 1
 Root -1.00000*im of x^2 + 1

But there is no direct way to get eigenspaces. I need to convert the matrices first:

julia> m2 = matrix(K, m)
[           Root 0 of x   Root 1.00000 of x - 1]
[Root -1.00000 of x + 1             Root 0 of x]

julia> eigenspaces(m2)
Dict{QQBarFieldElem, AbstractAlgebra.Generic.MatSpaceElem{QQBarFieldElem}} with 2 entries:
  Root 1.00000*im of x^2 + 1  => [Root 1.00000*im of x^2 + 1 Root 1.00000 of x - 1]
  Root -1.00000*im of x^2 + 1 => [Root -1.00000*im of x^2 + 1 Root 1.00000 of x - 1]

julia> eigenspace(m2, lambda1)
[Root 1.00000*im of x^2 + 1   Root 1.00000 of x - 1]

I'd like to be able to do these (all currently produce an error):

julia> eigenspaces(m)
Dict{ZZRingElem, ZZMatrix}()

julia> eigenspaces(K, m)
Dict{QQBarFieldElem, AbstractAlgebra.Generic.MatSpaceElem{QQBarFieldElem}} with 2 entries:
  Root 1.00000*im of x^2 + 1  => [Root 1.00000*im of x^2 + 1 Root 1.00000 of x - 1]
  Root -1.00000*im of x^2 + 1 => [Root -1.00000*im of x^2 + 1 Root 1.00000 of x - 1]

julia> eigenspace(m, lambda1)
[Root 1.00000*im of x^2 + 1   Root 1.00000 of x - 1]

Perhaps @JohnAAbbott can take a look at this?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions