# Existence of Morse function and Immersion

I have started with differential topology and I try to solve exercises in the book Differential Topology by Victor Guillemin, Alan Pollack. There are 2 exercises in chapter Sard and Morse Theorem I do not know how to start:

• Ex1. Let $$X$$ be a submanifold of $$\mathbb{R}^n$$. Prove that there exists a linear mapping $$l: \mathbb{R}^n \to \mathbb{R}$$ such that the restriction to $$X$$ is Morse function.

• Ex2. Let $$\phi: X \to \mathbb{R}^n$$ be an immersion. Prove that for almost all $$a_1,...,a_n$$, $$a_1 \phi_1 +...+a_n \phi_n$$ is Morse function on $$X$$ where $$\phi_1,...,\phi_n$$ are the coordinate functions of $$\phi$$.

For Ex1, I know how to prove with a special case where $$X= \mathbb{S}^{n-1}$$ and explicit form of $$l$$ is the height function $$(x_1,...x_n) \mapsto x_n$$. But for the general case, I have no idea to start with. Any solution or hint is helpful.