Suppose we have smooth function $\varphi: \mathbb{R}^n \to \mathbb{R}$ and let $x_0 \in \mathbb{R}^n$ be a non-degenerate critical point. That is, $\begin{equation} \varphi'(x_0) = \nabla \varphi(x_0) = 0, \quad \text{and} \quad \text{det }(\varphi''(x_0)) \neq 0 \end{equation}$ where $\varphi ''(x)$ stands for the Hessian matrix of second partial derivatives.
Suppose that $(r,n-r)$ is the signature of $\varphi '' (x_0)$ (this means that the number of postive and negative eigenvalues is $r$ and $n - r$ respectively).
I am currently trying to understand a proof for the Morse Lemma, in which it is taken for granted that I see the following statement as trivial:
Given the above assumptions, after a translation and a linear change of coordinates, we may assume that $x_0 = 0$ and that $\begin{equation} \varphi(x) = \frac{1}{2}(x^2_1 + \cdots + x_r^2 - x^2_{r + 1} - \cdots - x_n^2) + \mathcal{O}(|x|^3) \quad x \to 0 \end{equation} $
Why is this so?
I understand that the translation $y(x) = x - x_0$ gives me the result that $y(x_0) = 0$.
Then I think I need to apply a linear transformation that somehow involves the Hessian $\varphi^''(x_0)$, but I need to diagonalize and rescale it, that is I need to transform to a basis of its eigenvectors that are scaled by the inverses of the eigenvalues, so that I get the $\pm \frac{1}{2}$ - coefficients.
Then I think I need to use Taylor's expansion? I can use the fact that the gradient at $x_0$ is zero. But then I would still need the value $\varphi(0)$ in the above equation$\ldots$ here I guess the text I am using might have a typo.
If I could get some feedback on whether the above rough reasoning goes into the right direction that would be a huge help! Many thanks!