Sylvester identity for bordered minors (source code)

= Sylvester identity for bordered minors
{c}

Let a square <matrix> $A$ have a leading $k\times k$ block $B$. For row and column indices $i,j>k$, let $D_{ij}$ be the <determinant> formed by bordering $B$ with row $i$ and column $j$, keeping that order. For $i<r$ and $j<s$, the <Sylvester identity for bordered minors> is
$$
D_{ij}D_{rs}-D_{is}D_{rj}=\det(B)\det A_{\{1,\ldots,k,i,r\},\{1,\ldots,k,j,s\}}.
$$
It is a polynomial identity and remains valid when $B$ is singular; dividing by $\det B$ requires an additional nonzero condition.<Sylvester's Identity and Multistep Integer-Preserving Gaussian Elimination by Erwin H. Bareiss>[section I, equations (3), (6) and (8)]{ref}

For $k=1$ and $A=\operatorname{diag}(2,3,5)$, the bordered minors are $D_{22}=6$, $D_{33}=10$, $D_{23}=D_{32}=0$. The identity reads $60=2\cdot30$. In <Bareiss algorithm>, this identity explains why division by a previous pivot can be exact over the <integers>.