Let me just say that I'm quite new to sage (although I'm making a progress!)
I wish to input a number field (in my case real quadratic field), a basis $w_1,w_2$ over $ \mathbb Q$ and an element $v$ of this number field and get the coefficient of $v$ as a linear combination of $w_1$ and $w_2$. I.e., if $v=aw_1+bw_2$ I wish to get (a,b).
I tried doing this with just solving equations in matrices but I didn't find a way to make it solve the equations over the base field $ \mathbb Q$.
Thanks a lot for helping! Menny
asked Aug 28 '11Menny
59 ● 3 ● 7
I take it you understand how to get the coefficients in the standard basis, e.g.:
Then going to your preferred basis is just a linear algebra problem. For example, if your preferred QQ-basis is (1,1) and (2,0) then you could do:
Check that this is correct:
posted Aug 31 '11Volker Braun
2369 ● 7 ● 22 ● 55
Asked: Aug 28 '11
Seen: 223 times
Last updated: Aug 31 '11
powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.