c.1300, "relation by marriage" (as opposed to consanguinity), from Old French afinité (12c.), from Latin affinitatem (nominative affinitas) "neighborhood, relationship by marriage," noun of state from affinis "adjacent," also "kin by marriage," literally "bordering on," from ad- "to" (see ad-) + finis "a border, an end" (see finish). Used figuratively since c.1600 of structural relationships in chemistry, philology, etc. Meaning "natural attraction" (as though by family) is from 1610s.
affinity af·fin·i·ty (ə-fĭn'ĭ-tē)
n.
An attraction or force between particles that causes them to combine.
The attraction between an antigen and an antibody.
A relationship or resemblance in structure between species that suggests a common origin.
The selective staining of a tissue by a dye. The selective uptake of a dye, chemical, or other substance by a tissue.
relationship by alliance (2 Chr. 18:1) or by marriage (1 Kings 3:1). Marriages are prohibited within certain degrees of affinity, enumerated Lev. 18:6-17. Consanguinity is relationship by blood.