Solution (source code)

= Solution

For the <Petersen graph>, each <vertex> has three neighbours, adjacent vertices have no <common neighbour>, and distinct nonadjacent vertices have exactly one <common neighbour>. The entries of $A^2$ count length-two walks, so diagonal entries are three, adjacent entries zero, and other off-diagonal entries one. Hence
$$
\boxed{A^2+A-2I=J.}
$$
The <connected graph> has the <simple eigenvalue> three with <eigenvector> $\mathbf1$. On its <orthogonal complement> $J=0$, so the remaining <eigenvalues> satisfy $\lambda^2+\lambda-2=0$ and are one or minus two. If their multiplicities are $r,s$, then $r+s=9$ and $\operatorname{tr}A=3+r-2s=0$. Thus
$$
\boxed{\operatorname{spec}(A)=\{3\text{ (once)},\ 1\text{ (five times)},\ -2\text{ (four times)}\}.}
$$