Is there a general matrix to reflect about the line $y=mx+c$?

2.3k Views Asked by At

I have been looking into matrix transformations and found the following matrix to reflect about the line $y=(\tan\theta)x$.

$$R = \begin{bmatrix} \cos(2\theta)& \sin(2\theta)\\ \sin(2\theta)& -\cos(2\theta)\\ \end{bmatrix}$$

However, is there a general matrix to reflect about the line $y=mx+c$?

2

There are 2 best solutions below

0
On

Matrices use for linear transformation. Any linear transformation keep the origin fixed. So only the reflection in lines that pass the origin make linear transformations and has matrix representation. Therefore $c$ must be $0$ and $y=mx$. Hence just set $m=\tan\theta$ to get answer.

0
On

Well, yes and no. As has been pointed out elsewhere, $2\times2$ matrices can only represent linear transformations of the plane, which among other things leave the origin fixed. If $c\ne0$, a reflection in the line $y=x\tan\theta+c$ maps the origin to some other point, so this transformation isn’t linear. If you want to stick strictly to two-dimensional space, then you’ll need to pick some point $\mathbf p$ on the line and translate so that the line you’re reflecting in does pass through the origin, so that the transformation is $\mathbf x\mapsto \mathbf p + R(\mathbf x-\mathbf p)$, with $R$ the matrix in your question.

There is, however, a way to embed the plane into three-dimensional space so that such transformations can be represented directly by a $3\times3$ matrix. I won’t go into too much detail here, but the idea is to identify the two-dimensional space $\mathbb R^2$ with the plane $z=1$ in $\mathbb R^3$. Each point on this plane corresponds to a unique line through the origin in $\mathbb R^3$ and, given a line through the origin that’s not parallel to the $z=1$ plane, we can identify it with a unique point in $\mathbb R^2$ by finding its intersection with that plane. (Lines parallel to $z=1$ also have an important interpretation, but it’s not really relevant here.)

Having done this, we can then identify point transformations of $\mathbb R^2$ with transformations of lines through the origin in $\mathbb R^3$. If you draw some pictures and do a bit of simple algebra, you should be able to convince yourself that reflection in $y=x\tan\theta+c$ in $\mathbb R^2$ corresponds to reflection in the plane $x\tan\theta-y+cz=0$ in $\mathbb R^3$. (This equation can be obtained directly by homogenizing the equation of the line.) This plane passes through the origin, so the reflection is a linear transformation of $\mathbb R^3$, and has a representation as a $3\times3$ matrix.

If you want to learn more about this, one starting point is the Wikipedia page for Homogeneous Coordinates.