# Checking Similarity of Matrices over Finite Fields

Hi, There is a command in SAGE which allows us to check the similarity of two matrices over Q (or sth); is_similar()

But, when trying to check two matrices' similarity over Finite Fields it usually gives the error: "unable to compute Jordan canonical form for matrix"

I would be appreciated if someone can help me to construct a practical way to check the similarity of two matrices with entries in Finite Fields.

edit retag close merge delete

( 2016-10-15 12:25:27 +0200 )edit

Sort by » oldest newest most voted

The problem is that some eigenvalues do not lie in the finite field. This prevents the existence of the Jordan form. You need to extend coefficients.

sage: M = matrix(GF(13),[[4,6],[5,9]])
sage: M.jordan_form()
RuntimeError: Some eigenvalue does not exist in Finite Field of size 13.
sage: K = M.parent().base_ring()
sage: L = K.extension(M.minimal_polynomial(),'a')
sage: ML = M.change_ring(L)
sage: ML.jordan_form()
[12*a|   0]
[----+----]
[   0|   a]
sage: ML.is_similar(ML**2)
False

more