Similarity between systems and direct sum decomposition