0

Assume that I have a point and a line segment, all specified using rational coordinates. Can I compute the reflection of the point across the line segment using only rational numbers?

This previous answer seems to indicate "yes", but I wanted to ask explicitly.

1 Answers1

1

We write $(x,y,0)$ and $(x',y',0)$ for the two points pn the segment with rational coordinates as 3-vectors to find a perpendicular in the next paragraph.

A vector in the direction of the line segment is given by $v=(x-x', y-y',0)$. Now $v\times(0,0,1)=(y-y', x'-x,0) $ provides a perpendicular to the line of reflection which has rational entries.

We can switch back to 2-vectors from now on and relabel $v=(y-y',x'-x)$.

The Householder reflection $T=I_2-2\frac{v^\top}{|v|}\frac{v}{|v|}$ also has rational entries. (Can you see why? You need to find the reason this works even though $|v|$ may be irrational.)

This reflection reflects over the line through the origin parallel to the segment, and it maps rational coordinate points to rational coordinate points. Translating it by $(x,y)$, the map $p\mapsto (x,y)+T(p-(x,y))$ is the map you seek.

There are a lot of details to check: good luck.

rschwieb
  • 153,510