abstract: Formal analogies constitute a powerful tool in the development of physics, particularly since the end of the 19th century. In this talk we will begin with a classification of the diferent kinds of analogies used in science over the period 1665-1780 --using papers published in the Transactions of the Royal Society -- and then focus on a particularly striking use of formal analogies in the work of Albert Einstein in his work on the nature of light and matter over the period 1905-1925.