I want to factorize a small matrix of integers symbolically with Symbols.jl. For examble
A = [0 1; 1 0]
How do I get symbolically the spectral decomposition? I could not find a way to specify a symbolic 1
with Symbolics.jl. In SymPy one would do Sym(1)
.
if all of the values are numbers then how is it symbolic?
1
is a symbol as well. My goal is to get an expression in terms of fractions/square roots/etc. For example compare
eigvals(Sym[0 0 1 0; 1 0 0 1; 0 1 0 0; 0 0 1 0])
resulting in
to
eigvals([0 0 1 0; 1 0 0 1; 0 1 0 0; 0 0 1 0])
4-element Vector{ComplexF64}:
-0.6299605249474369 - 1.091123635971722im
-0.6299605249474369 + 1.091123635971722im
1.6032453817751706e-48 + 0.0im
1.259921049894875 + 0.0im
I cannot come up with the expression in square roots and fractions from the digit output of the non-symbolic result. I can understand the SymPy output immediately though. The eigenvalues are 0 and roots of unity scaled by 2^(1/3)
.
1 Like