1 | initial version |
You can construct very general quaternion algebras in Sage, and the command QuaternionAlgebra(QQ, 2, 3)
would construct an algebra with base field the rationals, with elements i
and j
such that i^2=2
and j^2=3
. You've constructed a quaternion algebra over the "symbolic ring" SR
with elements i
and j
such that i^2 = j^2 = -1
.
Maybe because they are constructible in such generality, exponentials are not implemented for them. You can just use the formula on the wikipedia page (https://en.wikipedia.org/wiki/Quaternion#Exponential,_logarithm,_and_power_functions). General quaternion algebras have their own wikipedia page, too: https://en.wikipedia.org/wiki/Quaternion_algebra.