How to apply coordinate transformations Lets say I want to rotate a parabola by $\pi/4$ degrees counterclockwise.
Wikipedia tells me a counterclockwise transformation would mean: 
$$ 
x'=x\cos t-y\sin t \\ 
y'=x\sin t+y\cos t  
$$
however when I substitute these new expressions into $y=x^2$, the graph appears rotated clockwise
$$
(x\sin(\pi/4)+y\cos(\pi/4)) = (x\cos(\pi/4)-y\sin(\pi/4))^2  
$$
(try it in wolframalpha)
why is it working in reverse, how should these transformations work?

to be more specific regarding my problem
I need to do a coordinate transformation to model a distortion in an image but I do not understand what the expression means.
if I wanted to apply the transformation $x' =$ sign$(x)x^2$ where $x'$ corresponds to the "image plane", what would I get?
my intuition tells me that if I had a point at $(0.5,0.5)$, it would be pulled into $(0.25,0.25)$ but this website tells me the opposite
http://paulbourke.net/miscellaneous/imagewarp/ 
I am aware of $r_u=r_d+kr_d$ 3 transformations, I want to use $x^2$
but if I substitute $x^2$ and $y^2$ into the equation of a circle, I see that the circle looks inflated
$$
[\mbox{sign}(x)x^2]^2+[\mbox{sign}(y)y^2]^2=1
$$
 A: Your substitution is not rotating $y=x^2$ -- on the contrary you're starting with $y'=x'^2$ and rewriting that to express the same points in the $xy$ coordinate system.
With the transformation you're quoting, the $xy$ coordinate axes are rotated an angle of $t$ counterclockwise from the $x'y'$ coordinate axes.
Thus when you take a parabola with its axis along the $y'$ axis and "turn the paper" such that the $y$ axis points due north, the $y'$ axis will now point to the northeast.
If you want to rotate an image counterclockwise, then you need its original coordinates in the $xy$ coordinate system, and find a new description for it in the $x'y'$ system. That means that you need to invert the transformation to express $x$ and $y$ as functions of $x'$ and $y'$ -- or just negate the angle you rotate through.

Expressed in other words, there's a difference between rotating a point and rotating an equation. If your transformation is $T$, and $\phi(v)$ is an equation whose solution set you want to rotate, then you're after the set
$$ \{ T(v) \mid \phi(v) \} $$
In order to get an equation for the rotated set, you can change the variable to $u=T(v)$, and then you get
$$ \{ u \mid \phi(T^{-1}(u)) \} $$
So you construct an equation for the transformed set by composing the existing equation with the inverse of the transformation.
