How can I make sure that each point of a Triangle was reflected across the line?

For example, for A and A'
Let:
R=(0,0) the reference point:
[tex]\begin{gathered} \text{Distance between A and R:} \\ d=\sqrt[]{(4-0)^2+(2-0)^2}=2\sqrt[]{5} \\ \text{Distance between A' and R} \\ d=\sqrt[]{(4-0)^2+(-2-0)^2}=2\sqrt[]{5} \end{gathered}[/tex]