Is a Morse function always the height function of some embedding? [closed]

Pictures in introductory texts to Morse theory are often drawn as to interpret a Morse function as a height function. Typically, an embedding of a torus into $\mathbb{R}^3$ is drawn, and the Morse function is then the height function by projecting onto one component (call the projection $\pi$).

This is a great picture because I have the feeling that any embedding can be perturbed to give a Morse function that way. Such a construction is used - as far as I can tell - in Lurie's definition of $(\infty,1)$-categories of bordisms. But is this a good picture for any Morse function?

In formulas, is every Morse function $f: M \to \mathbb{R}$ of following the form: $$f: M \hookrightarrow \mathbb{R}^n \stackrel{\pi}{\to} \mathbb{R}$$

-

closed as off-topic by Ryan Budney, Oscar Randal-Williams, abx, Ricardo Andrade, Boris BukhAug 27 '14 at 17:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "MathOverflow is for mathematicians to ask each other questions about their research. See Math.StackExchange to ask general questions in mathematics." – Ryan Budney, Oscar Randal-Williams, abx, Ricardo Andrade, Boris Bukh
If this question can be reworded to fit the rules in the help center, please edit the question.

I wonder, if the question were stripped of infinity categories, Lurie's theory of bordisms and Morse theory, would it be allowed to remain on mathoverflow? – Daniel Pomerleano Aug 27 '14 at 14:15
@Daniel, since the answer is so easy (embarrassingly for me), I should have asked it on math.stackexchange.com. But sometimes I can't tell how hard the problem is in advance. – Turion Aug 27 '14 at 14:20

2 Answers

The formal answer is yes. Moreover, the function does not have to be Morse, just any smooth function.

Indeed let $f\colon M\to \mathbb{R}$ be any smooth function. Let us fix an imbedding $i\colon M\to \mathbb{R}^{n-1}$; for large $n$ it always exists. Consider the imbedding $(i\times f)\colon M\to \mathbb{R}^{n-1}\times \mathbb{R}=\mathbb{R}^n$. This is the required imbedding, and projection to the last coordinate function is the hight function whose restriction to $M$ equals $f$.

UPDATE Just noticed that Peter Michor posted the same answer few seconds earlier.

-

This is trivially true: take an embedding $g:M\to \mathbb R^{n-1}$ and consider $(g,f):M\to \mathbb R^{n-1}\times \mathbb R\to \mathbb R$.

-
Just noted that semyon alesker posted the same answer a few seconds earlier. – Peter Michor Aug 27 '14 at 12:24