Is there a nice trick for this? I would like to compute the eigenvalues more efficiently.



how to get nonzero eigenvalues of a large symmetric matrix with lots of duplicate rows
If you have a lot of duplicate rows (and you know what they are), you can reduce to a smaller matrix. I'll start with an example, because writing out the general case will be notationally annoying.


Let
$$A = \begin{pmatrix} 
a & a & b & c \\ 
a & a & b & c \\ 
b & b & d & e \\
c & c & e & f
\end{pmatrix}$$
Then $A$ has a zero eigenvalue, and the other eigenvalues are the same as those of
$$A'=\begin{pmatrix} 
2a & b \sqrt{2} & c \sqrt{2} \\
b \sqrt{2} & d & e \\
c \sqrt{2} & e & f
\end{pmatrix}$$


Proof: Let $v\_1$, $v\_2$, $v\_3$ be the orthonormal vectors $(1/\sqrt{2}, 1/\sqrt{2}, 0,0)$, $(0,0,1,0)$ and $(0,0,0,1)$. Complete to an orthonormal basis $(v\_1, v\_2, v\_3, w)$. Then $A$ annihilates $w$, and takes $\mathrm{Span}(v\_1, v\_2, v\_3)$ to itself by the matrix $A'$.


In general, if $I$ is a set of rows which are identical, then let $v\_I$ be the vector which is $1/\sqrt{|I|}$ on the coordinates in $I$ and $0$ elsewhere. The $v\_I$ are orthonormal, complete them to an orthonormal basis by adding vectors $w\_j$. Then $A$ will annihilate the $w\_j$ and will take $\mathrm{Span}(v\_I)$ to itself. The matrix of endomorphism of $\mathrm{Span}(v\_I)$ will have entries that look like $\sqrt{IJ} \cdot a\_{ij}$, with $i \in I$ and $j \in J$. So you ar reduced to computing the eigenvalues of this smaller matrix.


