I know that a first-order linear constant coefficient PDE, such as $au_x + bu_y = 0$, can be transformed to an ODE by rotating the coordinate system so the $x'$ axis points to $(a,b)$ where the directional derivative vanishes.
As far as I know, a coordinate rotation is done by $x' = xcos\theta + y sin\theta$ and $y' = y' cos\theta - x' sin\theta$
However, in basic PDE textbooks this is done via:
$x' = ax + by$ and $y' = bx - ay$
My problem is that I do not understand how did we get this formulas. Although I guess that it should be quite simple, for example I know that the vector $(b,-a)$ is the orthogonal to $(a,b)$ and it should have a relationship with the problem, I do not get it.
Thanks!
The formulas with $a$ and $b$ not only rotate the coordinate system, they also change the scale of the axes by a factor of $\sqrt{a^2+b^2}$, and reverse the relative orientation of the axes (since the determinant of the coordinate change is negative). If you take $$ x'' = \frac{x'}{\sqrt{a^2+b^2}} = \frac{a}{\sqrt{a^2+b^2}} \, x + \frac{b}{\sqrt{a^2+b^2}} \, y $$ and $$ y'' = \frac{-y'}{\sqrt{a^2+b^2}} = -\frac{b}{\sqrt{a^2+b^2}} \, x + \frac{a}{\sqrt{a^2+b^2}} \, y , $$ then you can identify $a/\sqrt{a^2+b^2}$ with $\sin\theta$ and $b/\sqrt{a^2+b^2}$ with $\cos\theta$ to see that the $(x'',y'')$ coordinate system is rotated with respect to the $(x,y)$ system.