The tree of life or universal tree of life is a metaphor, model and research tool used to explore the evolution of life and describe the relationships between organisms, both living and extinct, as described in a famous passage in Charles Darwin's On the Origin of Species (1859). 
The affinities of all the beings of the same class have sometimes been represented by a great tree. I believe this simile largely speaks the truth.— Charles Darwin 
The term phylogeny for the evolutionary relationships of species through time was coined by Ernst Haeckel, who went further than Darwin in proposing phylogenic histories of life. In contemporary usage, tree of life refers to the compilation of comprehensive phylogenetic databases rooted at the last universal common ancestor of life on Earth. Two public databases for the tree of life are TimeTree, for phylogeny and divergence times, and the Open Tree of Life, for phylogeny.
Although tree-like diagrams have long been used to organize knowledge, and although branching diagrams known as claves ("keys") were omnipresent in eighteenth-century natural history, it appears that the earliest tree diagram of natural order was the 1801 "Arbre botanique" (Botanical Tree) of the French schoolteacher and Catholic priest Augustin Augier.   Yet, although Augier discussed his tree in distinctly genealogical terms, and although his design clearly mimicked the visual conventions of a contemporary family tree, his tree did not include any evolutionary or temporal aspect. Consistent with Augier's priestly vocation, the Botanical Tree showed rather the perfect order of nature as instituted by God at the moment of Creation. 
In 1809, Augier's more famous compatriot Jean-Baptiste Lamarck (1744–1829), who was acquainted with Augier's "Botanical Tree",  included a branching diagram of animal species in his Philosophie zoologique.  Unlike Augier, however, Lamarck did not discuss his diagram in terms of a genealogy or a tree, but instead named it a tableau ("depiction").  Lamarck believed in the transmutation of life forms, but he did not believe in common descent; instead he believed that life developed in parallel lineages advancing from more simple to more complex. 
In 1840, the American geologist Edward Hitchcock (1793–1864) published the first tree-like paleontology chart in his Elementary Geology, with two separate trees for the plants and the animals. These are crowned (graphically) with the Palms and Man. 
The first edition of Robert Chambers' Vestiges of the Natural History of Creation, published anonymously in 1844 in England, contained a tree-like diagram in the chapter "Hypothesis of the development of the vegetable and animal kingdoms".  It shows a model of embryological development where fish (F), reptiles (R), and birds (B) represent branches from a path leading to mammals (M). In the text this branching tree idea is tentatively applied to the history of life on earth: "there may be branching". 
In 1858, a year before Darwin's Origin, the paleontologist Heinrich Georg Bronn (1800–1862) published a hypothetical tree labelled with letters.  Although not a creationist, Bronn did not propose a mechanism of change. 
Charles Darwin (1809–1882) used the metaphor of a "tree of life" to conceptualize his theory of evolution. In On the Origin of Species (1859) he presented an abstract diagram of a theoretical tree of life for species of an unnamed large genus (see figure). On the horizontal base line hypothetical species within this genus are labelled A – L and are spaced irregularly to indicate how distinct they are from each other, and are above broken lines at various angles suggesting that they have diverged from one or more common ancestors. On the vertical axis divisions labelled I – XIV each represent a thousand generations. From A, diverging lines show branching descent producing new varieties, some of which become extinct, so that after ten thousand generations descendants of A have become distinct new varieties or even sub-species a10, f10, and m10. Similarly, the descendants of I have diversified to become the new varieties w10 and z10. The process is extrapolated for a further four thousand generations so that the descendants of A and I become fourteen new species labelled a14 to z14. While F has continued for fourteen thousand generations relatively unchanged, species B,C,D,E,G,H,K and L have gone extinct. In Darwin's own words: "Thus the small differences distinguishing varieties of the same species, will steadily tend to increase till they come to equal the greater differences between species of the same genus, or even of distinct genera."  This is a branching pattern with no names given to species, unlike the more linear tree Ernst Haeckel made years later (figure below) which includes the names of species and shows a more linear development from "lower" to "higher" species. In his summary to the section, Darwin put his concept in terms of the metaphor of the tree of life:
The affinities of all the beings of the same class have sometimes been represented by a great tree. I believe this simile largely speaks the truth. The green and budding twigs may represent existing species; and those produced during each former year may represent the long succession of extinct species. At each period of growth all the growing twigs have tried to branch out on all sides, and to overtop and kill the surrounding twigs and branches, in the same manner as species and groups of species have tried to overmaster other species in the great battle for life. The limbs divided into great branches, and these into lesser and lesser branches, were themselves once, when the tree was small, budding twigs; and this connexion of the former and present buds by ramifying branches may well represent the classification of all extinct and living species in groups subordinate to groups. Of the many twigs which flourished when the tree was a mere bush, only two or three, now grown into great branches, yet survive and bear all the other branches; so with the species which lived during long-past geological periods, very few now have living and modified descendants. From the first growth of the tree, many a limb and branch has decayed and dropped off; and these lost branches of various sizes may represent those whole orders, families, and genera which have now no living representatives, and which are known to us only from having been found in a fossil state. As we here and there see a thin straggling branch springing from a fork low down in a tree, and which by some chance has been favoured and is still alive on its summit, so we occasionally see an animal like the Ornithorhynchus or Lepidosiren, which in some small degree connects by its affinities two large branches of life, and which has apparently been saved from fatal competition by having inhabited a protected station. As buds give rise by growth to fresh buds, and these, if vigorous, branch out and overtop on all sides many a feebler branch, so by generation I believe it has been with the great Tree of Life, which fills with its dead and broken branches the crust of the earth, and covers the surface with its ever branching and beautiful ramifications.
The meaning and importance of Darwin's use of the tree of life metaphor have been extensively discussed by scientists and scholars. Stephen Jay Gould, for one, has argued that Darwin placed the famous passage quoted above "at a crucial spot in his text", where it marked the conclusion of his argument for natural selection, illustrating both the interconnectedness by descent of organisms as well as their success and failure in the history of life.  David Penny has written that Darwin did not use the tree of life to describe the relationship between groups of organisms, but to suggest that, as with branches in a living tree, lineages of species competed with and supplanted one another.  Petter Hellström has argued that Darwin consciously named his tree after the biblical Tree of Life, as described in Genesis, thus relating his theory to the religious tradition. 
Page from Darwin's notebooks c. July 1837 with his first sketch of an evolutionary tree, and the words "I think" at the top
Diagram in Darwin's
On the Origin of Species, 1859.
It was the book's only illustration.
Ernst Haeckel (1834–1919) constructed several trees of life. His first sketch, in the 1860s, shows "Pithecanthropus alalus" as the ancestor of Homo sapiens.  His 1866 tree of life from Generelle Morphologie der Organismen shows three kingdoms: Plantae, Protista and Animalia. This has been described as "the earliest 'tree of life' model of biodiversity".  His 1879 "Pedigree of Man" was published in his 1879 book The Evolution of Man. It traces all life forms to the Monera, and places Man (labelled "Menschen") at the top of the tree. 
Haeckel's Stammbaum der Primaten (1860s)
In 1990, Carl Woese, Otto Kandler and Mark Wheelis proposed a "tree of life" consisting of three lines of descent for which they introduced the term domain as the highest rank of classification. They also suggested the terms bacteria, archaea and eukaryota for the three domains. 
The model of a tree is still considered valid for eukaryotic life forms. Trees have been proposed with either four   or two supergroups.  There does not yet appear to be a consensus; in a 2009 review article, Roger and Simpson conclude that "with the current pace of change in our understanding of the eukaryote tree of life, we should proceed with caution." 
In 2015, the first draft of the Open Tree of Life was published, in which information from nearly 500 previously published trees was combined into a single online database, free to browse and download.  Another database, TimeTree, helps biologists to evaluate phylogeny and divergence times. 
In 2016, a new tree of life, summarizing the evolution of all known life forms, was published, illustrating the latest genetic findings that the branches were mainly composed of bacteria. The new study incorporated over a thousand newly discovered bacteria and archaea.   
The prokaryotes (the two domains of bacteria and archaea) and certain animals such as bdelloid rotifers  have the ability to transfer genetic information between unrelated organisms through horizontal gene transfer. Recombination, gene loss, duplication, and gene creation are a few of the processes by which genes can be transferred within and between bacterial and archaeal species, causing variation that is not due to vertical transfer.    There is emerging evidence of horizontal gene transfer within the prokaryotes at the single and multicell level, so the tree of life does not explain the full complexity of the situation in the prokaryotes.