# Reflecting a point by a line in $\mathbb R^3$

I would like to know if it's possible, given the vector equation of a line and the coordinates of a point, whether it's possible to reflect the point by the line.

-
Yes. I'm not sure what tools you have at your disposal but it goes something like this: If the point is in the line, then its reflection is the point itself. If the point isn't in the line, just take the line perpendicular to the given line which intersects the point. The reflection will be the only OTHER point on the perpendicular line which is at the same distance to the initial line as the first point is. –  Git Gud Jan 18 '13 at 16:58
You might also use this. –  David Mitra Jan 18 '13 at 17:02
The terminology is slightly ironic in that "reflecting" a point by a line in $\mathbb{R}^3$ is actually a half-full rotation of $\mathbb{R}^3$ around that line (axis). –  hardmath Jan 18 '13 at 17:20

Yes, if by reflect you mean to draw a perpendicular from the point to the line and continue it the same distance on the other side. If your line is $(p_x,p_y,p_z)+t(q_x,q_y,q_z)$ (is this what you mean by vector equation?) and the point is $(r_x,r_y,r_z)$ the point on the line where the perpendicular hits can be found by the condition that the dot product with the direction vector is zero. We want to find $t$ such that $r_x(p_x+tq_x)+r_y(p_y+tq_y)+r_z(p_z+tq_z)=0$. This is a linear equation that can be solved $t=-\frac {\vec r \cdot \vec p}{\vec r \cdot \vec q}$ The perpendicular point is then point is then $\vec s=\vec p+t \vec q$ and the reflected point is then $2\vec s-\vec r$.

-

In general, if $r(w)$ is a reflection of a point through a line/plane/$n$-plane, then $w_0=\frac{w+r(w)}{2}$ is a point on the line/plane/$n$-plane nearest to $w$.

So if you can find that point, $w_0$, then you can compute $r(w)=2w_0-w$.

If the line is through $0$, then you can write the line as $\{tv: t\in\mathbb R\}$ for some vector $v$ with $|v|=1$.

Given any vector $w$, $w_0 = (w\cdot v)v$. This is because $w\cdot v$ is $|w|\cos \theta$ where $\theta$ is the angle between $w$ and $v$ and thus the triangle defined by $0,w_0,w$ is a right triangle, and therefore this is the $w_0$ we are looking for.

So the total result is $r(w)=2(w\cdot v)v - w$.

More general, if the line is $\{v_0+tv_1:t\in\mathbb R\}$ where $|v_1|=1$, then we translate the point and line by $-v_0$, then reflect through the new line (which is now through zero) with the above formula, then translate back by $+v_0$.

That is: $$2((w-v_0)\cdot v_1)v_1 - (w-v_0) + v_0 = 2(w\cdot v_1 - v_0\cdot v_1)v_1 -w + 2v_0$$

-