This might be ridiculously obvious, but...

For each $n \in \mathbb{N}$, let $M_n$ denote the manifold of $n \times n$ matrices with real entries. It is well known that the $n$-dimensional determinant function $d_n:M_n \to \mathbb{R}$ is a Morse function if and only if $n = 2$ since the zero matrix is a degenerate critical point of $d_n$ whenever $n > 2$. (See the simple homework exercise in this pdf for a proof).

My question is as follows:

For a given $n$, is there a characterization of the sub-manifolds of $M_n$ for which $d_n$ is a Morse function?

Just to be clear, by Morse function I mean that $d_n$ must have:

- Isolated critical points (not necessarily finitely many), and
- Non-degenerate Hessian at each critical point.

For general subspaces of $M_n$ it seems that the critical set of $d_n$ would not be isolated (one can easily construct examples of critical subspaces), so if there is a Morse-Bott theory for submanifolds of $M_n$ that would be good to know as well.