# Reflection

A reflection is an improper isometry of Euclidean space.

When used as an operator in the sandwich product, a unitized plane $$\mathbf g = g_x\mathbf e_{234} + g_y\mathbf e_{314} + g_z\mathbf e_{124} + g_w\mathbf e_{321}$$ is a specific kind of flector that performs a reflection through $$\mathbf g$$. The exact reflection calculations for points, lines, and planes are shown in the following table.

Type Reflection
Point

$$\mathbf p = p_x \mathbf e_1 + p_y \mathbf e_2 + p_z \mathbf e_3 + p_w \mathbf e_4$$

$$\begin{split}\mathbf g \mathbin{\unicode{x27C7}} \mathbf p \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{g}}} =\, &((2g_y^2 + 2g_z^2 - 1)p_x \,&-\, 2g_xg_yp_y \,&-\, 2g_zg_xp_z \,&-\, 2g_xg_wp_w)&\mathbf e_1 \\ +\, &((2g_z^2 + 2g_x^2 - 1)p_y \,&-\, 2g_yg_zp_z \,&-\, 2g_xg_yp_x \,&-\, 2g_yg_wp_w)&\mathbf e_2 \\ +\, &((2g_x^2 + 2g_y^2 - 1)p_z \,&-\, 2g_zg_xp_x \,&-\, 2g_yg_zp_y \,&-\, 2g_zg_wp_w)&\mathbf e_3 \\ +\, &p_w\mathbf e_4\end{split}$$
Line

$$\begin{split}\mathbf L =\, &v_x \mathbf e_{41} + v_y \mathbf e_{42} + v_z \mathbf e_{43} \\ +\, &m_x \mathbf e_{23} + m_y \mathbf e_{31} + m_z \mathbf e_{12}\end{split}$$

$$\begin{split}\mathbf g \mathbin{\unicode{x27C7}} \mathbf L \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{g}}} =\, &((1 - 2g_y^2 - 2g_z^2)v_x \,&-\, 2g_xg_yv_y \,&+\, 2g_zg_xv_z)&\mathbf e_{41} \\ +\, &((1 - 2g_z^2 - 2g_x^2)v_y \,&-\, 2g_yg_zv_z \,&+\, 2g_xg_yv_x)&\mathbf e_{42} \\ +\, &((1 - 2g_x^2 - 2g_y^2)v_z \,&-\, 2g_zg_xv_x \,&+\, 2g_yg_zv_y)&\mathbf e_{43} \\ +\, &((2g_y^2 + 2g_z^2 - 1)m_x \,&-\, 2g_xg_ym_y \,&-\, 2g_zg_xm_z \,&+\, 2g_wg_yv_z \,&-\, 2g_wg_zv_y)&\mathbf e_{23} \\ +\, &((2g_z^2 + 2g_x^2 - 1)m_y \,&-\, 2g_yg_zm_z \,&-\, 2g_xg_ym_x \,&+\, 2g_wg_zv_x \,&-\, 2g_wg_xv_z)&\mathbf e_{31} \\ +\, &((2g_x^2 + 2g_y^2 - 1)m_z \,&-\, 2g_zg_xm_x \,&-\, 2g_yg_zm_y \,&+\, 2g_wg_xv_y \,&-\, 2g_wg_yv_x)&\mathbf e_{12}\end{split}$$
Plane

$$\mathbf f = f_x \mathbf e_{234} + f_y \mathbf e_{314} + f_z \mathbf e_{124} + f_w \mathbf e_{321}$$

$$\begin{split}\mathbf g \mathbin{\unicode{x27C7}} \mathbf f \mathbin{\unicode{x27C7}} \smash{\mathbf{\underset{\Large\unicode{x7E}}{g}}} =\, &((1 - 2g_y^2 - 2g_z^2)f_x \,&+\, 2 g_xg_yf_y + 2 g_zg_xf_z)&\mathbf e_{234} \\ +\, &((1 - 2g_z^2 - 2g_x^2)f_y \,&+\, 2g_yg_zf_z + 2g_xg_yf_x)&\mathbf e_{314} \\ +\, &((1 - 2g_x^2 - 2g_y^2)f_z \,&+\, 2g_zg_xf_x + 2g_yg_zf_y)&\mathbf e_{124} \\ +\, &\rlap{(2g_xg_wf_x + 2g_yg_wf_y + 2g_zg_wf_z - f_w)\mathbf e_{321}}\end{split}$$