# Chain rule when taking vector derivatives

1. Feb 19, 2015

### Coffee_

Consider a function of several variables $T=T(x_{1},....,x_{3N})$ Let's say I have N vectors of the form $\vec{r_{1}}=(x_1,x_{2},x_{3})$ and $x_j=x_j(q_1,...,q_n)$. Awkward inex usage but the point is just that the each variable is contained in exactly 1 vector.

Is it correct to in general use the chain rule in this way? :

$\frac{\partial T}{\partial q_j} = \sum\limits_{k=1}^N \frac{\partial T}{\partial \vec{r_k}}.\frac{\partial \vec{r_k}}{\partial q_j}$

Where the notation $\frac{\partial T}{\partial \vec{r_k}}$ is just $(\frac{\partial T}{\partial x_k},...., \frac{\partial T}{\partial x_{k+2}})$

Last edited: Feb 19, 2015
2. Feb 19, 2015

### Staff: Mentor

3. Feb 19, 2015

### Coffee_

Done

4. Feb 19, 2015

### PeroK

The way you've written this, I'd infer that the x's are all independent variables, so it makes no sense to differentiate one wrt another.

5. Feb 19, 2015

### Coffee_

Yeah totally right. I've edited it, correctly this time I hope.

6. Feb 19, 2015

### Ray Vickson

Do you mean that you have $\vec{r}_1 = (x_1,x_2,x_3)$, $\vec{r}_2 = (x_4, x_5, x_6)$, etc? Using the notation $\xi_i(q_1,q_2, \ldots, q_n)$ instead of $x_i(q_1, q_2, \ldots, q_n)$ (just so as to keep straight the distinction between the variable $x_i$ and the function $\xi_i$ that delivers you the value of $x_i$), it seems you are asking for the derivative of
$$T = {\cal T}(\xi_1(q_1, q_2, \ldots, q_n), \xi_2(q_1, q_2, \ldots, q_n) , \dots, \xi_{3N}(q_1, q_2, \ldots, q_n)),$$
again being careful to distinguish between the variable $T$ and the function that delivers you $T$ (which I call ${\cal T}$).

7. Feb 19, 2015

### Coffee_

Yeah. Maybe I should have included the physics context since this is a physics forum. Would have messed up less and wasted less of people's time by converting it into math format wrongly.

Basically T is supposed to be a kinetic energy function of a scleronomic system of particles. Where q's represent generalized coordinates and the r-vectors represent the positions of the particles in a carthesian frame.

I was wondering how to formulate the chain rule this way when taking the partial derivative of T wrt. of one of the generalized coordinates. In case you are not familiar with Lagrangian mechanics just nevermind what I said and yes you seem to have stated my problem very well.