$f(A)$ is invertible iff characteristic polynmoial and f have no common root I want to prove the following theorem.

Let $A$ be a square matrix, and let $p_A(t)$ be its characteristic polynomial. Let $f(t)$ be a given polynomial. Then $f(A)$ is invertible iff $p_A$ and $f$ have no common root.

First Let me state what I know. 
Let $A$ be a $n\times n$ matrix.  Then $p_A(t) = det(A-tI_n)$ and $f(t) = c_0 + c_1 t^1 + \cdots c_n t^n + \cdots$ is polynomial of $t$. 
 A: I suppose everything happens in the field of complex numbers.
Write $f$ as a product of linear factors,
$$
f = c (t-\mu_1) \cdots (t-\mu_k)
$$
with $c\ne0$.
Then 
$$
\det( f(A)) = \det( c (A-\mu_1 I_n) \cdots (A-\mu_k I_n)) 
=c^n \det(A-\mu_1 I_n) \cdots \det(A-\mu_k I_n)
$$
is zero iff one of the factors is zero, that is, if one of the roots of $f$ is an eigenvalue of $A$.
A: Assuming you are working over $\mathbb{C}$.
The roots of the characteristic polynomial are precisely the eigenvalues of $A$; that is, the scalars $\lambda$ such that $A-\lambda I$ is not invertible.
Factoring $f(x)$ into linear terms you have
$$f(x) = c(x-a_1)\cdots(x-a_k).$$
IF $f(x)$ and $p_A$ have no common roots, then $a_1,\ldots,a_k$ are not eigenvalues. So $A-a_iI$ is invertible for each $i. Thus,
$$f(A) = c(A-a_1I)\cdots(A-a_kI)$$
is a product of invertible matrices, and thus is itself invertible.
Conversely, if $f(A)$ is invertible, then each $A-a_iI$ is invertible, which you can verify by taking determinants. Thus, none of the $a_i$ are eigenvalues of $A$, and so none of them are roots of $p_A$.
A: in $\mathbb C$, if you know typical proofs of Cayley Hamilton this should be immediate.  
idea 0:
suppose your matrix $A$ is upper triangular  
idea 1:
upper triangular matrix times upper triangular matrix = upper triangular matrix
(i.e. closure under multiplication)
by direct computation  
idea 2:
upper triangular matrix plus upper triangular matrix = upper triangular matrix
(i.e. closure under addition)
obvious  
idea 3:
let $p_A$ have roots $\lambda_k$
then $f(A)$ has $f(\lambda_k)$ on the diagonal (immediate when you make use of prior ideas), and $f(\lambda_k)=0$  iff $\lambda_k$ is a root of $f$, by definition  
idea 4
a triangular matrix is invertible iff it has no zeros on the diagonal.  This proves the claim for triangular matrices.   
The 'more general' case comes immediately because in $\mathbb C$ every n x n matrix is similar to an upper triangular matrix (Jordan, Schur triangularization, or other more basic approaches), and rank doesn't change by similarity transforms and neither does the characteristic polynomial.   
