# Coordinates functions and Morse function.

I'm trying to resolve the following problem:

Let $$X$$ be a submanifold of $$\mathbb{R}^N$$ of dimension $$k$$. Show that there exists $$l : \mathbb{R}^N \rightarrow \mathbb{R}$$ linear such that its restriction to $$X$$ is a Morse function.

First, the map $$l$$ is of the form $$l(y) = (a,y) = \sum_{i=1}^N a_i y_i$$ for any $$y \in \mathbb{R}^N$$.

Next, the derivative of $$l : \mathbb{R}^N \rightarrow \mathbb{R}$$ at some $$x \in X$$ is $$T_xf = a$$, so that $$x \in X$$ is a critical point of $$l \vert_X$$ if and only if $$(a,v)=0$$ for any $$v \in T_xX$$.

Assuming $$x \in X$$ is a critical point of $$l\vert_X$$, I have no idea about how to compute the hessian of $$l\vert_X$$ at $$x$$ (the hessian of $$l$$ is the zero map but it does not coincide with the one of $$l\vert_X$$).

One idea is to take a chart $$\varphi : U \rightarrow \mathbb{R}^N$$ from a open neighborhood $$U$$ of $$X$$ and look at the hessian of $$l \circ \varphi^{-1}$$ (since the non-degeneracy is preserved under diffeomorphism).

Say $$\varphi(x) = 0$$ and $$\psi = \varphi^{-1}$$ and $$f = l \vert_X$$, then from the chain rule $$\dfrac{\partial (f \circ \psi)}{\partial x_i}(0) = \sum_\alpha \dfrac{\partial f}{\partial x_\alpha}(x)\dfrac{\partial \psi_\alpha}{\partial x_i} (0)$$ and, using the Leibniz rule, $$\dfrac{\partial^2 (f \circ \psi)}{ \partial x_i \partial x_j} (0)= \sum_{\alpha, \beta} \dfrac{\partial^2 f}{ \partial x_\alpha \partial x_\beta}(x) \dfrac{ \partial \psi_\alpha}{\partial x_j}(0)\dfrac{ \partial \psi_\beta}{\partial x_i}(0) + \sum_\alpha \dfrac{\partial f}{\partial x_\alpha}(x)\dfrac{\partial^2 \psi_\alpha}{\partial x_i \partial x_j}(0).$$ and since $$x$$ is a critical point of $$f$$, we get $$\dfrac{\partial^2 (f \circ \psi)}{ \partial x_i \partial x_j} (0)= \sum_{\alpha, \beta} \dfrac{\partial^2 f}{ \partial x_\alpha \partial x_\beta}(x) \dfrac{ \partial \psi_\alpha}{\partial x_j}(0)\dfrac{ \partial \psi_\beta}{\partial x_i}(0)$$ At the end the problem of computing the hessian explicitly still remains...

I'm looking for some hint to solve this problem, in particular a way to apply Sard Theorem (or transversality), for instance

(every critical point of $$l_X$$ are non-degenerate) $$\Longleftrightarrow$$ ($$a$$ is the regular value of some smooth map)