But both planets orbit the sun on an ellipse. The earth ellipse is almost circular, so that the distance of the earth from the sun varies only by plus-minus two percent. The ellipse of Mars is elongated. Therefore, its distance from the sun may deviate by up to nine percent from its average solar distance.
In addition, there are two factors: Due to Einstein's theory of general relativity, the sun's closest points of the planets move around the sun. So the planet ellipses swing around the sun like hula-hoops. In addition, the other planets of our solar system are "tugging" at the ellipses with their gravity. This leads to a "pulsation" of the ellipse. The earth ellipse pulsates with a period of about 100, 000 years between a nearly circular shape and a more elliptical shape.
All this means that the smallest distance in the overtaking maneuver varies considerably. In the last opposition in 2001, the distance was about 67 million kilometers, in 1995, even 105 million kilometers. display
The shortest distance between Earth and Mars can be achieved if the two ellipses are aligned so that the sunniest point of the Earth ellipse is directly opposite the sunniest point of the Mars ellipse. That will be the case in about 700 years. During an opposition in 2729, the distance between Earth and Mars will be 55 million and 651 thousand kilometers.
An animation of the inner planets of the solar system can be found here. The changes of the ellipses are not taken into account.Axel Tilleman