ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 19 Oct 2023 10:12:14 +0200How to define *complex* symbolic variableshttps://ask.sagemath.org/question/73938/how-to-define-complex-symbolic-variables/Hello,
I am quite new with SageMath, and I don't succeed in defining *complex* symbolic variables.
In the following example, SageMath seems to compute as if the variables were real (and not complex) :
var('w_2')
T=Matrix([[0, w_2], [0,0]])
S=T*(T.H)
S.eigenvalues()
The output of this command is
[w_2^2, 0]
whereas the expected result was
[norm(w_2), 0]
How can I tell SageMath that my symbolic variables are complex ones ?
Thanks in advance for your help !endomorphisme59Thu, 19 Oct 2023 10:12:14 +0200https://ask.sagemath.org/question/73938/