# Slope of a Line Relative to $r$ and $\theta$ Basis Vectors

I was reading Purcell (a well-known physics textbook for E&M) and I stumbled upon something which bothered me. Purcell was trying to explain how to find the slope of a line with respect to the $$r$$ and $$\theta$$ basis vectors for electric field lines. He states: "The slope of a given curve at a given point, relative to the local $$\hat{r}$$ and $$\hat{\theta}$$ basis vectors at that point, is $$dr/(r\, d\theta)$$." I realize that the slope can be found by taking the limit, which will easily lead to the answer he states, but is there some sort of transformation matrix from $$dy/dx$$ to $$dr/(r\, d\theta)$$ or some use of the chain rule/total derivative which will give the same answer for the slope? I'm looking for a general method of finding the slope in a given coordinate system provided the slope in another system.

Let $$r$$ and $$\theta$$ be functions of $$t$$. The polar unit vectors at a point are usually defined to be $$\hat{\mathbf r} = (\cos\theta,\sin\theta) \\ \hat{\mathbf\theta} = (-\sin\theta,\cos\theta).$$ We then have $$\mathbf r = (r\cos\theta,r\sin\theta) = r\hat{\mathbf r}$$ and using the multiplication and chain rules, $$\dot{\mathbf r} = \dot r(\cos\theta,\sin\theta) + r\dot\theta(-\sin\theta,\cos\theta) = \dot r\hat{\mathbf r} + r\dot\theta\hat{\mathbf\theta}.$$ The slope of the tangent vector $$\dot{\mathbf r}$$ is the ratio of its coordinates in this frame.