How a Mirror Works
A picture can be flipped four ways: left to right, top to bottom, or over either diagonal. All four turn a picture into its mirror image. Only one of them is what the mirror on your wall shows: Flip X, left and right swapped. Try all five on your own camera, then read why it is Flip X.
Picture
The video stays on your device. Nothing is recorded or sent.
Flip
Try it: raise your right hand
Start the camera, choose No flip and raise your right hand. On the screen the hand goes up on the left. That is the picture exactly as the camera took it, and it is how anyone facing you sees you. Now choose Flip X and raise the hand again: it goes up on the right, the same side as your real hand, just as it does in a bathroom mirror. Writing on your shirt now reads backwards, and so does a book held up to the camera.
Without a camera the demo picture does the same: it is a camera's view of someone raising their right hand, in the red glove. Look at the clock as well. In the camera's picture it says two o'clock; Flip X makes it read ten o'clock, which is why clocks in mirrors are so hard to read.
Video-call apps do this to your own preview. Your face is shown with Flip X, so moving to the left moves the picture to the left, like a mirror. The people you call get the picture without the flip, the way they would see you across a table.
Why it is Flip X that is the mirror
1. A mirror swaps front and back, not left and right
Every point in front of a flat mirror has its reflection the same distance behind it, straight across. A point that is higher stays higher, a point farther to the left stays farther to the left. The one thing that changes is the distance into the mirror: what was closest to the glass on your side is closest on the other side too, so the reflection faces back toward you. In coordinates with the mirror in the x–y plane, a point (x, y, z) is reflected to (x, y, −z). Front and back are swapped. Left and right are not.
2. A camera facing you is you, turned around
To face you, a camera (or a friend) has to stand turned around compared with you, and it turns around by spinning about a vertical axis, the way people turn on their feet. A half turn about a vertical axis swaps two things at once: front and back, and left and right. That is why your right hand is on the left of the camera's picture.
So the two pictures differ like this:
camera = front ↔ back + left ↔ right
mirror = camera + left ↔ right = Flip X of the camera's picture
Both pictures look straight along the line between you and the glass, so front and back are not in the picture at all; they are the direction you look along. What is left over is the left ↔ right swap. That is Flip X.
3. Why left and right, and not up and down?
Turning around flips the picture across the axis you turned about. Take a sheet of clear film with a letter on it and turn it over. Turn it like the page of a book, about a vertical axis, and the letter reads backwards: Flip X. Turn it like a wall calendar, about a horizontal axis, and the letter is upside down and backwards: Flip Y. Turn it about a diagonal and you get the diagonal flips. Try it:
The axis is drawn in red. A half turn about any line in the sheet shows the back of the sheet flipped across that line. The red dot is the right hand.
A mirror on a wall gives Flip X, not Flip Y, because the camera you compare it with stands upright and turned around about a vertical axis. People and cameras do not turn around by standing on their heads; gravity makes up and down special, so that axis is always the vertical one. Fix a camera upside down, facing you, and it has turned about a horizontal axis instead. Its picture then differs from the mirror by Flip Y.
Flip Y does show up in the world, in a mirror lying flat. Mountains reflected in a still lake hang upside down, because now the glass is horizontal and the swap of near and far is a swap of up and down. Your view of the mountain and of its reflection differ by Flip Y.
4. All four flips are mirror images, turned
Each flip is a reflection: it reverses handedness. A right hand becomes a left hand, the letter R faces the other way, a clockwise screw becomes an anticlockwise one. In the matrices this shows as a determinant of −1. Rotations keep handedness (determinant +1), and every flip is Flip X followed by a rotation:
| Flip | R | Matrix | Det | Turn the sheet about | Same as |
|---|
So Flip Y, and both diagonal flips, are not wrong mirrors. They are the same mirror image as Flip X, shown turned. Turn the screen upside down and Flip Y becomes Flip X; lay it on its side and a diagonal flip does. Of the four, Flip X is the only one that keeps up pointing up, and that is the one a wall mirror shows.
The matrices use maths axes: x to the right, y up, angles counted anticlockwise from the x axis. The 45° line runs from bottom left to top right (/), the 135° line from top left to bottom right (\).
5. Two flips make a turn: the mirror that does not reverse
Flip twice and handedness comes back: Flip X then Flip Y is a half turn, and any two of the flips together make a rotation. Mirrors can do this too. Put two mirrors on the wall at a right angle, a corner, and look into the corner: your face is reflected twice. That reflection is not reversed. Raise your right hand and the hand on the opposite side of the corner goes up, as if you were looking at someone facing you. It shows you as a camera does, as other people see you.