extracting the coefficients of a linear combination

 1 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 '11 Menny 59 ● 1 ● 4 ● 7

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Stats:

Asked: Aug 28 '11

Seen: 289 times

Last updated: Aug 31 '11

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.