We derive a general method for determining the necessary and sufficient conditions for exact factorization of an eigenstate of a many-body Hamiltonian , based on the quantum covariance matrix of the relevant local operators building the Hamiltonian. The "site" can be either a single component or a group of subsystems. The formalism is then used to derive exact dimerization and clusterization conditions in spin systems, covering from spin- singlets and clusters coupled to total spin to general nonmaximally entangled spin- dimers (generalized singlets). New results for field induced dimerization in anisotropic arrays under a magnetic field are obtained