This is a question from my exam that I just cannot figure out how to do it. Thank you for helping me in advance. I will try to write it in here but it will be easier to understand using the image I added to this thread:
Show that for normal vector $n = \left[\begin{smallmatrix}a\\b\\c\end{smallmatrix}\right]$ using the formula $f_n(x) = x-2\left(\frac{x\cdot n}{n\cdot n}n\right)$ leads to the following matrix:
$$\left[\begin{smallmatrix}
-a^2+b^2+n3^2&-2ab&-2ac\\
-2ba&a^2-b^2+c^2&-2bc\\
-2ca&-2cb&a^2+b^2-c^2\end{smallmatrix}\right]$$
You only have to compute $f_n(1,0,0)$, $f_n(0,1,0)$ and $f_n(0,0,1)$ and express the results in columns. For example $$ f_n(1,0,0)=(1,0,0)-\frac{2 n_1}{n_1^2+n_2^2+n_3^2}(n_1,n_2,n_3)= $$ $$ =\frac{1}{n_1^2+n_2^2+n_3^2}(-n_1^2+n_2^2+n_3^2,-2n_1n_2,-2n_1 n_3) $$ which is the first column of your matrix.