Show that $\textrm{ker}(p(\phi ))=0$ if and only if the greatest common divisor of $p$ and $m_{\phi }:=m_{M(\phi )}$ is $1$. The Problem

Let $\phi \in \textrm{End}(V)$ for a finite dimensional vector space
  $V$ over a field $k$. Let $p(x)\in k[x]$. Show that
  $\textrm{ker}(p(\phi ))=0$ if and only if the greatest common divisor
  of $p$ and $m_{\phi }:=m_{M(\phi )}$ is $1$.


Definitions
To better clarify what definitions I am working with in my textbook (Abstract Linear Algebra by Morton L. Curtis), I will provide them here.
My book defines $M(\phi)$ as "the matrix representation of $\phi$ with respect to the bases $\{v_1,\dots,v_n\}$ and $\{w_1,\dots,w_m\}$."  
I believe $m_\phi$ is referring to the minimal polynomial of $M(\phi)$.
My book also defines the greatest common divisor with the following definition and proposition.

Definition.  If $p(x),q(x)\in k[x]$ we say that $q$ divides $p$ if there is some nonconstant $h(x)\in k[x]$ such that $p=qh.$
Given two polynomials $f(x),g(x)$ in $k[x]$ we now find their greatest common divisor.
Proposition.  Given $f(x), g(x)\in k[x]$ (not both zero), there is a unique polynomial $d(x)$ satisfying:
(i)  $d(x)=a(x)f(x)+b(x)g(x)$  (for some $a(x),b(x)\in k[x]$),
(ii)  $d(x)$ is monic,
(iii)  $d(x)$ divides both $f(x)$ and $g(x)$, and
(iv)  if $s(x)$ divides both $f(x)$ and $g(x)$, then $s(x)$ divides $d(x)$.


My Questions
I haven't the slightest clue as to how to approach this problem.  Some questions I've written down are:


*

*What exactly is $p(\phi)$?  I looked for explicit examples of this to aid my understanding but couldn't find anything.

*If the $\gcd(p,m_\phi)=1$ then $p$ and $m_\phi$ are relatively prime if I remember my number theory correctly.  How does this at all connect to $\textrm{ker}(p(\phi ))=0$?

*It seems a proof of this will have two directions.  Which one should I start with?



THANK YOU!
 A: We are given that for suitable polynomials $\lambda$ and $\mu$ in $k[X]$, we will have $\lambda(X) p(X) + \mu(X) m(X) = 1$, so in $k[X]/\langle m(X) \rangle$ we have $p(X)$ is invertible and so it remains under the substitution map with respect to the endomorphism $\phi$ in $k[\phi]$.
Here's another way to see this: the kernel of $p(\phi)$ is invariant under $\phi$ so if that kernel was non-trivial we would have a problem because there is a $\lambda$ such that $\lambda(\phi)p(\phi) = I$.
In more detail, suppose $x \neq 0 \in ker(p(\phi))$, then $\lambda(\phi)p(\phi))(x) = 0$ but $Ix = x$
I should probably add why the kernel of $p(\phi)$ is invariant under $\phi$: Suppose $x \in V$ is such that $p(\phi)(x) = 0$, now $p(\phi)(\phi(x)) = \phi(p(\phi)(x)) = \phi(0) = 0$, i.e. $\phi(x)$ is also in the kernel of $p(\phi)$

Basically, there is a connection between $k[X]/\langle m(X) \rangle$ and the endomorphisms of finite dimensional $V$ over $k$. Suppose the dimension of $V = n$, then the set of morphisms $I, \phi, \phi^2, \ldots \phi^{n^2}$ can be reduced to a linearly independent spanning set which reflects $k[\phi]$  
A: First off, $p(q)$ which I will write as $p[\phi]$ is the result of substituting $\phi$ for the indeterminate $x$ in $p$, so is $p=c_0+c_1x+\cdots+c_lx^l$ then $p[\phi]=c_0I+c_1\phi+\cdots+c_l\phi^l$. By definition of $m_\phi$ one has $m_\phi[\phi]=0$, and $m_\phi$ is the minimal degree monic polynomial with this property, so with $d=\deg m_\phi$ the powers $\phi^0=I,\phi^1,\phi^2,\ldots,\phi^{d-1}$ are linearly independent.
Where the question says $\ker(p[\phi])=0$ it means $\ker(p[\phi])=\{\vec0\}$, which I shall write as $\dim\ker(p[\phi])=0$.
Now start with the direction that links common divisors with $\ker(\phi)$. Suppose that $p$ has a nontrivial common divisor with $m_\phi$, in other words $s=\gcd(p,m_\phi)$ has $\deg s>0$; the statement claims that $\dim\ker(p[\phi])>0$ in this case. Since $p=ts$ for some $t\in k[x]$ one has $p[\phi]=t[\phi]\circ s[\phi]$, which implies $\ker(p[\phi])\supseteq\ker(s[\phi])$, and it will suffice to show $\dim\ker(s[\phi])>0$. This comes from the minimality of$~m_\phi$, as follows. Write $m_\phi=sq$ for some quotient $q\in k[x]$; then $\deg q<\deg m_q$, so by the mentioned minimality $q[\phi]\neq0$. On the other hand $0=m_\phi[\phi]=s[\phi]\circ q[\phi]$, so the (nonzero) image of $q[\phi]$ is contained in $\ker(s[\phi])$, which establishes $\dim\ker(s[\phi])>0$ as desired.
In the converse direction, we must show that is $p$ and $m_\phi$ are relatively prime, then $\dim\ker(p[\phi])=0$. There are two approaches to this: one can show that $\dim\ker(p[\phi])>0$ would lead to a non-trivial common divisor (and therefore a contradiction), or one can show $p[\phi]$ is invertible by arguing that $p$ is invertible modulo $m_\phi$. The first approach is similar to the above, but the second is easier. Just sketching the first approach: if $\dim\ker(p[\phi])>0$ then $W=\ker(p[\phi])$ is a nonzero $\phi$-stable subspace to which one can restrict$~\phi$; the minimal polynomial $\mu$ of the restriction $\phi|_W$ has $\deg\mu>0$ and divides any polynomial $t$ for which $t[\phi]$ vanishes on$~W$, which includes $p$ and $m_\phi$, so $t$ provides their nontrivial common divisor. For the second approach, write $\gcd(p,m_\phi)=1=sp+tm_\phi$ for Bézout coefficients $s,t\in k[x]$ and interpret this as saying that $s$ is the inverse of $p$ modulo $m_\phi$. By substituting $\phi$ for $x$ the "modulo $m_\phi$" disappears: $s[\phi]$ is actually the inverse of $p[\phi]$ since from the Bézout relation we get:
$$
  I=1[\phi]=s[\phi]\circ p[\phi]+t[\phi]\circ m_\phi[\phi]
          = s[\phi]\circ p[\phi].
$$
