I was trying to do some linear algebra computations in M2 and I found in the documentation some available methods, but my guess is that these are all numerical?
In particular, given a (integer) matrix M
is not defined. I quickly wrote a function for this but it really seems like this is something that should be there? Especially since there is already a characteristicPolynomial method but it only works for posets.
Then to compute eigenvalues and eigenvectors, I was able to use the methods eigenvalues and eigenvectors but they provide approximations for all the complex numbers. I had hoped that working in a ring with the appropriate root of unity needed (like QQ[z]/(z^3-1) if we know the eigenvalues will involve third roots of unity) would then give eigenvectors and eigenvalues symbolically in terms of the appropriate root of unity, but it looks like the methods eigenvalues and eigenvectors only work for matrices over basic rings of numbers.
but then I guess the answer is that one needs to call onto Maxima or GAP?
I was also trying to think about writing my own methods for this working with the characteristic polynomial and using "factor" or trying to find "primes" over some ring of algebraic integers but those methods are not implemented for such coefficient fields.
Am I missing something obvious or these are genuinely computationally hard things that have not been implemented yet?