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}$$


$$\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.

  • $\begingroup$ I edited the MathJax to reflect the matrix notation, so you can look at the new source to see how it's done. (Though it's totally fine to write the equations separately.) $\endgroup$
    – David Z
    Commented Dec 7, 2014 at 12:03
  • 1
    $\begingroup$ Where are you seeing it mention polar coordinates? MIT 16.07 Lecture 3, page 11-12 identifies the matrix you posted above as a rotation matrix. $\endgroup$
    – Zaz
    Commented Mar 16, 2023 at 9:28

3 Answers 3


This properly belongs on math.se, but to properly derive these you need to remember that we can write a vector in terms of basis vectors. The vector $\vec{A}$ is unchanged, but it is just expressed as a different linear combination: $$\vec{A} = A_x \hat {x} + A_y \hat{y} = A_r \hat{r} + A_\theta\hat{\theta} $$.

Because you can write $\hat{r}$ as a linear combination of $\hat x$ and $\hat y$, i.e., $\hat {r} = \frac{x}{r} \hat {x} + \frac{y}{r} \hat y = \cos\theta \hat{x} + \sin\theta \hat{y}$, and similarly for $\hat{\theta} = -\sin\theta \hat{x} + \cos\theta \hat y$, you can solve for the $A_r$ and $A_\theta$ in terms of $A_x$ and $A_y$.

  • 1
    $\begingroup$ I don't understand the $A_\theta\hat{\theta}$ term. Shouldn't it vanish? After all, a vector starting from the origin only has magnitude in the radial direction, right? $\endgroup$
    – Joebevo
    Commented Dec 8, 2014 at 2:52
  • $\begingroup$ True, the polar basis vectors aren't defined at the origin, but $A$ is better thought of as being some displacement vector away from the origin. Said differently, $A$ lives in a vector space defined by the basis vectors. $\endgroup$ Commented Dec 8, 2014 at 10:03
  • $\begingroup$ I understand that it isn't defined at the origin. However, a displacement vector $A$ that starts at the origin only has a radial component, when we consider it in polar coordinates. $\endgroup$
    – Joebevo
    Commented Dec 8, 2014 at 10:14
  • 1
    $\begingroup$ I think the source of confusion is that the notes use the vector $\vec{A}$ as a position vector in the beginning, but later it refers to it as a "generic vector $\vec{A}$. A good example would be the velocity vector. In that case the "origin" for the vector is at the point specified by $r,\theta$. It is not at $r=0$. $\endgroup$ Commented Dec 8, 2014 at 15:12

What you need to do to derive the transformation matrix is first wrtie out all the relation between both coordinations.

For example, the relation between cartesian coordinates and polar coordinates are: $$x=r\cos \theta \hspace{1cm} y=r\sin \theta $$ $$r=\sqrt{x^2+y^2} \hspace{1cm} \theta = \tan^{-1} \frac{y}{x}$$ From chain rule of partial differiation, we have $$dx=\frac{\partial x}{\partial r}dr+\frac{\partial x}{\partial \theta}d\theta$$ $$dy=\frac{\partial y}{\partial r}dr+\frac{\partial y}{\partial \theta}d\theta$$ Therefore, in matrix notation we have $$ \begin{bmatrix} dx\\dy \end{bmatrix} = \begin{bmatrix} \frac{\partial x}{\partial r} & \frac{\partial x}{\partial \theta}\\ \frac{\partial y}{\partial r} & \frac{\partial y}{\partial \theta} \end{bmatrix} \begin{bmatrix} dr\\d\theta \end{bmatrix} $$ By definition, an arbitary vector A must transform the same way as the componenets of the displacement do. Because in here we defined the basic vector $e_{\theta}$ to have a magnetude of r So we have: $$ \begin{bmatrix}e_x\\e_y\end{bmatrix} = \begin{bmatrix}\cos \theta &-\sin \theta \\\sin \theta &\cos \theta \end{bmatrix} \begin{bmatrix}e_r\\e_{\theta} \end{bmatrix} $$ Do an inverse on the transfomation matrix and you shall get the inverse transformation relation.

$$ \begin{bmatrix}e_r\\e_{\theta}\end{bmatrix} = \begin{bmatrix}\cos \theta &\sin \theta \\-\sin \theta &\cos \theta \end{bmatrix} \begin{bmatrix}e_x\\e_y \end{bmatrix} $$

An alternative way of thinking it, is to rotate the coordination system such that $e_x$ coincide with $e_r$. Therefore, The transformation matrix is coincidentally the same as rotation matrix rotating the cartesian system by $\theta$.


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^2} = -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^2} = cos(\theta)$

This agrees with the transformation that was posted by @hayate.

Hopefully that helps.


  • 1
    $\begingroup$ In your calculation of partial derivative of theta w.r.t x shouldnt $x^2+y^2=r^2$? $\endgroup$ Commented Feb 21 at 9:58
  • $\begingroup$ I also am wondering this I thought it should be $r^2$ but I see it as $r$ in multiple places $\endgroup$
    – random0620
    Commented Feb 26 at 16:59
  • $\begingroup$ you're right! My apologies. Editing my answer now. $\endgroup$
    – Paul
    Commented Mar 17 at 4:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.