I never used Sage and I would like to check some results on Sage but I really don't know how.
First I need to create a number field ($\Bbb Q[\sqrt 2]$ for instance). Then I would like to find or select a suitable basis $(1,\sqrt 2$). I would like at last to find the matrix multiplication, say by $\sqrt 2$ in that selected basis.
Could you please help? I tried unsuccessfully the following:
k. = NumberField(x^2 - 2)
a^4
k.basis()
Thank you.
See the documentation on number field elements and search for 'matrix'
The standard basis used here is the list of powers of the primitive element, that is $(1,\sqrt{2})$ in this case.
As the documentation states, this is the matrix for right multiplication; the rows are the images of the basis vectors. You can take the transpose if you prefer.