# Dot product in spherical coordinates

What can be the formula for dot product in spherical coordinates? that is $$\overrightarrow{A}(r, \theta , \phi). \overrightarrow{B}(r, \theta , \phi)=?$$ $$or,(A_r \hat{r} + A_{\theta} \hat{\theta} + A_{\phi} \hat{\phi}).(B_r \hat{r} + B_{\theta} \hat{\theta} + B_{\phi} \hat{\phi})=?$$

My Approach:
As $\overrightarrow{a}.(\overrightarrow{b} + \overrightarrow{c})=\overrightarrow{a}.\overrightarrow{b} + \overrightarrow{a}.\overrightarrow{c}$ $$\therefore (A_r \hat{r} + A_{\theta} \hat{\theta} + A_{\phi} \hat{\phi}).(B_r \hat{r} + B_{\theta} \hat{\theta} + B_{\phi} \hat{\phi})= A_r \hat{r}.(B_r \hat{r} + B_{\theta} \hat{\theta} + B_{\phi} \hat{\phi})+A_{\theta} \hat{\theta}.(B_r \hat{r} + B_{\theta} \hat{\theta} + B_{\phi} \hat{\phi})+A_{\phi} \hat{\phi}.(B_r \hat{r} + B_{\theta} \hat{\theta} + B_{\phi} \hat{\phi})$$ $$=A_r B_r + A_{\theta}B_{\theta} + A_{\phi}B_{\phi} \dots \dots (1)$$ $$\text{as } \hat{r}.\hat{r}=1; \hat{r}.\hat{\theta}=0;\hat{r}.\hat{\phi}=0 \space \& \space \hat{\theta}.\hat{\phi}=0 \text{ and so on...}$$ but i am not sure whether I am correct or wrong
You're right. The basis $\{\hat{e}_i\}_i= \{\hat{r},\hat{\theta},\hat{\phi} \}$ is orthonormal, so it follows
$$\hat{e}_i\cdot \hat{e}_j = \delta_{ij}$$
• do you mean $\{\hat{r},\hat{\theta},\hat{\phi} \}$ are fixed (same for A and for B) ?? – G Cab Mar 10 '18 at 11:55
• I mean, what is $(1,0,0)\cdot(1,\pi/2,0)$ ? – G Cab Mar 10 '18 at 12:02