# verification for axis symmetry in 3d space a line passing through two points

In an orthonormal coordinate system $K=O \overrightarrow{e_1}\overrightarrow{e_2} \overrightarrow{e_3}$ I have to find an analytic representation of an axis symmetry with an axis g represented by two points $A(0,1,0)$ and $B(3,1,-4)$.

What I have so far:

I know that symmetry can be represented as a rotation with angle $\phi=180^o$ and I know the matrix of that. I guess I also have to represent it in a different coordinate system $O^*$ where the basis vector $\overrightarrow{O^*e_3^*}\equiv g_{AB}$.

So, $|\overrightarrow{e_3^*}|=1$, in that case $\overrightarrow{e_3^*}(\frac{3}{5}, 0, -\frac{4}{5}),\, \overrightarrow{e_2^*}(0,1,0),\, \overrightarrow{e_1^*}(-\frac{4}{5}, 0, -\frac{3}{5})$. From those three vrectors I form the matrix for changing of basis $T$, and it's transponse $T^{-1}=T^t$, I use the matrix for rotation with angle $\phi=180^o$ denoted $A^*$, and I represent the whole transformation in our original coordinate system as a matrix $A=T \circ A^*\circ T^{-1}$.

Is this correct? I have the feeling that the center of the coordinate system is changed and I don't know how to express that.

What you have in mind is correct. However, I describe below properties of axial symmetry that should simplify the process.

Suppose that $u$ is a unit vector of the axis. Then the axis symmetry $s_u$ around the axis is a linear transformation such that a vector belonging to the axis is fixed and a vector orthogonal to the axis is transformed into its opposite.

Now take any vector $x$, you can write $x=x_u +(x-x_u)$ where $x_u =\langle x,u\rangle u$ is the projection of $x$ onto the axis $u$ and $x-x_u$ is orthogonal to $u$ as

$$\langle x-x_u , u\rangle = \langle x -\langle x,u\rangle u, u\rangle = \langle x,u \rangle - \langle x,u\rangle \langle u,u \rangle =0$$

as $u$ is a unit vector.

$$s_u(x) = x_u -(x -x_u)= 2x_u -x = 2\langle x,u \rangle u -x \tag{E}$$ considering the observations of the second paragraph.

Now you can take $u = \frac{\vec{AB}}{\Vert AB \Vert} =(3/5,0,-4/5)$, write $x=(x_1,x_2,x_3)$ and use the equation $(E)$ to compute the analytical representation of $s_u$.