Check out the matrix R in this html page:

```
http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node159.html
```

It say, the matrix was derived like this:

The reflection transformation can be decomposed for convenience into a translation to the origin, a rotation mapping the mirror into the XY plane, a scale of -1 in Z, the inverse of the rotation previously used, and a translation back to the mirror location.

Now to the the “mapping the mirror into the XY plane” part. I understand the new z axis in the mirror coordinate system is the normal of the mirror. But how about the x and y axes?