Reflect on y axis in 3D Matrix?
Sebastian Wright
I have a question saying "Define a 3D Matrix that performs a reflection in the y axis" but I don't know how to solve it.
So if we have a 2D matrix and we say 'reflection on the y axis' we mean that x becomes -x. So a point (x,y) will be (-x, y).
But what about in 3D? If we are reflecting on y, are both x and z negated?
I tried to look for solutions and found this website on which I can see it's talking about xy, xz and yz planes.
Does 'reflect on the y axis' mean the same thing as 'reflect against the xz plane'?
Thanks
$\endgroup$2 Answers
$\begingroup$When a question asks you to find a matrix representing a linear transformation $T$ that is only described geometrically, your task is to figure out how that $T$ transforms a basis for your domain.
Unfortunately I can't find a good image on Google Images to describe reflection through a line in $\Bbb R^3$ (and my pgfplots-fu is still pretty basic), but I'll try to describe what it means. Consider an arbitrary point in $\Bbb R^3$. Now connect that point to the $y$-axis by a line segment that is orthogonal to the $y$-axis. Extend that line segment past $y$ by the same length as the distance from the point to the $y$-axis. The far end of that line segment is then at the point that is the reflection of your point across the $y$-axis.
Let's see how this affects the standard basis $\{\hat x, \hat y, \hat z\}$. $T(\hat x)$ goes back along the $x$-axis, goes through the $y$-axis at the origin, and then to $-\hat x$. Thus $T(\hat x) = -\hat x$. Likewise $T(\hat z) = -\hat z$. $\hat y$ on the other hand is unaffected by this transformation -- it's its own reflection across the $y$-axis.
Thus, if $T(x) = Ax$ where $A$ is a $3\times 3$ matrix, then $$\begin{matrix}A \begin{bmatrix} 1 \\ 0 \\ 0\end{bmatrix} = \begin{bmatrix} -1 \\ 0 \\ 0\end{bmatrix}, & A \begin{bmatrix} 0 \\ 1 \\ 0\end{bmatrix} = \begin{bmatrix} 0 \\ 1 \\ 0\end{bmatrix}, & A \begin{bmatrix} 0 \\ 0 \\ 1\end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ -1\end{bmatrix}\end{matrix}$$
Therefore $$A = \begin{bmatrix} -1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1\end{bmatrix}$$
The difference between reflecting through a line vs a plane in $\Bbb R^3$ is comparable to reflecting through the origin vs a line in $\Bbb R^2$. Go back and look up the geometric properties of even and odd functions if you don't remember how these reflections work in $\Bbb R^2$ (note however that you can still reflect through the origin in $\Bbb R^3$).
Try to visualize each of these reflections in $\Bbb R^2$ and $\Bbb R^3$. Then consider how you think reflections would work in $\Bbb R^n$ for other values of $n$.
$\endgroup$ 5 $\begingroup$No, these mean two different things;
the reflection in the y-axis takes $(x,y,z)\to(-x,y,-z)$.
You can write down the matrix from this fact, and you can also get it
using $R=2P-I$, where $P$ is the matrix that projects each point onto the y-axis.
$\endgroup$