In a certain photograph
you can see the flag waving. That's impossible in a
vacuum.

It's always amusing to hear assertions of motion based on the
evidence in a still picture.

It would seem that this question needs no rebuttal. But we should
clarify that the apparent waving "motion" in the still photos is the
wrinkles remaining from its packing. In earth gravity the weight of
the fabric itself is often enough let wrinkles "hang" out. But
because the flag was made from a very light nylon [Platoff93, note 10] which is even
lighter in lunar gravity, the force of the wrinkles wanting to stay
wrinkled overcomes the force of gravity for longer.

Here (Fig. 1) is an example of a flag that
appears to wave. It's worth belaboring a trivial point to emphasize
that observers will tend to "fill in the gaps" in their perception by
applying past experience. The still photo doesn't actually show
motion -- no still photo can. But the visible ripples cue our recall
of all the other flags we've seen where rippling is caused by wind.
And if we are not conscious of this extrapolation, we may strongly
convince ourselves that we have indeed "seen" the detail provided by
our memories.

This is why great care must be taken in interpreting Apollo
photos. We cannot allow our prejudices of the behavior of objects in
air and strong gravity to influence our interpretation of behavior on
the moon.

In the video coverage
you can see the flag waving. That's impossible in a
vacuum.

The simple answer is inertia. The Apollo flag assembly starts
with a telescoping tubular pole shoved vertically into the lunar soil.
But the resemblance to terrestrial flag arrangements stops there. On
earth we attach flags to the pole at the top and bottom corners. And
the same would work on the moon, except that the flag would hang
limply without ever being visible for what it was.

Fig. 1 - The flag assembly prior to packing. Note
the peculiar way the flag was folded. This produced a
distinct rumple in the free corner of the flag. (NASA:
S69-38748)

And so NASA designed a telescoping horizontal support that would hinge
to the top of the pole. The flag itself was a commercially available
nylon flag. A hem was sewn into the top edge into which the
horizontal crossbar could be slid. The astronaut deployed the flag by
driving the steel-tipped aluminum pole into the surface, then raising
the crossbar on its hinge until it locked into the horizontal
position. He could then extend the telescoping segment of the
crossbar to support the entire width of the flag.

The flag was held oustretched by the crossbar through the top hem.
The inner bottom corner was fastened to the pole. The outer bottom
corner is free to move. The astute reader will have recognized this
as a type of pendulum.

The astronauts said it was hard to drive the pole into the lunar
surface. [Ibid.] Apollo 11 had
no means of hammering it in. In later missions they reinforced the
top of the pole so that a geology hammer could be used to drive it.
During the process the flag pole was twisted in the fashion of a drill
bit to bore it into the denser layers. Twisting the pole would cause
the outer tip of the crossbar to describe an arc with a radius of
about five feet (1.5 meters). The free corner of the flag, suspended
from the tip, could whip back and forth.

In an atmosphere this motion would be impeded ("damped" in
engineering terms) by air resistance. But on the moon there is no
resistance from air to the pendulum motion of the flimsy fabric.

This process can be duplicated on earth. Slip the buckle of a
belt over one end of a yardstick (or meter stick). Hold the other end
of the stick and let the rest of the belt hang underneath it. Now
move the stick left and right as if the hand holding it were a pole
being twisted. Vary the speed. You will notice some complex pendulum
motions at the bottom tip of the belt that look uncannily like the
movements of the flag in the Apollo video. Why do we use a heavy
object like a belt? Because we need something that won't be greatly
affected by the air resistance on earth. In a vacuum the nylon fabric
will have some of the same properties as the belt.

In one video you can see
the flag move even though no astronaut is touching it. That could
only be caused by wind.

In these instances the astronaut has just let go of the flagpole.
The flagpole and its horizontal rod are bouncing, resonating in
response to the residual motion from the astronaut's manipulation. If
the wind is causing this motion then why are the flagpole and
horizontal rod moving (bouncing), but the flag itself doesn't move at
all? And why, in any of these cases, is there no secondary indication
of wind such as blowing insulation on the lunar module or dust raised
by the wind.

The flag is off-balance when the pole is perfectly vertical. It
is balanced when tilted back slightly. Frequently the crossbar will
rotate slightly just after being released by the astronaut, much as
the door of an off-balance refrigerator will find its own equilibrium
point.

Why didn't the
astronauts smooth out the wrinkles in the flag?

They thought it actually looked more familiar to have the flag
slightly rumpled. The Apollo 11 astronauts could not get the
telescoping crossbar to extend fully. On later missions the
astronauts intentionally didn't pull it all the way out.