A Mars flyby is a movement of spacecraft passing in the vicinity of the planet Mars, but not entering orbit or landing on it. Unmanned space probes have used this method to collect data on Mars, as opposed to orbiting or landing. A spacecraft designed for a flyby is also known as a "flyby bus" or "flyby spacecraft".
One application of a Mars flyby is for a human mission, where after landing and staying on the surface for some time the ascent stage has a space rendezvous with another, unmanned spacecraft, that was launched separately from Earth, flying by. This would mean the ascent stage of the lander to reach the speed necessary equal to that of the spacecraft flying by, but the resources needed for Earth return would not have to enter or leave Mars orbit.
The spacecraft they live in on the journey to Mars does the flyby, but the crew separates and goes into a lander. The Excursion module's ascent stage must rejoin the main spacecraft before it gets too far away. An advantage is that the resources needed for Earth return don't have to enter and leave Mars orbit, but the ascent stage has to perform space rendezvous in solar orbit and the time on Mars is constrained by the need to this. Mars cyclers orbit the Sun in such a way as to pass by Mars and the Earth on regular intervals, performing Mars flybys on regular intervals. The crews would live on the stations during the interplanetary voyages. The concept for Flyby Excursion Landing Module is that a lander and flyby would separate in solar orbit, the lander would accelerate to get to Mars first, then land on Mars meanwhile the other segment does a Mars flyby, then the lander takes off and rendezvous with the flyby segment transferring the crew over. (see also Mars Excursion Module (MEM))
In July 1965, Mariner 4 achieved a flyby of Mars with a return of data, providing the public and scientists with dramatically closer images of Mars. During the flyby Mariner 4 took 21 pictures amounting to about 1% of the surface of Mars. Mars was not globally mapped until the Mariner 9 orbiter, which over the course of 1972 to 1973 took thousands of images up to 100m a pixel. Observations from optical ground-based Earth telescopes have to peer through the atmosphere which blurred images, typically limiting them to resolving features about 300 kilometers (190 mi) across even when Earth and Mars are closest.
In October 1999, Deep Space 1 made observations of Mars after its flyby of asteroid Braille. Although this was a very distant flyby it did succeed in taking multiple infrared spectra with its MICAS instrument of the planet.
In 2018, Mars Cube One (MarCO), two flyby CubeSats to relay communication from InSight lander during its EDL were launched towards Mars with the cruise stage. Both MarCOs reached Mars and successfully relayed data during the entry, descent, and landing phase of Insight on November 26, 2018.