It depends a little on what coefficients you want. If you're happy with rational numbers then this should do the trick:
G = diagonal_matrix(QQ,4,[-1,1,1,1]) lorentz_group = GO(4,QQ,invariant_form=G) which just constructs the group of (in this case QQ-valued) matrices that preserve the quadratic form -t^2+x^2+y^2+z^2. Depending on what you actually want to do with it, you may be more interested in SO or perhaps the construction of its lie group/algebra. On Thursday, 26 May 2022 at 09:11:55 UTC+2 hongy...@gmail.com wrote: > How can I create the Lorentz group, as described here [1], in Sage math? > > [1] https://en.wikipedia.org/wiki/Lorentz_group#Basic_properties > > Regards, > HZ > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/82d914e8-cef4-4a30-9ac4-ef6c7e2d341bn%40googlegroups.com.