Let $M$ be a $n\times n$ matrix whose coefficients depend on some parameters (the number of parameters does not really matter). For some values of the parameters, $M$ is non-singular. Enforcing $\mathrm{rank}(M)\leq n-1$ requires solving a single equation: $\det M =0$.
My question is, how many equations are needed to enforce $\mathrm{rank}(M)\leq n-2$ (and which ones)? I would say that necessarily, the four $(n-1)\times (n-1)$ submatrices should be singular, which gives four equations. But it does not seem to be a sufficient condition.