# Two methods that return different eigenspaces

I don't understand why eigenspaces() and adjacency_matrix().eigenspaces_right() return different results (see the example below). If I understand the reference manual correctly, that shouldn't be the case.

> J = graphs.JohnsonGraph(5,2)
> J.eigenspaces()

[
(6, Vector space of degree 10 and dimension 1 over Rational Field
User basis matrix:
[1 1 1 1 1 1 1 1 1 1]),
(1, Vector space of degree 10 and dimension 4 over Rational Field
User basis matrix:
[   1    0    0    0  1/2  1/2    0 -1/2 -1/2   -1]
[   0    1    0    0 -3/2 -1/2    1 -1/2 -1/2    1]
[   0    0    1    0   -1   -1    1   -1    0    1]
[   0    0    0    1  1/2 -1/2   -1  1/2 -1/2    0]),
(-2, Vector space of degree 10 and dimension 5 over Rational Field
User basis matrix:
[ 1  0  0  0 -1  0 -1  0  1  0]
[ 0  1  0  0  0  0 -1 -1  1  0]
[ 0  0  1  0 -1  0  0  1  0 -1]
[ 0  0  0  1 -1  0  0  0  1 -1]
[ 0  0  0  0  0  1 -1 -1  0  1])
]


and

> J = graphs.JohnsonGraph(5,2)

[
(6, Vector space of degree 10 and dimension 1 over Rational Field
User basis matrix:
[1 1 1 1 1 1 1 1 1 1]),
(1, Vector space of degree 10 and dimension 4 over Rational Field
User basis matrix:
[   1    0    0    0   -1 -1/2  1/2  1/2    0 -1/2]
[   0    1    0    0    0  1/2 -1/2  1/2   -1 -1/2]
[   0    0    1    0    1 -1/2 -1/2 -3/2    1 -1/2]
[   0    0    0    1    1   -1   -1   -1    1    0]),
(-2, Vector space of degree 10 and dimension 5 over Rational Field
User basis matrix:
[ 1  0  0  0  0  0  0 -1 -1  1]
[ 0  1  0  0  0 -1  1 -1 -1  1]
[ 0  0  1  0  0 -1  0  0 -1  1]
[ 0  0  0  1  0  0  1 -1 -1  0]
[ 0  0  0  0  1 -1  1  0 -1  0])
]

edit retag close merge delete

Sort by ยป oldest newest most voted

Looking at the code (with ??), J.eigenspaces() is equivalent to J.adjacency_matrix(vertices=list(J)).right_eigenspaces(), which uses another ordering of the vertices. Since the adjacency matrices are different (but similar), they produce the same eigenvalues, but different eigenspaces. You can use

sage: J.adjacency_matrix().is_similar(J.adjacency_matrix(vertices=list(J)), transformation=True)[1]


To get the change of basis between the two.

I've never worked with graph eigenspace before, is it supposed to be independent of the ordering ?

more

Thank you, that answers my question! I don't see the point of using vertices=list(J)...

( 2020-09-01 14:20:10 +0100 )edit