Let A, B be square matrices of the same size. Then it can be proved that $det(\lambda I-AB)=det(\lambda I-BA)$, if we assumes that B is invertible.
I'm lost from here, since by definition, determinant is a number, then the identity $det(\lambda I-AB)=det(\lambda I-BA)$ shows two numbers are equal, but how can I conclude from it the polynomials are the same?
Thanks!
I found this solution https://math.stackexchange.com/a/3110428/533661, but I don't understand how specialize the entries of $A$ and $B$ to concrete values in the field of interest happens.