I was trying to find the eigenvalue of the following type of block matrix
\begin{pmatrix} A & B & C \\ B & D & E \\ C & E & F \end{pmatrix}
where each of the $A, B, C, D, E, F$ are matrix containing only one value. The size of the block matrix in diagonal are not necessary the same. For example,
\begin{equation*} A = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \end{pmatrix} \end{equation*}
\begin{equation*} D = \begin{pmatrix} 0.5 & 0.5 \\ 0.5 & 0.5 \end{pmatrix} \end{equation*} Something like that.
Through the simulation, it seems that if there are k distinct block in the matrix, then there would be only k distinct eigenvalue.
However, is there any theoretical proof to confirm my guess? or I make a mistake?
Yes, the characteristic polynomial of your $9\times 9$ matrix then has the form
$$ - t^9 + 3t^8(a_1 + a_4 + a_6) + 9t^7( - a_1a_4 - a_1a_6 + a_2^2 + a_3^2 - a_4a_6 + a_5^2) + 27t^6(a_1a_4a_6 - a_1a_5^2 - a_2^2a_6 + 2a_2a_3a_5 - a_3^2a_4) $$ where $A$ has entries all equal to $a_1$, $B$ has entries all equal to $a_2$ and so on. We have $k=6$ blocks $A,B,C,D,E,F$. Obviously we have the eigenvalue $0$ with multiplicity $6$, and the degree is only $9$. So we have less distinct eigenvalues than blocks. In the extreme case where all entries are zero, we have only one eigenvalue.