I remember from my linear algebra courses that if I have a $n\times n$ matrix with coefficients in a field (denoted as $A$) and I have a polynomial $P $ over the field s.t. $P(A)=0$ and a decompostion $P=f(x)g(x)$ over the field then $f(A)=0$ or $g(A)=0$.
This was used to calculate the minimal polynomial of $A$.
My question is: Is the statement above that $f(A)=0$ or $g(A)=0$ is correct or maybe I remember wrong ? the reason I am asking is that there are non zero matrices $B,C$ s.t. $BC=0$ so I don't see how the conclusion was made