Given this Lagrangian where $\dot{\vec r} = \left(\dot x, \dot y, \dot z\right)^T$: $ L = \frac m2 \left|\dot{\vec r}\right|^2 - q \left( \phi - \left\langle \dot{\vec r}, \vec A \right\rangle \right) $
Now I need to calcuate the canonical momenta like so: $ p_x = \frac{\partial L}{\partial \dot x} , \quad p_y = \frac{\partial L}{\partial \dot y} , \quad p_z = \frac{\partial L}{\partial \dot z} $
The $\frac{\partial \dot r^2}{\partial \dot x}$ will be feasable, but quite a bit of work.
Then I will have to put the three momenta together into a momentum vector: $ \vec p = \left( p_x, p_y, p_z \right)^T$
It will turn out that I could just have calculated this and be done with it: $ \vec p = \frac{\partial L}{\partial \vec{\dot r}}$
How do I know when I can just treat the vectors as regular symbols, without worrying how they are represented in a coordinate system like $(x, y, z)$?