Linearity of Certain Reflections in $\Bbb R^n$ Let $f: \mathbb{R^n} \rightarrow \mathbb{R^n}$ be a reflection about a hyperplane passing through $\vec 0$. Is $f$ always a linear transformation? If so, how can the matrix of the reflection be determined based what is known about the hyperplane?
 A: Let's do the general case directly. 
Suppose the normal direction of this hyperplane is $\mathbf{a} = (a_1, a_2, \ldots, a_n)^T \neq \mathbf{0}$. Since the hyperplane passes through the origin, it has the representation:
$$P: \quad a_1 x_1 + a_2 x_2 + \cdots a_n x_n = 0.$$
Given a point $\mathbf{z} = (z_1, z_2, \ldots, z_n)^T \in \mathbb{R}^n$, it's reflection $\mathbf{z'} = (z_1', z_2', \ldots, z_n')^T$ should satisfy:
\begin{align*}
& \frac{1}{2}(\mathbf{z} + \mathbf{z'}) \in P, \tag{1} \\
& \mathbf{z'} - \mathbf{z} \parallel \mathbf{a}. \tag{2}
\end{align*}
By $(2)$, there exists a constant $k$ such that 
$$z_i' = z_i + ka_i, \; i = 1, 2, \ldots, n. \tag{3}$$
Substitute $(3)$ into $(1)$ gives
$$\sum_{i = 1}^n a_i\left(\frac{2z_i + ka_i}{2}\right) = 0.$$
Solve this for $k$, we have
$$k = -\frac{2\mathbf{a}^T\mathbf{z}}{\mathbf{a}^T\mathbf{a}}.$$
Therefore, use $(3)$ again:
$$\mathbf{z'} = \mathbf{z} - \frac{2\mathbf{a}^T\mathbf{z}}{\mathbf{a}^T\mathbf{a}}\mathbf{a} = \left(I - \frac{2\mathbf{a}\mathbf{a}^T}{\mathbf{a}^T\mathbf{a}}\right)\mathbf{z}.$$
Thus the reflection is a linear transformation, the transformation matrix is given by $I - \frac{2\mathbf{a}\mathbf{a}^T}{\mathbf{a}^T\mathbf{a}}$.
