A class of special matrices and quantum entanglement