# The expression of $f(x,y)$ explicitly

Consider the function $f : \mathbb{R^2} \rightarrow \mathbb{R^2}$ that associates to each vector $(x,y)$ the vector $f(x,y)$ obtained from a counterclockwise rotation of $\theta=30^{\circ}$ of the vector $(x,y)$.

Write the expressions of $f(x,y)$ explicitly.

How can I prove ? I don't know how to write this expression.

-
Do you mean $f:\mathbb{R}^2\to \mathbb{R}^2$? – Sigur Jan 21 '13 at 12:43
yes, of course sorry – Iuli Jan 21 '13 at 12:43
Take a look here en.wikipedia.org/wiki/Rotation_matrix#In_two_dimensions – k1next Jan 21 '13 at 12:45
– Sigur Jan 21 '13 at 12:46
@Sigur we link to the same article, except that I specified the 2D case ;) – k1next Jan 21 '13 at 13:01

Here are two ways, with the second a bit more advanced than the first.

1. Notice that rotating the vector doesn't change its length, so we may assume (at least at first) that it has length $1$. It joins $0$ to a point on the unit circle, so you can write it as $(x,y)=(\cos\alpha,\sin\alpha)$ for some angle alpha. The image is $f(x,y)=(\cos(\alpha+\theta),\sin(\alpha+\theta))$. By using some identities for the sine and cosine, you find that $$\cos(\alpha+\theta)= \cos\alpha\cos\theta-\sin\alpha\sin\theta= x\cos\theta-y\sin\theta\\ \sin(\alpha+\theta)= \cos\alpha\sin\theta+\sin\alpha\cos\theta= x\sin\theta+y\cos\theta,$$ so that gives you $$f(x,y) = (x\cos\theta-y\sin\theta, x\sin\theta+y\cos\theta)$$ for a vector $(x,y)$ of length $1$. If it has another length $\ell$, then you can apply the above formula to the length $1$ vector $(x',y')=(x/\ell,y/\ell)$, and then multiply the result by $\ell$. That gives you the exact same formula for $f(x,y)$.

2. If you know a bit of linear algebra, you can see that $f$ is a linear map, so you only need to know where it sends the basis vectors $e_1=(1,0)$ and $e_2=(0,1)$. Again, if you draw those two vectors on the unit circle, you'll that $f(e_1)=(\cos\theta,\sin\theta)$ and $f(e_2)=(-\sin\theta,\cos\theta)$, so that \begin{align} f(x,y)&=f(xe_1+ye_2)\\ &= xf(e_1)+yf(e_2)\\ &= x(\cos\theta,\sin\theta) + y(-\sin\theta,\cos\theta)\\ &= (x\cos\theta-y\sin\theta, x\sin\theta+y\cos\theta). \end{align}

In any case, for $\theta=30°$ you have $\cos\theta=\sqrt3/2$ and $\sin\theta=1/2$, so that $$f(x,y) = \frac12 (\sqrt3 x - y, x + \sqrt3 y).$$

-
How complete +1 – Babak S. Jan 21 '13 at 13:14

You can find $f$ by determining the rotation matrix corresponding to $\theta = 30^{\circ}$. If we call this matrix $R$, we have $f(x, y) = R\begin{bmatrix}x\\y\end{bmatrix}$.

-

Use the Rotation matrix $$R_{\pi/6}=\left(\begin{array}{cc} \cos(\pi/6) & -\sin(\pi/6) \\ \sin(\pi/6) & \cos(\pi/6) \end{array}\right)$$ and then follow @Micheal's approach.

-