Starting from the Cayley–Hamilton identities for n×n ordinary matrices which result from the application of the corresponding Cayley–Hamilton theorem, the generic Mandelstam identities are derived. The converse of the above statement is also proven. The method is extended to supermatrices and a definition of the generic Mandelstam identities in that case is proposed.