A trilogy (from Greek τρι- tri-, "three" and -λογία -logia, "discourse") is a set of three works of art that are connected, and that can be seen either as a single work or as three individual works. They are commonly found in literature, film, or video games. Three-part works that are considered components of a larger work also exist, such as the triptych or the three-movement sonata, but they are not commonly referred to with the term "trilogy."
Most trilogies are works of fiction involving the same characters or setting, such as The Deptford Trilogy of novels by Robertson Davies and The Apu Trilogy of films by Satyajit Ray. Others are connected only by theme: for example, each film of Krzysztof Kieślowski's Three Colors trilogy explores one of the political ideals of the French Republic (liberty, equality, fraternity) and each novel in Paul Auster's The New York Trilogy uses formats from detective fiction to explore existential questions. Trilogies can also be connected in less obvious ways, such as The Nova Trilogy of novels by William S. Burroughs, each written using cut-up technique.
The term is less often applied to music, such as the Berlin Trilogy of David Bowie, linked together by their musical sound and lyrical themes, and the fact that part of them was recorded in Berlin, Germany.
The term is less often applied outside of art. One example is the "Marshall trilogy", a common term for three rulings written by U.S. Supreme Court Chief Justice John Marshall, from 1823 to 1832, concerning the legal status of native Americans under U.S. law. 
Trilogies date back to ancient times. In the Dionysia festivals of ancient Greece, for example, trilogies of plays were performed followed by a fourth satyr play. The Oresteia is the only surviving trilogy of these ancient Greek plays, originally performed at the festival in Athens in 458 BC. The three Theban plays, or Oedipus cycle, by Sophocles, originating in 5th century BC, is not a true example of a trilogy because the plays were written at separate times and with different themes/purposes.
In ancient India, an example of an early trilogy includes the epic Mahabharata, which originally consisted of three portions. Vyasa's original core portion of the epic was the Jaya. Vaisampayana's Bharata expanded on the story, with Vyasa's Jaya embedded within it. Ugrasrava eventually composed the Mahabharata, with both Vyasa's Jaya and Vaisampayana's Bharata embedded within the epic.
Richard Wagner's epic series of operas, Der Ring des Nibelungen, is sometimes referred to as a trilogy even though it consists of four works: Das Rheingold, Die Walküre, Siegfried, and Götterdämmerung. The first work, Das Rheingold, is shorter than the other three, running a bit over 3 hours, while all the others are over five. Performances of The Ring are often billed as three nights plus a prelude.
Technical changes in printing and film in the mid-to-late 20th century made the creation of trilogies more feasible, while the development of mass media and modern global distribution networks has made them more likely to be lucrative.
Adding works to an existing trilogy
Creators of trilogies may later add more works. In such a case, the original three works may or may not keep the title "trilogy".
The Foundation Series by Isaac Asimov originally consisted of Foundation, Foundation and Empire and Second Foundation and was considered a trilogy. Asimov wrote several more Foundation books and retroactively incorporated many of his other works into the continuity of the series. Despite this, the first three books are still considered a trilogy because they contain a story that is self-contained. Further complicating the matter, the Foundation series was originally eight short stories and novelettes written for science fiction magazines; its division into three books is more or less incidental.
The first three novels in The Hitchhiker's Guide to the Galaxy series were dubbed a trilogy, and even after he extended the series, author Douglas Adams continued to use the term for humorous effect - for example, calling Mostly Harmless "the fifth book in the increasingly inaccurately named trilogy."
The six Star Wars films are generally separated into two trilogies; the "original trilogy" (the three films released between 1977 and 1983) and the "prequel trilogy" (the three films released between 1999 and 2005, which take place before the original three films). A further three films are planned for the series beginning in 2015, thus potentially creating a trilogy of trilogies.
Unofficial or mistaken trilogies
Sometimes a trio of works is known as a trilogy because of its creator. For example, before Kevin Smith's films Clerks, Mallrats and Chasing Amy were often marketed as "The New Jersey Trilogy" because they had overlapping characters, events and locations. After the release of a fourth film, Dogma, the series is referred to as "the View Askewniverse".
Three works with similar themes from a creator may later come to be known as a trilogy, especially if produced one after the other. The Steven Spielberg films A.I.: Artificial Intelligence, Minority Report, and Catch Me If You Can are unofficially known as "The Running Man Trilogy", because each featured a main character escaping a pursuer. Terry Gilliam has dubbed his films Time Bandits, Brazil and The Adventures of Baron Munchausen "The Imagination Trilogy", in that each movie has to do with the imagination of humans in the three stages of life: child, man, older man. Another example is the Dollars Trilogy by Sergio Leone; no continuity between the three movies was intended by Leone, but American marketers advertised the Clint Eastwood character in each film as being the same "Man with No Name".
One of the most popular "trilogies" of fantasy books, The Lord of the Rings by J. R. R. Tolkien, is not a trilogy, though it is often referred to as such. Tolkien regarded it as a single work and divided it into a prologue, six books, and five appendices. Because of post-World War II paper shortages, it was originally published in three volumes. It is still most commonly sold as three volumes, but has also been published in one-volume and seven-volume editions (six books and the appendices).
Occasionally, more than three works are planned but never finished. The Gormenghast fantasy trilogy is a trilogy by default, as author Mervyn Peake planned to write more novels set in that fictional world until his health failed.
In contrast, some works that were originally intended to be trilogies have been reclassified due to subsequent additions. Christopher Paolini changed the name of his "The Inheritance Trilogy" to The Inheritance Cycle when he wrote a fourth book.
In some cases, a work is retroactively named a trilogy instead of having been designed as such by the authors, particularly if it is a story arc of a continuously running series such a comic book or television show. This might be due to a vaguely recurring or coincidental theme in each installment. One example is issues 48, 49, and 50 of the original Fantastic Four comic book which are notable for introducing the characters of Galactus and Silver Surfer. These are now commonly known as the Galactus Trilogy although the term wasn't used in the original issues.
In the modern era of home video, story arcs from a long-running television series might be packaged as a trilogy boxset even if they weren't presented as such originally.The so-called E-Space Trilogy of Doctor Who includes the stories Full Circle, State of Decay, and Warriors Gate, consecutive stories set in E-Space.
Other numbered series
Words to describe sets of another number of works of art other than three are sometimes created by following the Greek etymology of "trilogy". Using the Greek numerical prefixes, these would be as follows for series with between two and ten entries:
|Number in series||Word (Greek)||Word (variation)|
|2||No equivalent||"Duology" (formed by mixing Ancient Greek/Latin (duo, "two") with Ancient Greek λόγος (logos, "speech", "account", "story")) has been used in some pairs of genre fiction novels.|
|4||Tetralogy||"Quadrilogy" (formed by mixing Latin (quad, "four") with Ancient Greek λόγος (logos, "speech", "account", "story")) has been used to describe certain film series.|
|Look up trilogy in Wiktionary, the free dictionary.|