[Math] Reflection across the line y = x in 3 Dimensions

linear algebramatrices

The question asks, "What is the matrix for the reflection across the line y = x in 3 Dimensions?"

I know the matrix for the reflection across the line y = x in 2 Dimensions is:
$$
\begin{bmatrix}
0 & 1 \\
1 & 0 \\
\end{bmatrix}
$$

I am not sure how to find the matrix for the reflection in 3 Dimensions. Is this correct?

$$
\begin{bmatrix}
0 & 1 & 0\\
1 & 0 & 0\\
0 & 0 & 1\\
\end{bmatrix}
$$

Thanks.

Best Answer

It is $$ \begin{bmatrix} 0 & 1 & 0\\ 1 & 0 & 0\\ 0 & 0 & -1\\ \end{bmatrix} $$

We need to send $z$ to $-z$.