# A differentiable function from a convex subset of $\mathbb{R}^{n}$ to $\mathbb{R}^{n}$ with positive-definite differential is injective.

I am trying to show that a differentiable function $f: U \subseteq \mathbb{R}^{n} \rightarrow \mathbb{R}^{n}$ with $U$ convex such that $\langle f'(x) v, v \rangle > 0$ $\forall x \in U$ and $\forall v \in \mathbb{R}^{n}$ with $v\neq0$ is injective.

This exercise is inside the Inverse Function Theorem section of the book.

Fixing $x,y \in U$, I tried to define

$\phi(t) = f(x + t(y-x))$ and it is well-defined in $U$ since $U$ is convex. I tried to derivate this, but since I have no hypothesis about $\phi^{\prime}(t)$ I cannot use, for instance, the mean-value theorem. I am trying to show somehow that for $x,y \in U$ $x\neq y$, I must have $|f(x)-f(y)| > 0$. But I am not making any progress. Any hint? And it looks like I don't need to use the Inverse Function Theorem, am I right?

Your idea is almost there: You're considering the segment from $x$ to $y$ and trying to use one-variable calculus, by identifying this segment with an interval. The most natural way of passing from a segment in $\mathbb{R}^n$ to an interval is considering the projection of $\mathbb{R}^n$ onto the line passing through $x$ and $y$.
Formally: Let $L:\mathbb{R}^n\to\mathbb{R}$ be given by $L(v)=\langle v,y-x\rangle$. Let's calculate the derivative of $L\phi:[0,1]\to\mathbb{R}$:
By the chain rule, $\phi'(t)=f'(\phi(t))(y-x)$. Since linear maps are their own derivatives, we apply the chain rule again and obtain $$(L\phi)'(t)=L(\phi'(t))=\langle\phi'(t),y-x\rangle=\langle f'(\phi(t))(y-x),y-x\rangle>0,$$ because we are assuming $x\neq y$. Therefore $L\phi$ is strictly increasing, and thus $L(f(x))=L(\phi(0))<L(\phi(1))=L(f(y))$. In particular $f(x)\neq f(y)$.