1. ## algebra step?

An online text explaining rotation of axes includes this step:

x = X cos $\theta$ - Y sin $\theta$
y = X sin $\theta$ + Y cos $\theta$

By solving Equations (above) for X and Y we obtain

X = x cos $\theta$ +y sin $\theta$
Y = -x sin $\theta$ + y cos $\theta$

How do they get from the upper equations to the lower ones? Thanks in advance.

2. Hello,

If you know a bit about matrices :

The first 2 equations can be written this way :

$\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}\c os\theta & -\sin\theta\\\sin\theta & \cos\theta\end{pmatrix}\begin{pmatrix}X\\Y\end{pma trix}$

So $\begin{pmatrix}X\\Y\end{pmatrix}=\begin{pmatrix}\c os\theta & -\sin\theta\\\sin\theta & \cos\theta\end{pmatrix}^{-1}\begin{pmatrix}x\\y\end{pmatrix}$

Recall how to find the inverse of a 2x2 matrix, recall that $\cos^2\theta+\sin^2\theta=1$ and you're done.