Ask Your Question
0

Two methods that return different eigenspaces

asked 2020-08-30 13:22:44 +0100

Strontium gravatar image

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)
> J.adjacency_matrix().eigenspaces_right()

[
(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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-08-31 13:59:32 +0100

Florentin Jaffredo gravatar image

updated 2020-08-31 14:02:31 +0100

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 ?

edit flag offensive delete link more

Comments

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-08-29 23:46:05 +0100

Seen: 189 times

Last updated: Aug 31 '20