Critical point of a function - $\Bbb R^n$ Analysis Consider $f=(f_1,f_2,f_3): U \rightarrow \mathbb{R}^3$ a function not identically null, $f\in C^1$ and rank $3$ at every point of the open $U \subset \mathbb{R}^n$, $n \geq 3$. Show that $g(x)= f_1^2(x)+f_2^2(x)+f_3^2(x)$, $x \in U$, hasn't maximum in $U$.
Suggestion: Suppose by contradiction considering $\nabla g$; look the sign of $g$.
 A: There is a 'geometry' intuition behind your question. Observe that $g$ is the composition of $f$ and the square of the distance to the origen in $\mathbb{R}^3$. Namely, let $s : \mathbb{R}^3 \to \mathbb{R}$ be $s(x,y,z) := x^2 + y^2 + z^2$ be the square of the distance to $(0,0,0)$. Then $g = s \circ f$. Since $f$ has rank 3 at any point $x_0$ then there are vectors $v$ at $x_0$ such that the derivative of $f$ at $x_0$ takes $v$ to a vector $df(v)$ at $f(x_0)$ pointing outside of the sphere whose radius is $g(x_0)$. So $x_0$ can not be a maximum of $g$.
A: Suppose $p \in U$ were a local maximum of $g = f_1^2 + f_2^2 + f_3^2$; then 
$\nabla g(p) = 0; \tag{1}$
for any $x \in U$ we have
$\nabla g(x) = 2(f_1(x) \nabla f_1(x) + f_2(x) \nabla f_2(x) + f_3(x) \nabla f_3(x)); \tag{2}$
thus
$f_1(p) \nabla f_1(p) + f_2(p) \nabla f_2(p) + f_3(p) \nabla f_3(p) = \dfrac{1}{2} \nabla g(p) = 0. \tag{3}$
We may write the derivative $Df = D(f_1, f_2, f_3)$ in terms of the $\nabla f_i$, $1 \le i \le 3$, as the matrix
$Df = (\nabla f_1, \nabla f_2, \nabla f_3). \tag{4}$
The hypothesis that $f$ is of rank $3$ at every point is essentially the assertion that the rank of $Df$ is also $3$ everywhere; thus the vectors$\nabla f_i(x)$ must be linearly independent at every point $x \in U$.  Granting this linear independence, (3) implies
$f_1(p) = f_2(p) = f_3(p) = 0, \tag{5}$
whence
$g(p) = 0; \tag{6}$
since $p$ is a maximum point of $g(x)$, we have for all $x \in U$
$0 \le f_1^2(x) + f_2^2(x) + f_3^2(x) \le g(p) = 0. \tag{7}$ 
But (7) is equivalent to
$f(x) = (f_1(x), f_2(x), f_3(x)) = 0 \tag{8}$
everywhere; that is, $f(x)$ is identically null, in contradiction to our hypothesis.  Thus $g(x)$ may have no maxima in $U$.  QED.
A: Sketch: Suppose to reach a contradiction that $g$ has a maximum at $a\in U.$ Then $\nabla g (a)$ is the zero vector. Show that this implies the nonzero vector $f(a)$ is perpendicular to the vectors $\partial f/\partial x_k, k=1,\dots , n.$ But $Df(a)$ has rank $3,$ hence these vectors span $\mathbb {R}^3.$ This is a contradiction.
