I am confused with the solution to the following question. I'm not sure how to follow the steps from the 2nd line onwards and how it relates to the chain rule. Can someone please break this down for me? Why has ${\bf|{a}|}^2 = \bf{a}\cdot{a}$ been used?
Exercise:
Let a be a vector function. Calculate $\frac{d(f({\bf{|a|}})}{dt}$.
Solution:
\begin{align} \frac{d(f({|\bf{a}|})}{dt} &= \frac{d}{dt}({|\bf{a}|}) f'({|\bf{a}|}) \\ {|\bf{a}|}^2 &= \bf{a}\cdot{a} \quad \\ 2{|\bf{a}|} \frac{d}{dt} ({|\bf{a}|}) &= 2{\bf{a}\cdot{\dot{a}}} \\ \frac{d}{dt}(f({|\bf{a}|}) &= \frac{{\bf{a} \cdot{a}}}{{|\bf{a}|}} f'({|\bf{a}|}) \end{align}
Maybe if you expand in components it will help
$$ |{\bf a}|^2 = {\bf a}\cdot {\bf a} = \sum_k a_k a_k $$
So that
$$ \frac{{\rm d}}{{\rm d}t}|{\bf a}|^2 = \frac{{\rm d}}{{\rm d}t}\sum_k a_k a_k = \sum_k a_k \frac{{\rm d}a_k}{{\rm d}t} + \frac{{\rm d}a_k}{{\rm d}t}a_k = 2\sum_k a_k \frac{{\rm d}a_k}{{\rm d}t} = 2\sum_k a_k \dot{a}_k = 2 {\bf a}\cdot \dot{\bf a} $$