Let $A,B\in\mathcal{M}_n(\mathbb{R})$.
We suppose that there exists $P\in\mathbb{R}[X]$ with $\deg P\geq1$ such that $P(0)=1,P(A)=AB$.
How can I show that $A$ is invertible and that $AB=BA$ ?
I don't really see how to exploit the information given here to get to the answer, especially $P(0)=1$.. All I have tried haven't worked up to now.