Ask Your Question
1

multiplication matrix in number field

asked 2015-11-02 11:55:55 -0500

nd gravatar image

updated 2015-11-02 12:40:47 -0500

Hello Given two integral numbers, say a and b such that a^3=2 and b^2=3, I want to check "by hand" that a+b is again integral over Z. To do that, I want to build the matrix of the linear transform "m: multiplication by a+b on the number field Q(a,b)

since a+b is obviously an eigenvalue, i.e. root of it's caracteristic polynomial which then SAGE can compute for me). Then I can check that (a+b).minpoly() gives the same result as P(X)=(M-XI).determinant() and then after coercision within Q.<x>=QQ[], P=Q(P), check P.is_irreducible(), meaning a+b integral.

Thus, given a basis (1,a,a²,b,ab,a²b) for Q(a,b), one can determine the matrix "by hand": each column is the image of each element times a+b: (transpose the vectors bellow)

  • 1st is:(a+b).1=[0,1,0,1,0,0],
  • 2d is (a+b).a=[0,0,1,0,1,0],
  • 3d is (a+b).a²=[2,0,0,0,0,1],
  • 4th is (a+b).b=[3,0,0,0,1,0],
  • 5th is (a+b).ab=[0,3,0,0,0,1],
  • 6th is (a+b).a²b=[0,0,3,2,0,0]

One can define the extension k.<a,b>=NumberField([x³-2,x²-3]), isomorphic to z⁶-9*z⁴-4*z³+27*z²-36*z-23 (via k.absolute_field() . Then, I don't know how to do these calculations automatically within SAGE:

=> for example: how make the vector a²=[0,0,1,0,0,0] become (a+b).a²=2+a²b=[2,0,0,,0,1] after multiplication of by a+b given the relations a³=2 and b²=3? ?

edit retag flag offensive close merge delete

Comments

The answer below is more comprehensive in that it applies to any basis choice. If you want to work with respect to the tensor basis, you don't have to compute an "absolute" field (although the another basis ordering than the one you propose is easier to obtain):

sage: v= lambda u: flatten(map(list,list(u)))
sage: [v(u) for  u in [k(1),b,a,a*b,a^2,a^2*b]]
[[1, 0, 0, 0, 0, 0],
 [0, 1, 0, 0, 0, 0],
 [0, 0, 1, 0, 0, 0],
 [0, 0, 0, 1, 0, 0],
 [0, 0, 0, 0, 1, 0],
 [0, 0, 0, 0, 0, 1]]
sage: v( (a+b)*a^2)
[2, 0, 0, 0, 0, 1]
nbruin gravatar imagenbruin ( 2015-11-16 11:18:52 -0500 )edit

Sorry for late response. Very interresting too & thanks as I alos need this approach for different usage. I might come back!

nd gravatar imagend ( 2015-12-16 18:57:53 -0500 )edit

1 answer

Sort by » oldest newest most voted
2

answered 2015-11-02 12:39:13 -0500

nbruin gravatar image

updated 2015-11-02 13:40:04 -0500

Your first try should probably be

k.<a,b>=NumberField([x^3-2,x^2-3])
L=L=k.absolute_field('z')
O=L.order([1,a,a^2,b,a*b,a^2,b])

which creates the appropriate rank 6 order over ZZ. However, Sage seems to prefer to keep representing elements with respect to the power basis in z, even in O:

sage: O(a+b)
-4/51*z^5 - 1/51*z^4 + 40/51*z^3 + 26/51*z^2 - 127/51*z + 91/51
sage: list(O(a+b))
[91/51, -127/51, 26/51, 40/51, -1/51, -4/51]

However, you're just a change-of-basis away from the appropriate result, and you can compute the corresponding matrix easily (and indeed, since orders don't allow you to specify the basis, you don't have to bother with orders at all. You might as well just work in the field)

sage: T=matrix([list(L(u)) for u in [1,a,a^2,b,a*b,a^2*b]])
sage: T
[      1       0       0       0       0       0]
[ 91/102  -38/51   13/51   20/51  -1/102   -2/51]
[  61/51  -53/51  -19/51   10/51    4/51   -1/51]
[ 91/102  -89/51   13/51   20/51  -1/102   -2/51]
[ 107/51 -53/102  -35/51    5/51    2/51  -1/102]
[ 125/51  -25/51   26/51   23/51   -1/51   -4/51]

Given what <number field element>.matrix does, you can now get the appropriate matrix for multiplication by a+b with respect to the tensor basis (acting on row vectors) via

sage: T*L(a+b).matrix()*T^(-1)
[0 1 0 1 0 0]
[0 0 1 0 1 0]
[2 0 0 0 0 1]
[3 0 0 0 1 0]
[0 3 0 0 0 1]
[0 0 3 2 0 0]
edit flag offensive delete link more

Comments

Great & thanks for your prompt answer! Indeed, Sage kept using the primitive element z of K instead of k.gens() within an order as defined on L, and I couldn't go around that. I will have a closer look to the number field element page and the .matrix(). to understand your answer.

nd gravatar imagend ( 2015-11-02 14:28:17 -0500 )edit

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

Stats

Asked: 2015-11-02 11:55:55 -0500

Seen: 76 times

Last updated: Nov 02 '15