Suppose the strongly regular graph has vertices, degree , common neighbours for every adjacent pair and common neighbours for every nonadjacent pair. By the walk count from powers of an adjacency matrix, counts common neighbours of and , while . Hence the adjacency-matrix relation for a strongly regular graph is
where is the all-ones matrix.
The spectral theorem for real symmetric matrices gives an orthonormal eigenbasis for . Part (a) says that the constant direction is the one-dimensional -eigenspace; every other eigenvector belongs to , so . If , the displayed identity gives
There are at most two possible roots in addition to . Thus has at most three distinct eigenvalues.
A connected regular graph is strongly regular exactly when its adjacency matrix has three distinct eigenvalues, apart from the complete graphs, which have two. The forward direction follows from the adjacency-matrix relation for a strongly regular graph; conversely, the quadratic polynomial vanishing on the two nonconstant eigenspaces is a scalar multiple of the all-ones matrix.