What is the procedure (matrix) for change of basis to go from Cartesian to polar coordinates and vice versa? I'm following along with these notes, and at a certain point it talks about change of basis to go from polar to Cartesian coordinates and vice versa. It gives the following relations:
$$\begin{pmatrix}
A_r \\
A_\theta
\end{pmatrix}
=
\begin{pmatrix}
\cos\theta & \sin\theta \\
-\sin\theta & \cos\theta
\end{pmatrix}
\begin{pmatrix}
A_x \\
A_y
\end{pmatrix}$$
and
$$\begin{pmatrix}
A_x \\
A_y
\end{pmatrix}
=
\begin{pmatrix}
\cos\theta & -\sin\theta \\
\sin\theta & \cos\theta
\end{pmatrix}
\begin{pmatrix}
A_r \\
A_\theta
\end{pmatrix}$$
I was struggling to figure out how these were arrived at, and then I noticed what is possibly a mistake. In (1), shouldn't it read
$$A_r=A_x+A_y$$
Is this a mistake, or am I making a wrong assumption somewhere?
I'm kinda stuck here, and would appreciate some inputs on this. Thanks.

I just wanted to build on @Hayate's answer here. while the mathematical identities are correct, there are a few steps omitted. Specifically, there is no explicit calculation for $\frac{\partial r}{\partial x}$, $\frac{\partial r}{\partial \theta}$, $\frac{\partial \theta}{\partial x}$, and $\frac{\partial \theta}{\partial y}$.
Using the formula $r = \sqrt{x^2 + y^2}$, we have
$\frac{\partial r}{\partial x} = \frac{2x}{2\sqrt{x^2+y^2}} = \frac{x}{r} = cos(\theta)$
$\frac{\partial r}{\partial y} = \frac{2y}{2\sqrt{x^2+y^2}} = \frac{y}{r} = sin(\theta)$
In addition, we have the formula $\theta = tan^{-1}(\frac{y}{x})$,
from which it follows that
$\frac{\partial \theta}{\partial x} = \frac{1}{1+(\frac{y}{x})^2} \frac{-y}{x^2} = \frac{-y}{x^2+y^2} = \frac{-y}{r} = -sin(\theta)$
$\frac{\partial \theta}{\partial y} = \frac{1}{1+(\frac{y}{x})^2} \frac{1}{x} = \frac{x}{x^2+y^2} = \frac{x}{r} = cos(\theta)$
This agrees with the transformation that was posted by @hayate.
Hopefully that helps.
-Paul
