$\operatorname{Adj} (\mathbf I_n x-\mathbf A)$ when $\operatorname{rank}(\mathbf A)\le n-2$ Let $\mathbf B$ denote an $n \times n$ matrix with $r\equiv\operatorname{rank}(\mathbf B)$. I need to prove the following conjecture:

If $r \le n - 2$, then there exists a polynomial matrix $\mathbf P(x)$ such that
  $$ \operatorname{Adj} (\mathbf I_n x-\mathbf B)= x^{n-r-1}\mathbf P(x).  $$

 A: Based on @darijgrinberg's comments:

Lemma$\quad$Let $\mathbf{U}$ and $\mathbf{V}$ be two $n \times n$-matrices. Then,
$$\det(\mathbf{U} + \mathbf{V}) = \sum_{k=0}^n\sum_{\;\;\;R,C\in[n]_k}(-1)^{\sum_{i\in R} i+\sum_{i\in C} i}\det(\mathbf{U} _{R^c,C^c})\det( \mathbf{V} _{R,C}),$$
where  $[n]_{k}$ denotes the set of subsets of $\{1,...,n\}$ of size $k$, $\mathbf{U}_{R,C}$ denotes the minor of $\mathbf{U}$ including only the rows in $R$ and collumns in $C$, and, for any $S \subseteq \{1,...,n\}$, $S^c=\{1,...,n\}/S$.
Proof$\quad$See Theorem 5.146 in Grinberg (2016).

For any $i,j \in\{1,...n\}$, let $\mathbf{A}_{i,j}$ and $\mathbf{B}_{i,j}$ denote the $(n-1)\times(n-1)$ sub-matrices of 
$\mathbf I_n$ and $\mathbf{B}$, respectively, with row $i$ and column $j$ removed. It follows from the
Lemma above that
$$\det(\mathbf{A}_{i,j}x-\mathbf{B}_{i,j})  = \sum_{k=0}^{n-1}\sum_{R,C\in[n-1]_k}
(-1)^{\sum_{i\in R} i+\sum_{i\in C} i}x^{n-1-k}\det((\mathbf{A}_{i,j})_{R^c,C^c})\det((\mathbf{B}_{i,j}) _{R,C}),$$
Moreover, if $R,C\in [n-1]_{k}$ with $k>r$, then $\det((\mathbf{B}_{i,j})_{C,R})=0$, so that  
$$\det(\mathbf{A}_{i,j}x-\mathbf{B}_{i,j})  =x^{n-r-1}\sum_{k=0}^{r}\sum_{R,C\in[n-1]_k}(-1)^
{\sum_{i\in R} i+\sum_{i\in C} i}x^{r-k}\det((\mathbf{A}_{i,j})_{R^c,C^c})\det((\mathbf{B}_{i,j}) _{R,C}).$$
Each entry of the matrix $\operatorname*{Adj}(\mathbf{I}_{n}x-\mathbf{B})$ has the form $±\det(\mathbf{A}_{i,j}x-\mathbf{B}_{i,j})$.
A: We need the following results:


*

*For an arbitrary $n \times n$ real matrix $A$ and any real $x$ $\left|xI-A\right| = x^n - S_1 x^{n-1} + S_2 x^{n-1} + \dots + (-1)^{n}S_n$ where $S_k$ is the sum of all $k \times k$ principal minors of $A$. 

*For any $n \times n$ matrix $A$ we have $|A + uv^T| = |A| + v^T\text{Adj}(A)u.$

*Putting $u = e_j$ and $v = e_i$ above( where $e_k$ is the kth column of the identity matrix), we get the $i,j$th entry of $\text{Adj}(A$) is $|A+e_je_i^T| - |A|$ for any square matrix $A$.  


3 implies the $i,j$th element of $\text{Adj}(xI-A)$ is $$
\begin{align}
\left|xI-A+e_je_i^{\small T}\right| - \left| xI - A \right| =  - x^{n-1}(U_1 - S_1) + x^{n-2}(U_2 - S_2) + \dots + (-1)^n(U_n - S_n) 
\end{align}
$$
where for each $k$ $U_k$ is the sum of all $k \times k$ principal minors of $A-e_je_i^{\small T}$ and $S_k$ is the sum of all $k \times k$ principal minors of $A$.
Since $\texttt{rank}(A) = r$ we have $S_{r+1}=\dots=S_n = 0.$
We will now show $U_{r+2}=\dots=U_n=0.$
Let $M$ be a $k \times k$ principal submatrix of $A-e_je_i^{\small T}$ and let $N$ be the principal submatrix of $A$ corresponding to the same indices which determine $M$.  $M$ and $N$ can differ in at most one entry by exactly 1. So if $M$ and $N$ differ at the $h,g$th position and $N = \left[ \begin{matrix} n_1 & n_2 & \dots & n_k \end{matrix} \right]$ then  $M = \left[ \begin{matrix} n_1 & \dots & n_{g-1} & n_g - e_h & \dots & n_{g+1} & \dots & n_k \end{matrix} \right]$ which implies $\left|M\right| = \left|N\right| - \left| \begin{matrix} n_1 & \dots & n_{g-1} & e_h & n_{g+1} & \dots & n_k \end{matrix} \right|.$ We can see that the second term in the previous sum is a $(k-1)\times(k-1)$ minor of $A$ (upto a sign). And since $\texttt{rank}(A)=r$ this implies if $k \geq r+2$ then $|M|=0$ and so $U_{r+2}=\dots=U_n=0$.
So the $i,j$th element of $\text{Adj}(A)$ is of the form $-x^{n-1}(U_1-S_1) + \dots \pm x^{n-r+1}(U_{r+1}-S_{r+1})$ and we are done.
Finally $1$ can be proved by noting $f(x) = |xI - A|$ is a polynomial in $x$ and evaluating the coefficient of $x^k$ as $f^{k}(0)/k!$.
2 can proved as follows. First assume $A$ is invertible then 
$$
\begin{align}
|A+uv^T| &= |A||I + (A^{-1}u)v^T|,\\ &= |A|(1+v^TA^{-1}u), \\ &= |A| + v^T|A|A^{-1}u,\\ &= |A| +v^T\text{Adj}(A)u.
\end{align}$$
Since $|A+uv^T|$ and $|A| +v^T\text{Adj}(A)u$ are continuous functions of $A$ since they are both polynomials in the entries of $A$ and non-singular matrices are dense, given any singular matrix $A$ we can find a sequence of non-singular matrices $A_n$ converging to $A$ and result follows from $|A+uv^T| = \lim |A_n+uv^T| = \lim |A_n| +v^T\text{Adj}(A_n)u = |A| +v^T\text{Adj}(A)u.$
A: As $B$ has rank $r$, the eigenvalue $0$ has algebraic multiplicity $\ge n-r$. Therefore $x^{n-r}$ divides $I\det(Ix-B)=(Ix-B)\operatorname{adj}(Ix-B)$ (note: both sides are understood as polynomials in $x$ with matrix coefficients; hence we write $I\det(Ix-B)$ rather than $\det(xI-B)I$). Taking into account the possibility that $B$ can be zero, we conclude that $x^{n-r-1}$ divides $\operatorname{adj}(Ix-B)$. 
