Minimal polynomial of a matrix over a field 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 

This isn't correct. For example, the matrix $A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}$ satisfies $p(A)=0$ where $p(t)=t^2$, however $p(t)=f(t)g(t)$ where $f(t)=g(t)=t$ and $f(A) \ne 0 \ne g(A)$.
There are some similar-ish results that you might be thinking of. I'll list a few. Let $A$ be a matrix with characteristic polynomial $p$ and minimal polynomial $m$ over a given (well-behaved) field.


*

*$A$ satisfies its minimal polynomial; that is, $m(A) = 0$.

*If $f$ is a polynomial then $f(A)=0$ if and only if $m\, |\, f$; in particular, $p(A)=0$.

*If $m(t)=f(t)g(t)$ and $f(A)=0$ then $g$ is constant.

