Intuition about total derivative and why do we evaluate total derivative in a vector I've got some difficulties to understand total derivative.
For a multivariable function $f : \mathbb{R}^m \rightarrow \mathbb{R}^p$, its total derivative at the point $a \in \mathbb{R}^m$ is $Df(a)$.
As far as I understand, $Df(a)$ is a linear map and so $Df(a) \in Lin(\mathbb{R}^m, \mathbb{R}^p)$.
But our teacher said that because $Df(a)$ is a linear map, it has to be evaluated in a vector $h \in \mathbb{R}^m$ so that $Df(a)[h] \in \mathbb{R}^p$.
But I don't really get the intuition behind it.
Especially when we have to compute total derivative.
For instance, 
let $$f: \mathbb{R}^m \rightarrow \mathbb{R}$$ 
and $$f = ||x||$$ for each $x \in \mathbb{R}^m$
How do we compute $$Df(x)[h]$$
 A: $Df(\mathbf a)$ isn’t just any old linear map. It’s the linear map that best approximates the change in $f$ in a neighborhood of $\mathbf a$. Specifically, if $f$ is differentiable at $\mathbf a$, then $$f(\mathbf a+\mathbf h) = f(\mathbf a)+Df(\mathbf a)[\mathbf h]+o(\mathbf h).\tag{*}$$ You feed the displacement $\mathbf h$ from $\mathbf a$ into the linear map $Df(\mathbf a)$, and it spits out the approximate difference from $f(\mathbf a)$. The notation can be a bit confusing: think of $Df$ as a rule that associates a linear map with each point $\mathbf a$ of the domain at which $f$ is differentiable. That map can then be applied to a displacement $\mathbf h$ from that point to obtain an approximation to the value of $f$. Observe that if $f:\mathbb R^m\to\mathbb R^p$, then $f(\mathbf a)\in\mathbb R^p$ and so for the addition in (*) to make sense, $Df(\mathbf a)[\mathbf h]$ must also be an element of $\mathbb R^p$.  
Compare this to the first-order Taylor series approximation of a differentiable single-variable function: $f(a+h)=f(a)+hf'(a)+O(h^2)$. Here, the term $hf'(a)$ can be interpreted as the application of a linear map to $h$: in this case, the linear map is “multiply by the constant $f'(a)$.” In this approximation, we follow the tangent line to the graph of $f$ at $a$ instead of following the graph of $f$ itself. Similarly, for a scalar-valued vector function, when using the approximation on the right-hand side of (*), we move along the tangent (hyper)plane to the graph of $f$ at $\mathbf a$ instead of moving along the graph itself. Expressed in coordinates, the term $Df(\mathbf a)[\mathbf h]$ becomes “multiply the column vector $\mathbf h$ by the row vector of the partial derivatives of $f$ at $\mathbf a$.” The latter is nothing more than the transpose of the gradient, so this is the dot product of the gradient of $f$ with the displacement $\mathbf h$, which you might’ve already seen in other courses as the linear term of the multivariable Taylor series for $f$. More generally, when expressed in coordinates, $Df(\mathbf a)[\mathbf h]$ becomes multiplication of $\mathbf h$ by the Jacobian matrix of partial derivatives of $f$ at $\mathbf a$. The latter clearly corresponds to applying a linear map to $\mathbf h$.  
For your specific example, if we use the standard Cartesian coordinate system for $\mathbb R^n$, then you probably already know that $\nabla f(\mathbf a) = {\mathbf a\over\lVert\mathbf a\rVert}$, so to evaluate $Df(\mathbf a)[\mathbf h]$ you can simply compute ${1\over\lVert\mathbf a\rVert}\mathbf a\cdot\mathbf h$.
A: Note by the way that $f$ is only differentiable away from the origin (if this Euclidean norm was differeniable at the origin for all values of $m$, then in particular it must be true when $m=1$; i.e in the single variable case. But presumably, you're aware that the absolute value function $|\cdot|: \Bbb{R} \to \Bbb{R}$ is not differentiable at the origin).
Now, before we go about computing $Df(x)[h]$, we have to first prove that $Df(x)$ actually exists; i.e that for all $x \in \Bbb{R}^m \setminus \{0\}$, $f$ is differentiable at $x$. I'll present as many different ways of this as I can think of/have the time for.
Method 1: Using Chain Rule
This is a simple consequence of the chain rule because
\begin{align}
f(x) &= \sqrt{\sum_{i=1}^n x_i^2}
\end{align}
To see exactly how I'm applying the chain rule, let's introduce some more notation (in time, such arguments should become natural, and almost "obvious" but let's just be super explicit for now). For each $i \in \{1, \dots, n\}$, define $\pi_i: \Bbb{R}^n \to \Bbb{R}$ by the formula
\begin{align}
\pi_i(x_1, \dots, x_n) = x_i
\end{align}
In other words, $\pi_i$ is that function which tells you the $i^{th}$ entry of each tuple. It is clear that $\pi_i$ is a linear transformation; hence it is differentiable (this should be one of the first few theorems regarding differentiability that you prove... but if you haven't seen the proof, then it is an excellent opportunity for you to attempt a proof. It's not hard at all, and it's a really good test to see if you understood the definitions). Now, since $\pi_i$ is differentiable, so is the product $\pi_i \cdot \pi_i$ (product rule... again, this should be one of the first few theorems you prove). Now, the sum
\begin{align}
g(\cdot) = \sum_{i=1}^n (\pi_i(\cdot))^2
\end{align}
is a sum of differentiable functions and hence differentiable. Lastly, $f = \sqrt{\cdot} \circ g$ is a composition of functions which is differentiable whenever the input of $\sqrt{\cdot}$ is strictly positive.
Once again, just to reiterate, this may seem long and tedious (which it is in the beginning), but this is just to make super explicit how the chain rule, sum rule, product rule etc are all being used in order to prove that $f$ is differentiable.
Now, to calculate (for non-zero $x$) $Df_x[h]$, we apply the chain rule (I put the $x$ in subscript position merely for notational convenience):
\begin{align}
Df_x[h] &= \left(D(\sqrt{\cdot})_{g(x)} \circ Dg_x\right) [h] \tag{chain rule} \\
&= D(\sqrt{\cdot})_{g(x)} \left[ Dg_x[h] \right]
\end{align}
Now, recall that by definition, $D(\sqrt{\cdot})_{g(x)} \in \text{Lin}(\Bbb{R}, \Bbb{R})$ is a linear transformation, and $Dg_x[h] \in \Bbb{R}$ is a number. Hence, we can write
\begin{align}
Df_x[h] &= \underbrace{D(\sqrt{\cdot})_{g(x)}[1]}_{\in \Bbb{R}} \cdot \underbrace{Dg_x[h]}_{\in \Bbb{R}};
\end{align}
so this is a product of real numbers. Now in general, whenever you have a map $\phi: U \subset \Bbb{R} \to \Bbb{R}$ ($U$ being an open subset), then $D\phi_x[1]$ is simply $\phi'(x)$ -  the standard limit of difference quotients (this is an easy verification straight from the definitions). So, the first term, is simply the usual derivative of the square root, evaluated at $g(x)$; i.e it is $\dfrac{1}{2 \sqrt{g(x)}} = \dfrac{1}{2f(x)} = \dfrac{1}{2 \lVert x \rVert}$. Now, as for evaluating $Dg_x[h]$, recall that $g$ was by definition a sum of $m$ functions $\pi_i^2$, each of which is a product. So,
\begin{align}
Dg_x[h] &= \sum_{i=1}^m D \left( \pi_i^2\right)_x[h] \tag{sum rule}\\
&= \sum_{i=1}^m 2\pi_i(x) \cdot D(\pi_i)_x[h] \tag{product/chain rule} \\
&= \sum_{i=1}^m 2 \pi_i(x) \cdot \pi_i(h) 
\end{align}
where in the last line, I used the fact that $\pi_i$ is a linear transformation, so it is its own derivative (again, verify this); i.e for all $x$, $D(\pi_i)_x[\cdot] = \pi_i[\cdot]$.
So, if we put all of this together, then
\begin{align}
Df_x[h] &= \left(\dfrac{1}{2 \lVert x \rVert}\right) \cdot \left( \sum_{i=1}^m 2 \pi_i(x) \cdot \pi_i(h)\right) \\
&= \dfrac{1}{\lVert x \rVert} \sum_{i=1}^m x_i h_i
\end{align}
Or, written differently, $Df_x[h] = \dfrac{\langle x, h \rangle}{\lVert x \rVert}$, where the numerator is the inner product of $x$ and $h$.
Method 2: Chain Rule again (same proof, more abstract presentation)
This time, we introduce the inner product $\langle x,y\rangle = \sum_{i=1}^m x_i y_i$ on $\Bbb{R}^m$. Then, note that the inner product is a bilinear function on $\Bbb{R}^m$, hence it is differentiable everywhere on its domain. Next, introduce the "diagonal mapping" $\delta : \Bbb{R}^m \to \Bbb{R}^m \times \Bbb{R}^m$ by
\begin{align}
\delta(x) &= (x,x)
\end{align}
This is a linear mapping and hence differentiable everywhere,
\begin{align}
f(x) &= \lVert x \rVert = \sqrt{\langle x,x \rangle} = \left( \sqrt{\cdot} \circ \langle \cdot, \cdot \rangle \circ \delta \right)(x)
\end{align}
In other words, we have expressed $f$ as a composition of $3$ differentiable functions; the square-root $\sqrt{\cdot}$ (differentiable away from the origin), the inner product (bilinear hence differentiable everywhere), and the "diagonal mapping" (linear hence differentiable everywhere). If you really analyse it, this is exactly the same proof as in method 1; but its just written in a more abstract way, which at times is useful. This time, I'll leave it to you verify that applying the chain rule directly leads to the same result that
\begin{align}
Df_x[h] &= \dfrac{\langle x,h \rangle}{\sqrt{\langle x, x \rangle}} = \dfrac{\langle x, h \rangle}{\lVert x \rVert}.
\end{align}
(you may have to look up/prove what the derivative of a bilinear function is... but this is really a form of product rule in disguise. For this, you can either look up proofs in any book, or even on this site).
Method 3: Direct Proof
This final one might be most concrete. Suppose for the moment that $x \neq 0$ and that $f$ is already known to be differentiable at $x$. In this case, $Df_x[h]$ makes sense. Now, since $Df_x[\cdot]$ is a linear function, we can write
\begin{align}
Df_x[h] &= \sum_{i=1}^m h_i \cdot Df_x[e_i],
\end{align}
where $h = \sum_{i=1}^m h_i e_i$, $h_i \in \Bbb{R}$ and $e_i = (0, \dots, \underbrace{1}_{i^{th} slot}, \dots 0)$. Now, $Df_x[e_i]$ is nothing but the $i^{th}$ partial derivative of $f$ at $x$ (verify that this is true in general using the definitions); so
\begin{align}
Df_x[e_i] &= (\partial_if)(x) = \dfrac{1}{2 \sqrt{x_1^2 + \dots + x_n^2}} \cdot 2 x_i = \dfrac{x_i}{\lVert x \rVert}
\end{align}
Hence,
\begin{align}
Df_x[h] &= \sum_{i=1}^m h_i \cdot \dfrac{x_i}{\lVert x \rVert} = \dfrac{\langle x, h \rangle}{\lVert x \rVert};
\end{align}
once again, in agreement with the previously obtained formulas.
There is only one flaw with this reasoning. This assumes apriori that $f$ is already differentiable at all non-zero $x$. However, what this argument shows is that if $f$ was differentiable, then its derivative is uniquely determined by the above formula. Hence, to prove that $f$ is indeed differentiable at $x$, all you would have to do is show that
\begin{align}
\lim_{h \to 0} \dfrac{\left| \lVert x+h\rVert - \lVert x\rVert - \frac{\langle x, h \rangle}{\lVert x \rVert}\right|}{\lVert h \rVert} = 0.
\end{align}
I leave it to you to verify that this is true directly (use triangle inequality etc)

Concluding Remarks.
It all depends on how much stuff you're allowed to assume. In this case, I think using methods 1/2 might be easiest to establish the fact that $f$ is differentiable, and $3$ might be the most obvious method of computing $Df_x[h]$. But, I think it is a worthwhile exercise to proof differentiabilty using any of the 3 levels of sophistication, and also compute using the 3 methods I outlined above, because math has a variety of different problems, so you wanna build up your toolkit :)
