A matrix $A \in M_n(F)$ is invertible iff there exists a matrix like $B \in M_n(F)$ such that $AB=I_n$.
A scalar like $\lambda \in F$ is called an eigenvalue of $A$ iff $\lambda I_n-A$ is not invertible.
The characteristic polynomial of a square matrix is a polynomial which is invariant under matrix similarity and has the eigenvalues as roots. It has the determinant and the trace of the matrix as coefficients.
Question :
Assume that $A,B \in M_n(\mathbb C) $ and $f(x)=\det(xI_n-B)$ is the characteristic polynomial of $B$.
Prove that $f(A)$ is invertible iff $A,B$ have no common eigenvalues.
Note : Here, when we talk about $f(A)$, we mean something like this :
$f(x)=a_nx^n+a_{n-1}x^{n-1}+\dots+a_1x+a_0 \implies f(A)=a_nA^n+a_{n-1}A^{n-1}+\dots+a_1A+a_0I$
The problem :
I'm confused about the meaning of $f(A)$ being invertible and the characteristic polynomial of $A$ which is $det(xI_n-A)$. I don't know where to start and what to work on.