## ganeshie8 one year ago find the transformation matrix for reflection over line $$y=mx$$ in $$\mathbb{R}^2$$

1. ikram002p

this sounds trivial :\

2. zzr0ck3r
3. Empty

Now's a nice time to think of the eigenvectors of this matrix. They'll be all the vectors lying on the line y=mx and all the vectors on the line perpendicular to y=mx. To me this says, aha all reflections can be thought of in terms of these two orthogonal pairs of eigenvectors. So I can always just think of any arbitrary reflection matrix as doing 3 matrix transformations: Rotate it so the x and y axes line up, then reflect it by the simplest reflection across the x-axis, then rotate the vector back. $$R^{-1} D R \vec v = \vec v '$$ So you can see that R is the first rotation, D is the diagonal matrix representing the reflection, and R inverse is just rotating back. So here this very simple way of thinking geometrically can reveal something interesting about diagonalizing a matrix. Not only that, since reflection is its own self-inverse, the matrix $$R^{-1} D R$$ will also be its own self inverse, which is not really too surprising but a fun fact of similar matrices that is clearer from this perspective in an intuitive geometric sense. So a bit of fun to think about.

4. ganeshie8

that video has an interesting geometry way to construct the matrix using similar triangles and trigonometry! thnks @zzr0ck3r :)

5. ganeshie8

@Empty If I understand correctly, you're splitting the reflection transformation into $$3$$ steps : 1) rotate the entire $$xy$$ plane by an angle of$$-\arctan(m)$$ so that the line $$y=mx$$ aligns with the $$x$$ axis $\frac{1}{\sqrt{1+m^2}}\begin{bmatrix}1&m\\-m&1\end{bmatrix}$ 2) reflect the input vector over $$x$$ axis $\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ 3) rotate the xy plane by $$\arctan(m)$$ $\frac{1}{\sqrt{1+m^2}}\begin{bmatrix}1&-m\\m&1\end{bmatrix}$

6. Empty

Yeah! :D This is how I think with matrices very smoothly and easily. Try to think in terms of the actual picture. The matrices MUST follow because that's what they represent as long as you have an accurate image in your mind of what these things like "rotation" or "shear" actually mean. For instance, if you never saw a matrix before but were introduced to the idea of commutativity, you could fairly easily know without proof that for a matrix to represent rotation in the 2D plane, it would have to commute with other 2D rotation matrices, even though in general matrices don't commute. Why does this not need proof I claim? Because it would be absurd since it's essentially putting the cart before the horse. The rotation is what we want, and the act of rotation commutes, this is what we demand of our matrix. If matrices didn't satisfy this behavior, we would have thrown them away and found something better that does commute like we need! The numbers are simply details that follow for anyone who wishes to calculate exact values of a certain case for engineering perhaps. I think more fundamentally we should think of numbers (real, complex, quaternions) as really special cases of matrix and vector multiplications since all numbers can be really seen in a more general view as representing both matrices and vectors simultaneously.