Attraction, affinity, sympathy are comparable when they denote the relationship between persons or things that are involuntarily or naturally drawn together and exert, to some degree, an influence over each other.
Attraction implies the possession by one person or thing of qualities with the power to draw another person or thing so that the latter moves toward the former or, in the case of things, is brought into contact with it or clings to it.
Attraction also implies the existence in the thing attracted of susceptibility to the influence of what attracts; in the case of persons it may be a natural inclination for, a predisposition to, or an innate liking of what attracts or, in the case of things, a tendency to unite or combine with the attractant.
This natural or constitutional susceptibility is called affinity. Therefore affinity is the complement of attraction and not its synonym; thus, attraction is a force whereby a magnet draws iron to it, but iron is one of the few metals that have an affinity for the magnet; chemistry has a powerful attraction for minds that have an affinity for it.
The words are interchangeable only when used of persons and things that are mutually attracted or have a reciprocal affinity for each other; even in these cases, however, the fundamental distinction in meaning prevails; thus, two persons may have an attraction (or an affinity) for each other; atoms remain in combination in a substance because of their affinity or attraction for each other.
It is not by chance that in physics, the science concerned with energy, attraction is the word used in reference to atomic cohesion and that in chemistry, the science concerned with the composition of substances, affinity is the technical term.
Sympathy stresses not so much the drawing together of persons or things as their reciprocal influence or their susceptibility to the same influences. When used in reference to things, it commonly implies interaction.
When used in reference to persons, sympathy usually connotes spiritual affinity, or compatibility in tastes, interests, or aims.