One Linear Map a Polynomial in the Other: Help Find the Flaw in my Proof $\DeclareMathOperator{\End}{End} \DeclareMathOperator{\spann}{span}$The following is a homework question for my Linear Algebra class that I did about a month ago, followed by my answer which only got 4/5 marks for "not using the premise that $ST = TS$." What I'm confused about is the fact that the proof (which I've pasted in verbatim) seems valid to me without using that premise. So the question I pose is simply: where is my flaw? I can't find it.
Suppose $T \in \End(V)$ and $v$ is a vector such that the vectors $T^rv$ span $V$. If $S \in \End(V)$, show that $Sv = p(T)v$ for some polynomial $p$. Using this deduce that if $ST = TS$, then $S$ is a polynomial in $T$.
Since the $T^rv$ span $V$, we know that for any element $u \in V$, $u = p(T)v$ for some polynomial $p$. But $Sv$ is simply an element of $V$, so the last statement holds for it too. Assume that $S \neq p(T)$ for any polynomial $p$. In this case $Sv \notin \spann\{v, Tv, T^2v, \dots, T^nv\}$. Well then we have quite a problem, since $\spann\{v, Tv, \dots, T^nv\} = V$. This provides the needed contradiction.
 A: Let's consider the case $V = \mathbb{R}^2$, $v = \left[\begin{array}{c} 1 \\ 1\end{array}\right]$,
$$T = \left[\begin{array}{cc} 2 & 0 \\ 0 & 1\end{array}\right],\; S = \left[\begin{array}{cc} 0 & 1 \\ 0 & 0\end{array}\right].$$
Then, $B = \{v, Tv\} = \left\{ \left[\begin{array}{c} 1 \\ 1\end{array}\right], \left[\begin{array}{c} 2 \\ 1\end{array}\right] \right\}$ spans $\mathbb{R}^2$, as required, so $Sv = p(T)v$ for some polynomial (as you deduced).  But, any polynomial $p(T)$ will be diagonal, and $S$ is certainly not diagonal!  Computing, we find
$$ST = \left[\begin{array}{cc} 0 & 1\\ 0 & 0\end{array}\right] \not= \left[\begin{array}{cc} 0 & 2 \\ 0 & 0\end{array}\right] = TS.$$
To see how you can use the fact that $ST = TS$ to prove that $S = p(T)$, consider how $S$ acts on the basis vectors $T^rv$, and remember that a linear transformation is uniquely determined by how it behaves on a basis.
EDIT: To explain a little bit more clearly about where your proof when wrong: you have proved that $Sv = p(T)v$ for one particular $v$, but this does not prove that $S = p(T)$.  In general, to show two linear transformations are equal, we need a whole basis's worth of information.
