Rotation of functions without using matrices

81 Views Asked by At

I was reading a Linear Algebra book when I stumbled upon this relation

$$ \begin{bmatrix} x'\\ y' \end{bmatrix} = \begin{bmatrix} \cos \alpha & -\sin \alpha\\ \sin \alpha & \cos \alpha \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix} $$

Which claims rotating a Cartesian coordinate ($x$, $y$) into a point that is rotated $\alpha$ degrees counter-clockwise around the origin to ($x'$, $y'$).

Now I wanted to prove how this is possible so I thought about finding such a relation myself, I did my proofs assuming ($x$, $y$) is in the first quadrant, so I arrived to the following relations

$$ x^2+y^2=x'^2+y'^2 $$

$$ \arctan{\frac{y'}{x'}}=\alpha+\arctan{\frac{y}{x}} $$

Then using the tangent double addition formula I $\tan$-ed the second equation into

$$ \frac{y'}{x'}=\frac{\tan{\alpha} + \frac{y}{x}}{1 - \tan{\alpha} ~\frac{y}{x}}=z $$

At last dividing the first equation by $x'^2$ and solving for $x'$ and $y'$ in terms of $x$, $y$

$$ \frac{x^2 + y^2}{x'^2} = 1 + z^2 $$

$$ x' = \sqrt{\frac{x^2 + y^2}{1+z^2}} $$

$$ y' = \frac{y'}{x'} x' = z x' $$

Although I was happy that my derived formulas work, I have hard time extending my formulas to work correctly in all ranges of $\alpha$ and comprehending how could I arrive at the nice looking matrix form, or the matrix multiplication form I guess.

Here is my formulas neatly written down in Desmos, the issue is when the point to be transformed is in second or fourth quadrant (third quadrant worked like a charm because $\arctan{\frac{y}{x}}$ would yield negative value), where the relation

$$ \arctan{\frac{y'}{x'}}=\alpha+\arctan{\frac{y}{x}} $$

Is broken and need to be corrected to

$$ \arctan{\frac{y}{x}}=\alpha+\arctan{\frac{y'}{x'}} ~ , ~ \arctan{\frac{y'}{x'}}=-\alpha+\arctan{\frac{y}{x}} $$

How can I do this correction? Or what am I missing?

I have of course failed to find that on my own and decided to see online how such a relation is proved, but all what I can find is only one way that uses sines and cosines addition formulae and to be honest it elegantly proves it but, I would like to know what is wrong in my approach using arctangents...

Thanks.

1

There are 1 best solutions below

0
On

Perhaps an easier way to see this is to let $x=r \cos \theta, y = r \sin \theta$, with $r^2=x^2+y^2$. Then the rotated points are $x'=r \cos (\alpha+\theta), y = r \sin (\alpha+\theta)$.

Expanding $x'= (\cos \alpha) r \cos \theta - (\sin \alpha) r \sin \theta = (\cos \alpha) x + (-\sin \alpha) y$, and in a similar fashion, we have $y'= (\sin\alpha) x + (\cos \alpha) y$.