Let's just consider the lines in $\mathbb{R}^3$. For any line $l$, suppose it is determined by $(x_1:x_2:x_3)$. For any point $(a,b,c)$, after the rotation it is mapped to(as we can compute) $(a',b',c')=(2\lambda x_1-a,2\lambda x_2-b,2\lambda x_3-c)$, where $\lambda=\frac{ax_1+bx_2+cx_3}{x_1^2+x_2^2+x_3^2}$. I computed by using the condition that their middle point is on the line $(x_1:x_2:x_3)$, and $\overline{xx'}$ is orthogonal to the line $l$.
And we can of course compute the matrix of this transformation. But I have trouble checking it indeed satisfies the condition for rotation matrix $\det(A)=1, A^T=A^{-1}$.
I am wondering are their any more algebraic way of finding the matrix? Also, I wish someone could verify whether my answer is correct. Thanks!