|Section of French chemist Etienne Geoffroy's 1718 affinity table, the very first affinity table, constructed form affinity reaction descriptions as found in Isaac Newton's 1718 Query 31, each "header species" (top row) shown with potential "reactants" (chemicals below header species), listed in descending order of "affinity" preference, the weakest reactant listed in the lowest row.|
In 1906 to 1910, “chemical affinity” began to be synonymously referred to, as summarized reported by Fielding Garrison, as: “chemical potentiality” and or the potential of the solution. (Ѻ)
In 1922, English chemist Joseph Mellor commented: “some try to evade the difficulty by using other terms: ‘elective attraction’, ‘chemical activity’, ‘chemical avidity’, ‘chemical energy’, etc., but the original term ‘chemical affinity’, is convenient, provided it is kept in place.”  Other synonyms include: elective affinity and human elective affinity. The term elective affinity was a common usage in the 18th century (supposedly originating in Francis Bacon's definition of affinity as an "election to embrace"); whereas chemical affinity is the common modern scientific usage.
Empedocles | Plato
The concept of affinities traces to the circa 450BC theories of attracting and repelling forces developed by Greek philosopher Empedocles (490-430BC), in the form of chemistry aphorisms, as in people who like each other mix like water and wine, whereas enemies separate like oil and water. Empedocles argued for existence of two forces: love (philia) and strife (neikos), which were used to account for the causes of motion in the universe. These two forces, philia and neikos, were said to intermingle with the four elements (earth, water, air, and fire) in such a manner that philia, so to say, served as the binding power linking the various parts of existence harmoniously together, whereas neikos acted to cause separation. 
These views were later adopted by others. First, it seems, by Greek physician Hippocrates (460-370BC), who in circa 410BC promoted the theory that “like assorts with like”.  Greek philosopher Plato (428-348BC) also adopted this view, arguing that "like tends towards like." This generalized statement is often referred to as the the first law of affinity, or sometimes Plato's first law of affinity. Plato in particular interpreted Empedocles’ two agents as attraction and repulsion, stating that their operation is conceived in an alternate sequence. From these arguments, Plato originated the concept of ‘likes attract’, e.g. earth is thus attracted towards earth, water toward water, and fire toward fire. 
In the following centuries there have been at least a dozen or more laws of attraction or "laws of affinity", depending on which chemist is sourced.
|A modern diagram of "affinities", in the physico-chemical sociological context, from the 2019 Beg-Thims interview.|
The name affinitas, according to English chemistry historian James Partington, was first used in the sense of chemical relation by German philosopher Albertus Magnus near the year 1250. 
The introduction of the term affinity, according to Saul Dushman (1914), is usually ascribed to Dutch physician-chemist Herman Boerhaave (1668-1738), who is said to have gave this term a meaning that it has retained ever sense, vis: the “force holds together chemically dissimilar substances.” 
The first affinity table was made by French chemist Etienne Geoffroy in 1718, now known as Geoffroy's affinity table.  Geoffroy's table was a result of his reading (actually a translation into French) of Newton's Query 31, in which various affinity relations were written out in verbal form. This launched the science of affinity chemistry, which dominated 18th century chemistry, only to later be subsumed into the beginnings of the late 19th century chemical thermodynamics and physical chemistry.
Dozens of affinity tables were produced in the decades throughout the 18th century. The largest affinity table ever created was Bergman's affinity table in 1775.
In 1799 German polymath Johann Goethe began to express the outlines of a human chemical reaction view of human relationships using affinity chemistry logic, particularly in discussion to his associate German author Friedrich Schiller, wherein Goethe commented to the effect that:
“Delicate [chemical] relationships [exist between people] through which they attract and repel, neutralize each other, separate again and re-establish themselves.”
In 1808 using Bergman's 1775 affinity table as a basis of logic, Goethe made the world's first human elective affinity table, now known as Geothe's affinity table.
In 1861, English chemist and physicist Michael Faraday, in what can be considered a representative transition view, defined the term "chemical affinity" as the force of chemical action between different bodies; that depends entirely upon the energy which particles of different kinds attract each other. 
Berthollet, Guldberg, Waage (1867)
Berzelius, Helmholtz (1887)
Mitscherlich, Spring (1904)
Deville, Debray, Berthelot
Thomson, Berthelot (1865)
Horstman, Gibbs, Helmholtz
|The main pioneers of late 18th century affinity chemistry, in physical chemistry in particular, according to the 1905 opinion of Dutch chemist Jacobus van't Hoff. |
Thermal theory of affinity
Into the 1850s and 60s, what was called the “thermal theory of affinity” was introduced to explain chemical affinity on the logic that heat released during chemical reaction was the true measure of affinity.  This was called the Berthelot-Thomsen principle, proposed independently by Danish chemist Julius Thomsen in 1854 and by French chemist Marcellin Berthelot in 1864.
Followers of the Thomsen-Berthelot point of view included: German physical chemist Alexander Naumann (1837-1922), who notably received a copy of the first part of Gibbs' 1876 work, German chemist Karl Mohr, and Austrian physical chemist Hans Jahn (1853-1906). 
This logic however, was soon (early 1880s) shown to be an incomplete theory and thus defunct, due to the development of entropy (1850-65) and the discovery that not all reactions followed this model in practice. The fall of the thermal theory, however, was not immediate.
Criticism of the "thermal theory of affinity" came from Dutch theoretical chemist Schroder van der Kolk (1864) and later by Norwegian scientists, who formulated the law of mass action, Cato Guldberg and Peter Waage (1867). Others also began to point out that the inadequacy of the thermal theory of affinity in regards to explaining endothermic reactions. 
The 1904 theories, in Van't Hoff's ideas concerning affinity table (above), of Eilhard Mitscherlich and W. Spring on chemical affinity still need to be tracked down.
Work of chemical affinity
In the physical chemistry of Jacobus van't Hoff, starting with his 1884 Studies in Chemical Dynamics and followup expanded 3-volume Lectures on Theoretical and Physical Chemistry (1898-1900), without recourse to either free energy or entropy, he introduced what he called the "work of chemical affinity", which for a process occurring at constant pressure (isobaric) and and temperature (isothermal), according to chemistry historians Helge Kragh and Stephen Weininger, is the negative of the change in Gibbs free energy. 
Thermodynamic theory of affinity
When the logic of thermodynamics as developed by Rudolf Clausius, began to be applied to chemical problems, by scientists such as August Horstmann, Francois Massieu, Willard Gibbs, and Hermann Helmholtz, a new thermodynamic definition of affinity arose. The turning point was the 1882 publication "The Thermodynamics of Chemical Processes", by Helmholtz which proved that owing to the aspects of entropyit is the free energynot heat which is the true measure of affinities.  In this sense, free energy is sometimes defined as the "maximum work" (Helmholtz) that a system can produce or the "available energy" (Gibbs) of the system.  In this new interpretation, as defined in 1905 by Dutch physical chemist Jacobus van't Hoff: 
“Affinity is defined as the maximum quantity of work that a chemical change can produce. Equilibrium ensues when this quantity is zero.”
The influential 1923 textbook Thermodynamics and the Free Energy of Chemical Substances by American physical chemists Gilbert Lewis and Merle Randall is said to have led to the replacement of the term “affinity” by the term "free energy" in much of the English-speaking world. 
In 1936 Belgian chemist Theophile de Donder published his Thermodynamic Theory of Affinity, in which he clearly used the symbol "A" for affinity as the negative partial of the Gibbs free energy per unit partial of extent of reaction for a change in a isothermal isobaric system: 
Gibbs free energy
The thermodynamic measurement of affinity for isothermal-isobaric reactions, typical on the surface of the earth, is the negative of the change in the Gibbs free energy (such as alluded to in the work of Jacobus van't Hoff, above):
in expanded form:
This can also be restated in terms of the for driving force, symbol "D", of the reaction, such as done by Chinese thermodynamicist Jitao Wang, citing Theophile de Donder, as follows: 
where μ is the chemical potential of ith component or chemical species and ν is the stoichiometric coefficient of the ith component or chemical species in the reacting system. This can also be redefined in terms such as: extent of reaction, progress of reaction, and or relaxation of reaction. 
Helmholtz free energy
For isothermal isochoric processes:
in expanded form:
where the affinity is equal to the negative of the change in the Helmholtz free energy.
In 2006, American electrochemical engineer Libb Thims came across the affinity-based "human chemical theory" of Goethe, at that time "affinity" being a new concept to Thims, being that in 1923, following the work of Gilbert Lewis (Thermodynamics and the Free Energy of Chemical Substances), the teaching of affinity based physical chemistry was supplanted the teaching of free energy based physical chemistry; meaning that the subject of affinity or affinity chemistry is not taught to chemical engineers and physical chemists, in modern times, a few fields aside (e.g. drug-receptor thermodynamics). Thims, thereafter, spent a large amount of time doing historical research to see how the concept of affinity transformed into the concept of free energy.
In 2007, Thims published first textbook on human chemistry, Human Chemistry (Volume One, Volume Two), outlining the basics of free energy interpretations of human affinities involved in human chemical reactions. 
● Affinity of reaction
1. Thomson, Thomas. (1831). A System of Chemistry, vol. 1. (p.31: chemical affinity is described as an "unknown force"). 7th ed., 2 vols.
2. Faraday, M. (1861). On the Various Forces in Nature. New York: Prometheus Books.
3. Partington, J.R. (1937). A Short History of Chemistry (pg. 322). Dover.
4. Cahan, D. (1993). Hermann von Helmholtz – and the Foundations of Nineteenth-Century Science. Berkeley: University of California Press.
5. Leicester, H. (1971). The Historical Background of Chemistry. New York: Dover.
6. Thims, Libb. (2007). Human Chemistry (Volume Two), (preview), (ch. 10: “Goethe’s Affinities” and ch. 11: “Affinity and Free Energy”, pgs. 371-468) Morrisville, NC: LuLu.
7. Mellor, Joseph W. (1922). Modern Inorganic Chemistry (pg. 95). Longmans, Green & Co.
8. Author. (1996). “Article”, Historical Studies in the Physical and Biological Sciences (pg. 98), Vol 27, Part 1.
9. Van’t Hoff, Jacobus H. (1905). “The Relation of Physical Chemistry to Physics and Chemistry”, Science (pg. 654). 22(569): 649-54, Nov. 24.
10. Helmholtz, Hermann. (1882). “On the Thermodynamics of Chemical Processes”, in: Physical Memoirs Selected and Translated from Foreign Sources, 1: 43-97. Physical Society of London, Taylor and Francis, 1888.
11. Thims, Libb. (2007). Human Chemistry (Volume One) (History of Attraction and Repulsion Theories, pg. 169-). Morrisville, NC: LuLu.
12. Jammer, Max. (1957). Concepts of Force: a Study of the Foundations of Dynamics. Dover.
13. (a) Lynch, Sandra. (2005). Philosophy and Friendship (Crebillon, pg. 37). Edinburgh University Press.
(b) Steer, Alfred G. (1990). Goethe’s Elective Affinities: the Robe of Nessus (Crebillon, pg. 37). Winter.
(c) Prosper Jolyot de Crebillon – Wikipedia.
14. Kragh, Helge and Weininger, Stephen J. (1996). “Sooner Science than Confusion: the Tortuous Entry of Entropy into Chemist” (abs), Historical Studies in the Physical and Biological Sciences, 27(1): 91-130.
15. (a) Kragh, Helge and Weininger, Stephen J. (1996). “Sooner Science than Confusion: the Tortuous Entry of Entropy into Chemist” (abs), Historical Studies in the Physical and Biological Sciences, 27(1): 91-130.
(b) Alexander Naumann – Encyclopedia.com.
(c) Hans Max Jahn – Encyclopedia.com.
16. Wang, Jitao. (2011). Modern Thermodynamics: Based on the Extended Carnot Theorem (pg. 84). Springer.
17. Kalidas, C. (2005). Chemical Kinetic Methods: Principles of Fast Reaction Techniques and Applications (§5: Thermodynamic Aspects in Relation to Chemical Relaxation, pgs. 74-113). New Age International.
18. Dushman, Saul. (1914). “Recent Views on Matter and Energy” (great problem of chemical affinity, pg. 955)., General Electric Review, 17: 952-60.
● Hall, Thomas W. (1888). Correlation Theory of Chemical Action and Affinity. Remington.
● Muir, Matthew M.P. (1907). A History of Chemical Theories and Laws (ch. XIV: Chemical Affinity, pgs. 379-430, esp. keyword: “Bergmann”, pgs. 384-94). Wiley.
● Holmes, Frederick L. (1962). “From Elective Affinities to Chemical Equilibria: Berthollet’s Law of Mass Action” (Berthollet’s affinity theory, pg. 115) (abs), Chymia 8: 105-46.
● Kim, Mi Gyung. (2003). Affinity, That Elusive Dream – A Genealogy of the Chemical Revolution. Cambridge, Mass: The MIT Press.
● Guilez, Juan. (2004). “A Historical Approach to the Development of Chemical Equilibrium through the Evolution of the Affinity Concept: Some Educational Suggestions”, Chemistry and Education: Research and Practice, 5(1): 69-87.
● Reill, Peter H. (2005). Vitalizing Nature in the Enlightenment (“elective affinities”, 16+ pgs). University of California Press.
● Affinity – Wikipedia.