Ask Your Question

Regarding rational canonical form/frobenius form of matrices over finite fields

asked 2018-01-18 04:12:53 -0500

Ramachandran gravatar image


The sagemath documentation on linear algebra describes a function frobenius which computes the frobenius normal form (rational canonical form) of a matrix over integers. The same command doesnt work on matrices over finite fields. Can someone help me to find the frobenius form of matrices over finite fields

Sample code :

A = matrix(GF(2),[[1,0,0],[0,0,1],[1,1,0]])


This code gives the error

'sage.matrix.matrix_mod2_dense.Matrix_mod2_dense' object has no attribute 'frobenius'

edit retag flag offensive close merge delete


There is work in progress about this kind of thing here : But it is kind of stuck currently.

FrédéricC gravatar imageFrédéricC ( 2018-01-18 12:25:05 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2018-01-18 12:26:18 -0500

FrédéricC gravatar image

Like that:

sage: A = matrix(GF(2),[[1,0,0],[0,0,1],[1,1,0]])
sage: A.rational_form()
[0 0 1]
[1 0 1]
[0 1 1]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-01-18 04:12:53 -0500

Seen: 58 times

Last updated: Jan 18