We know two matrix M and N are said to be similar if thee exist an invertible matrix P such that \(\displaystyle{P}^{{-{{1}}}}{M}{P}={N}\)

Suppose that A is not singular. Therefore \(\displaystyle{A}^{{-{{1}}}}\) exist. Now \(AB=AB(AA^{-1}) =A(BA)A^{-1}\)

This shows that AB and BA are similar.