Depictions of the planet
Mars, the fourth planet from the Sun, has appeared as a setting in works of fiction since at least the mid-1600s. Trends in the planet's portrayal have largely been influenced by advances in planetary science. It became the most popular celestial object in fiction in the late 1800s, when it became clear that there was no life on the Moon. The predominant genre depicting Mars at the time was utopian fiction. Around the same time, the mistaken belief that there are canals on Mars emerged and made its way into fiction, popularized by Percival Lowell's speculations of an ancient civilization having constructed them. "The War of the Worlds", H. G. Wells's novel about an alien invasion of Earth by sinister Martians, was published in 1897 and went on to have a major influence on the science fiction genre.
Life on Mars appeared frequently in fiction throughout the first half of the 1900s. Apart from enlightened as in the utopian works from the turn of the century, or evil as in the works inspired by Wells, intelligent and human-like Martians began to be depicted as decadent, a portrayal that was popularized by Edgar Rice Burroughs in the "Barsoom" series and adopted by Leigh Brackett among others. More exotic lifeforms appeared in stories like Stanley G. Weinbaum's "A Martian Odyssey".
The theme of colonizing Mars replaced stories about native inhabitants of the planet in the second half of the 1900s following emerging evidence of the planet being inhospitable to life, eventually confirmed by data from Mars exploration probes. A significant minority of works persisted in portraying Mars in a nostalgic way that was by then scientifically outdated, including Ray Bradbury's "The Martian Chronicles".
Terraforming Mars to enable human habitation has been another major theme, especially in the final quarter of the century, the most prominent example being Kim Stanley Robinson's "Mars" trilogy. Stories of the first human mission to Mars appeared throughout the 1990s in response to the Space Exploration Initiative, and near-future exploration and settlement became increasingly common themes following the launches of other Mars exploration probes in the latter half of the decade. In the year 2000, science fiction scholar Gary Westfahl estimated the total number of works of fiction dealing with Mars up to that point to exceed five thousand, and the planet has continued to make frequent appearances across several genres and forms of media since. In contrast, the moons of Mars—Phobos and Deimos—have made only sporadic appearances in fiction.
Early depictions.
Before the 1800s, Mars did not get much attention in fiction writing as a primary setting, though it did appear in some stories visiting multiple locations in the Solar System. The first fictional tour of the planets, the 1656 work "Itinerarium exstaticum" by Athanasius Kircher, portrays Mars as a volcanic wasteland. It also appears briefly in the 1686 work "Entretiens sur la pluralité des mondes" ("Conversations on the Plurality of Worlds") by Bernard Le Bovier de Fontenelle but is largely dismissed as uninteresting due to its presumed similarity to Earth. Mars is home to spirits in several works of the mid-1700s. In the anonymously published 1755 work "A Voyage to the World in the Centre of the Earth", it is a heavenly place where, among others, Alexander the Great enjoys a second life. In the 1758 work "De Telluribus in Mundo Nostro Solari" ("Concerning the Earths in Our Solar System") by Emanuel Swedenborg, the planet is inhabited by beings characterized by honesty and moral virtue. In the 1765 novel "Voyage de Milord Céton dans les sept planètes" ("The Voyages of Lord Seaton to the Seven Planets") by Marie-Anne de Roumier-Robert, reincarnated soldiers roam a war-torn landscape. It later appeared alongside the other planets throughout the 1800s. In the anonymously published 1839 novel "A Fantastical Excursion into the Planets", it is divided between the Roman gods Mars and Vulcan. In the anonymously published 1873 novel "A Narrative of the Travels and Adventures of Paul Aermont among the Planets", it is culturally rather similar to Earth—unlike the other planets. In the 1883 novel "Aleriel, or A Voyage to Other Worlds" by W. S. Lach-Szyrma, a visitor from Venus relates the details of Martian society to Earthlings. The first work of science fiction set primarily on Mars was the 1880 novel "Across the Zodiac" by Percy Greg.
Mars became the most popular extraterrestrial location in fiction in the late 1800s as it became clear that the Moon was devoid of life. A recurring theme in this time period was that of reincarnation on Mars, reflecting an upswing in interest in the paranormal in general and in relation to Mars in particular. Humans are reborn on Mars in the 1889 novel "Uranie" by Camille Flammarion as a form of afterlife, the 1896 novel "Daybreak: The Story of an Old World" by James Cowan depicts Jesus reincarnated there, and the protagonist of the 1903 novel "The Certainty of a Future Life in Mars" by Louis Pope Gratacap receives a message in Morse code from his deceased father on Mars. Other supernatural phenomena include telepathy in Greg's "Across the Zodiac" and precognition in the 1886 short story "The Blindman's World" by Edward Bellamy. 
Several recurring tropes were introduced during this time. One of them is Mars having a different local name such as Glintan in the 1889 novel "Mr. Stranger's Sealed Packet" by Hugh MacColl, Oron in the 1892 novel "Messages from Mars, By Aid of the Telescope Plant" by Robert D. Braine, and Barsoom in the 1912 novel "A Princess of Mars" by Edgar Rice Burroughs. This carried on in later works such as the 1938 novel "Out of the Silent Planet" by C. S. Lewis, which calls the planet Malacandra. Several stories also depict Martians speaking Earth languages and provide explanations of varying levels of preposterousness. In the 1899 novel "Pharaoh's Broker" by Ellsworth Douglass, Martians speak Hebrew as Mars goes through the same historical phases as Earth with a delay of a few thousand years, here corresponding to the captivity of the Israelites in Biblical Egypt. In the 1901 novel "A Honeymoon in Space" by George Griffith, they speak English because they acknowledge it as the "most convenient" language of all. In the 1920 novel "A Trip to Mars" by Marcianus Rossi, the Martians speak Latin as a result of having been taught the language by a Roman who was flung into space by the eruption of Mount Vesuvius in the year 79. Martians were often portrayed as existing within a racial hierarchy: the 1894 novel "Journey to Mars" by Gustavus W. Pope features Martians with different skin colours (red, blue, and yellow) subject to strict anti-miscegenation laws, Rossi's "A Trip to Mars" sees one portion of the Martian population described as "our inferior race, the same as your terrestrian negroes", and Burroughs's "Barsoom" series has red, green, yellow, and black Martians, a white race—responsible for the previous advanced civilization on Mars—having become extinct.
Means of travel.
The question of how humans would get to Mars was addressed in several ways: when not travelling there via spaceship as in the 1911 novel ' by Mark Wicks, they might use a flying carpet as in the 1905 novel ' by Edwin Lester Arnold, a balloon as in "A Narrative of the Travels and Adventures of Paul Aermont among the Planets", or an "aeroplane" as in the 1893 novel "Unveiling a Parallel: A Romance" by Alice Ilgenfritz Jones and Ella Robinson Merchant (writing jointly as "Two Women of the West"). They might also visit in a dream as in the 1899 play "A Message from Mars" by Richard Ganthony, teleport via astral projection as in Burroughs's "A Princess of Mars", or use a long-range communication device while staying on Earth as in Braine's "Messages from Mars, By Aid of the Telescope Plant" and the 1894 novel "W nieznane światy" ("To the Unknown Worlds") by Polish science fiction writer Władysław Umiński. Anti-gravity is employed in several works including Greg's "Across the Zodiac", MacColl's "Mr. Stranger's Sealed Packet", and the 1890 novel "A Plunge into Space" by Robert Cromie. Occasionally, the method of transport is not addressed at all. Some stories take the opposite approach of having Martians come to Earth; examples include the 1891 novel "" by Thomas Blot (pseudonym of William Simpson) and the 1893 novel "A Cityless and Countryless World" by Henry Olerich.
Canals.
 ;templatestyles src="Template:Quote_box/styles.css" / ;
A clement twilight zone on a synchronously rotating Mercury, a swamp-and-jungle Venus, and a canal-infested Mars, while all classic science-fiction devices, are all, in fact, based upon earlier misapprehensions by planetary scientists. 
Carl Sagan, 1978 
During the opposition of Mars in 1877, Italian astronomer Giovanni Schiaparelli announced the discovery of linear structures he dubbed (literally "channels", but widely translated as "canals") on the Martian surface. These were generally interpreted—by those who accepted their disputed existence—as waterways, and they made their earliest appearance in fiction in the anonymously published 1883 novel "Politics and Life in Mars", where the Martians live in the water. Schiaparelli's observations, and perhaps the translation of as "canals" rather than "channels", inspired Percival Lowell to speculate that these were artificial constructs and write a series of non-fiction books—"Mars" in 1895, "Mars and Its Canals" in 1906, and "Mars as the Abode of Life" in 1908—popularizing the idea. Lowell posited that Mars was home to an ancient and advanced but dying or already dead Martian civilization who had constructed these vast canals for irrigation to survive on an increasingly arid planet, and this became an enduring vision of Mars that influenced writers across several decades. Science fiction scholar Gary Westfahl, drawing from the catalogue of early science fiction works compiled by E. F. Bleiler and Richard Bleiler in the reference works ' from 1990 and ' from 1998, concludes that Lowell thus "effectively set the boundaries for subsequent narratives about an inhabited Mars".
Canals became a feature of romantic portrayals of Mars such as Burroughs's "Barsoom" series. Early works that did not depict any waterways on Mars typically explained the appearance of straight lines on the surface in some other way, such as simooms or large tracts of vegetation. Although they quickly fell out of favour as a serious scientific theory, largely as a result of higher-quality telescopic observations by astronomers such as E. M. Antoniadi failing to detect them, canals continued to make sporadic appearances in fiction for a while in works such as the 1936 novel "Planet Plane" by John Wyndham, the 1938 novel "Out of the Silent Planet" by C. S. Lewis, and the 1949 novel "Red Planet" by Robert A. Heinlein. Said Lewis in response to criticism from biologist J. B. S. Haldane, "The canals in Mars are there not because I believe in them but because they are part of the popular tradition." Eventually, the flyby of Mars by Mariner 4 in 1965 conclusively determined that the canals were mere optical illusions.
Utopias.
Because early versions of the nebular hypothesis of Solar System formation held that the planets were formed sequentially starting at the outermost planets, some authors envisioned Mars as an older and more mature world than the Earth, and it became the setting for many utopian works of fiction. This genre made up the majority of stories about Mars in the late 1800s and continued to be represented through the early 1900s. The earliest of these works was the 1880 novel "Across the Zodiac" by Percy Greg. The 1887 novel "" by William James Roe portrays a Martian society where everyone ages backwards. The 1890 novel "A Plunge into Space" by Robert Cromie depicts a society that is so advanced that life there has become dull and, as a result, the humans who visit succumb to boredom and leave ahead of schedule—to the approval of the Martians, who have come to view them as a corrupting influence. The 1892 novel "Messages from Mars, By Aid of the Telescope Plant" by Robert D. Braine is unusual in portraying a completely rural Martian utopia without any cities. An early work of feminist science fiction, Jones's and Merchant's 1893 novel "Unveiling a Parallel: A Romance", depicts a man from Earth visiting two egalitarian societies on Mars: one where women have adopted male vices and one where equality has brought out everyone's best qualities. The 1897 novel "Auf zwei Planeten" ("Two Planets") by German science