Determinant question. I don't understand the solution

71 Views Asked by At

I don't understand the solution of this problem.

Problem: Let $A$ be an $n \times n$ matrix, $\lambda_1$ an eigenvalue of $A$, and let $I_n$ denote the identity matrix of size $n \times n$. Recall that the multiplicity of $λ_1$ is the largest integer $k$ such that $(\lambda − \lambda_1)^k$ is a factor of the characteristic polynomial $|\lambda I_n − A|$. If $A$ and $B$ are two similar square matrices, show that they have the same characteristic polynomial.

Solution: If $A = S^{-1}BS$ for some invertible matrix $S$, then

\begin{align*} p_A(λ) &= \det(\lambda I_n - A) \\ &= \det(\lambda I_n - S^{-1}BS) \\ &= \det(S^{-1} (λI_n - B)S) \\ &= \det(S^{-1}) \det(λI_n - B) \det(S) \\ &= \det(S)^{-1} \det(λI_n - B) \det(S) \\ &= \det(λI_n - B) \\ &= p_B(λ). \end{align*}

I don't understand this part. How can we write $S^{-1}$ in determinant like this?

$$\det(λI_n - S^{-1}BS)= \det(S^{-1}(λI_n - B)S)$$