# how to get the smith normal form of lambda matrix

Hi:

Right now, I know sage matrix can get the smith_form and elementary_divisors on pure integer matrix. But I want to get the same stuff on lambda matrix. What I actually mean is:

I directly construct a matrix and the minus lambda times identity matrix and call smith_form is not working. So how to get the smith normal form of lambda matrix in sagemath? Or if sagemath can not do that, which computer algebra system can do the job?

edit retag close merge delete

Could you please provide an explicit example of a lambda matrix you want to deal with ?

( 2016-08-14 18:39:33 +0200 )edit

Sort by ยป oldest newest most voted

It seems you are interested in Smith normal form of matrices over a univariate polynomial ring. Indeed, Smith Normal Form works well there, and is implemented.

sage: R.<x>=QQ[]
sage: M=matrix(2,2,[x^2,x+1,x^3+x+1,x^4-1])
sage: M.smith_form()
(
[                                1                                 0]
[                                0 x^6 - x^4 - x^3 - 2*x^2 - 2*x - 1],

[ x^2 - x + 1       -x + 1]  [                  1 x^5 - x^4 - x^3 - x]
[-x^3 - x - 1          x^2], [                  0                   1]
)


(I recommend that you track down a little more mainstream sources for your mathematics, that use more universally understood terminology)

more

it works. By the way, R.<x>=QQ[], I get a symbol x over QQ, R.<x>=RR[], I get a symbol over RR. The first time, I use x=var('x') to construct symbol x, so smith_form() not working. What is the stuff I actually get from var('x')? What ring it actually over?

( 2016-08-27 10:04:37 +0200 )edit

This indicates:

sage: parent(var('x'))
Symbolic Ring


The "Symbolic RIng" acts as a parent for "symbolic expressions". It doesn't actually satisfy the axioms of a ring (floating point arithmetic already doesn't), but for limited use you can sometimes pretend it does without being proven wrong. It also contains transcendental expressions like sin(x), that may satisfy nontrivial (trigonometric in this case) relations to other ones. It mainly exists to support calculus-type computations. It's rather inappropriate for non-trivial algebraic work.

Note that "smith_form" for matrices over RR['x'] is likely problematic (if implemented at all) because of floating-point rounding.

( 2016-08-28 20:47:25 +0200 )edit