Question: How to show symbolically that eigenvalues are the same?

I am trying to show that the eigenvalues of a matrix are described by my proposed formula. I managed to show this numerically, but I would like to show this symbolically. There are two issues here - the orders of the two lists are different, and the forms are different (sums of complex exponentials vs RootOfs). Any suggestions?

restart;

with(LinearAlgebra): with(GraphTheory): with(plots):

L:=9;

9

Generate a matrix and its eigenvalues

C := AdjacencyMatrix(CycleGraph(L, directed)):
Id := IdentityMatrix(L):
A := KroneckerProduct(C, Id) + KroneckerProduct(Id, C) + KroneckerProduct(C, C):
evs := Eigenvalues(A, output = list):
plotevs := complexplot(evs, style = point, color = blue, scaling = constrained):

My guess as to their values

evstheory:=[seq(seq(exp((2*Pi)*I*k/L) + exp((2*Pi)*I*m/L) + exp((2*Pi)*I*(m + k)/L), k = 0 .. L - 1), m = 0 .. L - 1)]:
plotevstheory:=complexplot(evstheory, style = point, color = red, scaling = constrained):

They look to be the same

display(Array([plotevs,plotevstheory]));

 

 

 

 

 

Even showing they are the same numerically is nontrivial because the sorting is not consistent

fnormal(sort(evalf(evs))-sort(evalf(evstheory)));

[0., 0., 0., 0.*I, 0.*I, 0.*I, 0.*I, 0.+0.*I, 0.+0.*I, 0.-1.285575219*I, 0.-1.285575219*I, 0.-.9216049846*I, 0.-.9216049846*I, 0.-1.732050808*I, 0.-1.732050808*I, 0.+1.732050808*I, 0.+1.732050808*I, 0.+.9216049846*I, 0.+.9216049846*I, 0.+1.285575219*I, 0.+1.285575219*I, 0.+0.*I, 0.+0.*I, 0.-0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+.6840402864*I, 0.+.6840402864*I, 0.-.6840402858*I, 0.-.6840402858*I, 0.+0.*I, 0.+0.*I, 0.-3.701666314*I, 0.-3.701666314*I, 0.-.6840402857*I, 0.-.6840402857*I, 0.-.6840402863*I, 0.-.6840402863*I, 0.+.6840402868*I, 0.+.6840402868*I, 0.+.6840402862*I, 0.+.6840402862*I, -0.+3.701666314*I, -0.+3.701666314*I, 0.-4.623271298*I, 0.-.6840402860*I, 0.-.6840402860*I, 0.+.6840402865*I, 0.+.6840402865*I, -0.+4.623271298*I, 0.-4.987241533*I, 0.-4.987241533*I, 0.-.6840402866*I, 0.-.6840402866*I, 0.-1.732050808*I, 0.-1.732050808*I, 0.+1.732050808*I, 0.+1.732050808*I, 0.+.6840402863*I, 0.+.6840402863*I, -0.+4.987241532*I, -0.+4.987241532*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.-4.540765944*I, 0.-0.*I, 0.-0.*I, 0.-0.*I, 0.-0.*I, -0.+4.540765944*I, 0.-1.285575219*I, 0.-1.285575219*I, 0.-1.285575219*I, 0.-1.285575219*I, -0.+2.571150438*I, -0.+2.571150438*I]

This succeeds, so they are the same

fnormal(sort(evalf[20](evs),key=evalf)-sort(evalf[20](evstheory),key=evalf));

[0., 0., 0., 0.*I, 0.*I, 0.*I, 0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.+0.*I, 0.-0.*I, 0.-0.*I, 0.+0.*I, 0.+0.*I]

What about symbolically? [Edit - only part of output shown]

ans1:=simplify(sort(evs,key=evalf)-sort(evstheory,key=evalf));

NULL

Download verification.mw

Please Wait...