Total Derivative : How to correct the practical definition ? a+h out of set. Definition : Total Derivative over an open set of a  $\mathbb{R}$ vectorial space :
Let E and F be two $\mathbb{R}$ vectorial spaces. Let $U \subset E$ be an open subset of E.
Let $f:U \rightarrow F$ be an application and $x_0 \in U$.
$f$ is said to be totally differentiable in $x_0$ if and only if there exist a continuous linear map $L:E \rightarrow F$ that respects
$$f(x_0+h)=f(x_0)+L(h)+o(\Vert h \Vert)$$
It is the definition i find in most books i have , but it is very ambiguous to me ,
1)First of all, $h$ needs to be defined. It cannot be said in E (without any other condition)
, or in U(without any other condition) , because else it would in all case contradict the definition of $f$ (first case , if we define h to be in E , no reason $x_0+h$ to be in U. second case if we define h to be in U , no reason $x_0+h$ to be in U.)
A clear example is to consider $A\rightarrow A^{-1}$ from $GL_n(\mathbb{R})\rightarrow GL_n(\mathbb{R})$.
It is consider to be a differentiable function for a lot of author. But the sum of two inversible matrix has no reason to remain an inversible matrix.
So what i understand is, we tinker it with hands , saying "well consider h close enough from $x_0$ and everything will be fine as your set is open"
But L is unique , and so if i say
Definition : Total Derivative over an open set of a  $\mathbb{R}$ vectorial space :
Let E and F be two $\mathbb{R}$ vectorial spaces. Let $U \subset E$ be an open subset of E.
Let $f:U \rightarrow F$ be an application and $x_0 \in U$.
f is said to be totally differentiable in $x_0$ if and only if there exist a continuous linear map $L:E \rightarrow F$ that respects for all $h\in U$ such that $x_0+h\in U$
$$f(x_0+h)=f(x_0)+L(h)+o(\Vert h \Vert)$$
I feel like breaking the definition.
Can someone give a reformulation of the definition that defines h properly and is well defined ?
 A: Lets check what the definition really says
$$ f(x_0+h)=f(x_0)+L(h)+o(||h||) $$
is the same as
$$ f(x_0+h)-f(x_0)-L(h)=o(||h||) $$
meaning $\forall \epsilon > 0\ \exists \delta>0\ \forall h\ \text{s.t.}\ ||h||<\delta$
$$ ||f(x_0+h)-f(x_0)-L(h)||<\epsilon||h|| $$
And as $x_0$ belongs to an open set $U$, it has an open ball around it, and for $\delta$ small enough $x_0+h$ will always be in this ball, thus also in the open set $U$. So we take $\delta$ small enough for $x_0+h$ to be in $U$. I think you can add your condition $x+h\in U$, but it is just redundant as all $h$ with small enough norm or distance from $0$ will not push the sum from $U$. Also note that $o(||h||)$ is a local thing, needing only $h's$ in an open ball of $0$.
And you are right in your example of course, that sum of two inversible matrix has no reason to remain an inversible matrix. However, taking any $A, H \in GL_n(\mathbb{R})$, $A+H$ will be still invertible if $H$ is small enough in the norm, because $GL_n(\mathbb{R})$ is an open set in $\mathbb{R}^{n^2}$ (see here, for example), therefore it has an open ball around $A$.
