# Derivative of a unit vector?

Applejacks

## Homework Statement

Let r=(x,y,z). Find ∇r(hat).

## Homework Equations

r(hat)= (x,y,z)/sqrt (x^2+y^2+z^2)
∇f=df/dx x + df/dy y...

## The Attempt at a Solution

Okay I'm having a complete brain freeze at the moment. I know the denominator is a magnitude but am I still supposed to use the quotient rule here? For the x component of ∇r(hat) we get:
x (sqrt(a) * 1 - x^2 /sqrt(a))/a where a= x^2+y^2+z^2 correct?

Also another stupid question but is the x-component of r(hat) (x,0,0)/sqrt(a) or just x/sqrt(a)?

Would this mean that ∇dot r is a vector while ∇r is a scalar?
r=xi + yj + zk
∇r= (i, j, k) = 3?

My mind is so confused right now...

Last edited:

Homework Helper
Gold Member
##\hat r## is a vector. What do you mean by ##\nabla \hat r##? One would expect a dot or a cross operation.

Applejacks
Well the question asks (r(hat) dot ∇)r(hat)

I thought this equaled (r(hat))^2 dot ∇r(hat)= 1 dot ∇r(hat)=∇r(hat)

Homework Helper
Gold Member
Well the question asks (r(hat) dot ∇)r(hat)

I thought this equaled (r(hat))^2 dot ∇r(hat)= 1 dot ∇r(hat)=∇r(hat)

How can you dot the scalar ##1## into any vector, not to mention ∇r(hat) doesn't mean anything? So that line doesn't make any sense.

If you have stated the problem correctly as ##(\hat r \cdot \nabla)\hat r##, the quantity in parentheses is a scalar differential operator "multiplied" by the unit vector ##\hat r##.
Written out it would be$$\left(\frac 1 r \langle x,y,z\rangle \cdot \langle \frac \partial {\partial x},\frac \partial {\partial y},\frac \partial {\partial z}\rangle \right)\langle \frac x r, \frac y r,\frac z r\rangle$$where ##r = |\vec r|=\sqrt{x^2+y^2+z^2}##. I would try working out the dot product in the parentheses, being careful to leave the indicated partials on the right in each term and "multiply" the resulting scalar times the vector ##\frac 1 r \vec r##. And "multiplying" includes taking the various partials. See what happens. I haven't worked it beyond here myself.

Applejacks
Okay that makes sense.

Inside the brackets I end up with the scalar xd()/dx + yd()/dy + zd()/dz. Then the right side vector acted on this left-side scalar and gave me x(1/r,0,0) + y(0,1/r,0) + z(0,0,1/r) = (x,y,z)/r. Lastly there was the 1/r from the start on the left side giving me (x,y,z)/r^2. If this is correct, I'm still confused as to why the magnitude of r does not affect all this. r has an x, y and z inside of it so why don't we differentiate that too?

On a side note, I can't seem to use the latex so I can make my working look better. It's not working for me.

Homework Helper
The "Laplacian", $\nabla$, is the "vector operator", in Cartesian coordinates,
$$\frac{\partial}{\partial x}\vec{i}+ \frac{\partial}{\partial y}\vec{j}+ \frac{\partial}{\partial z}\vec{j}$$
which, applied to a numerical function, f, gives the "gradient", $\nabla f$.
We can think of that as the "scalar product" of f with $\nabla$.

The most common products of vector with vector are the dot product and the cross product which, with $\nabla$ give the "divergence", $\nabla\cdot \vec{f}$, and the "curl", $\nabla\times \vec{f}$, respectively.

A less used product of two vectors is the "outer product" or "tensor product" which gives a tensor or matrix:
$$<a_1, a_2, a_3> tensor <b_1, b_2, b_3>= \begin{bmatrix}a_1b_1 & a_1b_2 & a_1b_3 \\ a_2b_1 & a_2b_2 & a_2b_3 \\ a_3b_1 & a_3b_2 & a_3b_3\end{bmatrix}$$.

The "outer product" of $\nabla$ with $\vec{F}= f(x,y,z)\vec{i}+ g(x,y,z)\vec{j}+ h(x,y,z)\vec{k}$ would be
$$\begin{bmatrix}\frac{\partial f}{\partial x} & \frac{\partial f}{\partial y} & \frac{\partial f}{\partial z} \\ \frac{\partial g}{\partial x} & \frac{\partial g}{\partial y} & \frac{\partial g}{\partial z} \\ \frac{\partial h}{\partial x} & \frac{\partial h}{\partial y} & \frac{\partial h}{\partial z}\end{bmatrix}$$

The "dot product" of that with <x, y, z> is the matrix product
$$\begin{bmatrix}x & y & z\end{bmatrix}\begin{bmatrix}\frac{\partial f}{\partial x} & \frac{\partial f}{\partial y} & \frac{\partial f}{\partial z} \\ \frac{\partial g}{\partial x} & \frac{\partial g}{\partial y} & \frac{\partial g}{\partial z} \\ \frac{\partial h}{\partial x} & \frac{\partial h}{\partial y} & \frac{\partial h}{\partial z}\end{bmatrix}= \begin{bmatrix}x\frac{\partial f}{\partial x}+ y\frac{\partial g}{\partial x}+ z\frac{\partial h}{\partial x} \\ x\frac{\partial g}{\partial y}+ y\frac{\partial g}{\partial y}+ z\frac{\partial h}{\partial y} \\ x\frac{\partial f}{\partial z}+ y\frac{\partial g}{\partial z}+ z\frac{\partial y}{\partial z}\end{bmatrix}$$

Last edited by a moderator:
Muphrid
This "outer (matrix) product" of the vector derivative with a vector field is related to a concept called the "geometric product" of vectors.

$$\nabla F = \left( \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y} + \frac{\partial F_z}{\partial z} \right) + \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \hat x \hat y + \left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right) \hat y \hat z + \left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right) \hat z \hat x$$

This should make apparent how the geometric derivative marries both the divergence and curl into a single operator.

Finding $\hat r \cdot \nabla \hat r$ is probably easiest done using the chain rule and the product (or quotient) rule. For any vector $a$,

$a \cdot \nabla r = a$ for vector $r$.

$a \cdot \nabla (r \cdot r) = 2 a \cdot r$.

$a \cdot \nabla \frac{1}{|r|} = a \cdot \nabla (r \cdot r)^{-1/2} = - \frac{a \cdot r}{|r|^3}$.

Take $\hat r = r/|r|$ and apply the product rule.

Mentor
Well the question asks (r(hat) dot ∇)r(hat)

If this is truly the problem statement, then the answer should be zero.

In spherical coordinates, (r(hat) dot ∇)r(hat) is just the partial derivative of r(hat) with respect to r. The unit vector in the r-direction is independent of r, so its partial derivative with respect to r is equal to zero. If you need to solve this problem in cartesian coordinates, then it is best to use the method outlined by LCKurtz. But, the answer has to come out the same.

Last edited:
Applejacks
I ended up with a zero using Murphid's approach. I'm not sure why I get a different answer using LCKurtz method but I'll look into it either way. Thanks for the help guys.