# Critical points of the determinant

Let $X$ be a real $n\times n$ matrix with $n\geq 3$ and consider the function $f\colon (\mathbb{R}^{n})^n\to \mathbb{R}$ defined by $f(X)=\det X$ where $\det X$ means the determinant of $X$. If $X$ has rank $n-1$, is $X$ a critical point of $f$? How can the set of critical points of $f$ be defined in terms of the rank of $X$?

I thought this was fairly straightforward (and it still might be) and that I had a solution, but then I realized I wasn't thinking about the derivative of the determinant. A point $X$ is a critical point if $f'(X)=0$ (or is undefined). Since $\text{rk} X=n-1, \det X=0\Rightarrow X$ is not invertible. However, I'm not really sure how to go about considering the derivative of the determinant function. Is there a way to define the determinant so that it's clear what the derivative is? I feel like I'm close to a solution, but I'm not really sure how to handle this part.

-

$\def\Mat{\operatorname{Mat}}$We will compute the partial derivatives of $\det$. So let $1 \le i,j\le n$ be given, we have $\det X = \sum_{k=1}^n (-1)^{k+j} x_{kj}\det X_{kj}$ where $X_{kj}$ denotes the $k,j$-cofactor of $X$. So $\frac{\partial \det}{\partial x_{ij}}(X) = (-1)^{i+j}\det X_{ij}$ That is, $X$ is a critical point of $\det$ exactly iff all $\det X_{ij} = 0$. As the cofactors are exactly the $(n-1)$-minors, $X$ is a critical points of $X$ iff $\operatorname{rk} X < n-1$.