What is the transformation matrix that I multiply a point by if I want to reflect that point across a line that goes through the origin in terms of the angle between the line and the x-axis?
In other words, $$y = mx$$
$\theta$ is the angle between the $x$-axis and the line.
The position vector $P=\begin{bmatrix}a\\b\\\end{bmatrix}$ is a point on the same plane as the line.
The vector $P'$ is $P$ reflected across $y=mx$.
What matrix do I multiply $P$ by to get $P'$, in terms of $\theta$?
I've looked online and found $$\begin{bmatrix} \cos(2\theta) & \sin(2\theta) \\ \sin(2\theta) & -\cos(2\theta) \\ \end{bmatrix} $$but I tested it and it doesn't work for me.
Also, examples with the vector $$\begin{bmatrix}2\\1\\\end{bmatrix}$$ and the line $y = \frac 43x$ would help to stay consistent with my tests.