Determinant of $(K-\lambda M)$ is NOT zero for an eigenvalue! For an eigenvalue problem, it is expected to get $\det(K-\lambda M)=0$ for $\lambda = {}$eigenvalue. However while working on a vibration problem, I got $8\times8$ stiffness ($K$) and mass ($M$) matrices and had an eigenvalue/eigenvector solution by using scipy.linalg.eig(K, M) in Python.
To be able to solve this problem in excel, I constructed the same matrices and did the math for a new matrix such as $K - \lambda M$ and calculate $\det(K - \lambda M).$ When I inserted an eigenvalue for lambda, I realized that determinant is in the order of $10\times10^{57}$ instead of $0.$
I searched for textbooks but everywhere I see that $\det(K - \lambda M)$ should be $0$ for an eigenvalue solution.
I wanted to get some opinions on the subject in case I have a missing knowledge.
Best regards.

Eigevalues of $K$ are solution of
$$
\det(K -\lambda I) =0 \tag{1}
$$
Generalized eigevalues of the pair $K, M$ are solutions of
$$
\det(K -\lambda M) =0  \tag{2}
$$
Besides, since/when  $M$ is positive, these are also solution of
$$
\det(M^{-1/2}K M^{-1/2} -\lambda I)=0   \tag{3}
$$
I.e. the problem is brought back to a standard eigenvalue problem for a different matrix (but this is another story).
