Tolkien's Middle-earth family trees contribute to the impression of depth and realism in the stories set in his fantasy world by showing that each character is rooted in history with a rich network of relationships. J. R. R. Tolkien included multiple family trees in both The Lord of the Rings and The Silmarillion; they are variously for Elves, Dwarves, Hobbits, and Men.
The family trees gave Tolkien, a philologist, a way of exploring and developing the etymologies and relationships of the names of his characters. They imply, too, the fascination of his Hobbit characters with their family history. A further function was to show how aspects of character derive from ancestry.
The appendices to The Lord of the Rings provide family trees for Dwarves, Hobbits, and Men. The Hobbit trees are introduced with the words "The names given in these Trees are only a selection from many." Their development is chronicled in The Peoples of Middle-earth; it records that the Boffin and Bolger family trees were typed up for inclusion in Appendix C but were dropped at the last moment, apparently for reasons of space.
The Silmarillion provides family trees for the Elves Finwë, father of Fëanor, and Olwë, ancestor of Galadriel and Lúthien; the Man Bëor the Old, ancestor of Beren, Hurin, and Turin; and of Hador, ancestor of Eärendil the mariner. In The Silmarillion, Tolkien described an extraordinarily complex set of family relationships, feuds, and migrations of family subgroups within the various lineages of Elves. The lengthy course of development of all these is detailed by Christopher Tolkien in Unfinished Tales, The Book of Lost Tales II, and The Lays of Beleriand. The family trees and resulting populations have been explored by Tom Loback in Mythlore.
Jason Fisher, in the J. R. R. Tolkien Encyclopedia, writes that Tolkien's family trees serve multiple functions. They define the ancestry of both heroes and villains, along with all their relationships, just as in the medieval Icelandic sagas which Tolkien studied carefully. In this way, Tolkien was placing the Middle-earth sagas in a definite tradition. Secondly, the family trees provide a powerful impression of depth, bringing "essential details, texture, and verisimilitude" to his secondary world. In The Two Towers, the Wizard Gandalf jokingly warns Théoden, King of Rohan, of the ways of Hobbits with family affairs:
Thirdly, the trees allowed him, as a philologist, to develop, explore, and play with the etymologies and relationships of the names of his characters, something that he much enjoyed. Fourthly, the family trees helped to guide him while writing to avoid mistakes in describing relationships. Fifthly, the Hobbit-style genealogies imitate the hobbitic fascination with family history; Tolkien maintained the framing fiction that The Lord of the Rings was, in fact, the Red Book of Westmarch written entirely by Hobbits. Tolkien says as much in the novel's prologue:
Yet another function was to show how different ancestries, and hence different aspects of character, come together in some of the characters. Bilbo Baggins, eponymous protagonist of The Hobbit, was born to a genteel Baggins and an adventurous Took, while his cousin (often familiarly described as his nephew) and heir Frodo was the child of a Baggins and a relatively outlandish Brandybuck. Finally, the trees mention which Hobbits had children and which did not, thus giving the impression that the story continues after the end of the book, reinforcing the impression of depth.
Fisher states that in The Silmarillion, the family trees work the same way, but the tales, told as ancient legends rather than in-the-moment action, are narrated from the points of view of Elves or sometimes of Men (Edain). Here the trees help with a different function, namely to visualise the splitting and mixing of family lines, mirroring the bitter family feuds among The Silmarillions Elves.
Malcolm Forbes, reviewing Catherine McIlwaine's exhibition of Tolkien's Middle-earth artefacts at the Bodleian Library, commented that "his realm of Middle-earth [is] the product of a fecund imagination, fierce intelligence and creative prowess. Few fantasy writers so meticulously map their kingdoms, or invent legends, family trees and even languages for their characters."
Dwayne Thorpe comments in Mythlore that family trees are one of the elements that Tolkien used to make Middle-earth seem real: