# Show that two matrices are similar when they have the same characteristic polynomial and a cyclic vector

I need to show that if $$A$$ and $$B$$ have a cyclic vector and have equal characteristic polynomial, then they are similar.

Here I know that given $$T: V \rightarrow V$$ with $$n=\operatorname{dim} V,$$ a $$T$$ -cyclic vector $$v \in V$$ satisfies $$B=\left(v, T(v), \ldots, T^{n-1}(v)\right)$$ is an ordered basis of $$V$$, and $$[T]_{B}=L_{\Delta_{T}}=L_{\psi_{T}}$$, where $$L_{f}$$ is the companion matrix defined by the polynomial $$f$$. But I'm not seeing how I can use this information to prove what I need.

$$A$$ and $$B$$ have a cyclic vector and have common characteristic polynomial $$f$$. Let $$v$$ denote an $$A$$-cyclic vector, and let $$w$$ denote a $$B$$-cyclic vector. Let $$\mathcal A = (v,Av,\dots,A^{n-1}v)$$, and let $$\mathcal B = (w,Bw,\dots,B^{n-1}w)$$. We note that $$[A]_{\mathcal A} = [B]_{\mathcal B} = L_f.$$ In other words, $$A$$ is similar to $$L_f$$ and $$B$$ is similar to $$L_f$$. Because matrix similarity is an equivalence relation, this means that $$A$$ is similar to $$B$$.