# Why a (general) block matrix does not have the same eigenvalues of the first block?

Based on the next relation:

$$\det\begin{bmatrix}A & B \\ C & D\end{bmatrix} = \det(A)\det(D - CA^{-1}B),$$

I have that for computing the eigenvalues of the block matrix:

$$\det\begin{bmatrix}A-\lambda I & B \\ C & D-\lambda I\end{bmatrix} = \det(A-\lambda I)\det((D-\lambda I) - C(A-\lambda I)^{-1}B) = 0$$

So $\det(A - \lambda I) = 0$ says that the eigenvalues of $A$ are eigenvalues of the block matrix? But from some numerical simulations I have found that this is not true, what am I missing here? Maybe is because the first relation requires $A$ nonsingular and $A-\lambda I$ is not?

Then, this leads me to another question, why this expression holds $$\det\begin{bmatrix}A-\lambda I & 0 \\ C & D-\lambda I\end{bmatrix} = \det(A-\lambda I)\det((D-\lambda I) = 0$$ for stating that the eigenvalues of the block matrix are the eigenvalues of $A$ and $D$ if $A-\lambda I$ is singular?

If $\det(A - \lambda I) = 0$, then you cannot form $(A - \lambda I)^{-1}$, which appears also in the formula. Hence the formula does not apply, unless $B = 0$ or $C = 0$, the case of a block tridiagonal matrix.