Sum of Elements of Invertible Matrix

Theorem
Let $J_n$ be the $n\times n$ matrix of all ones.

Let $B$ be an $n\times n$ invertible matrix with entries $b_{ij}$, $1\le i,j\le n$. Then:


 * $\displaystyle \sum_{i=1}^n \sum_{j=1}^n b_{ij} = 1 - \det\left(B\right)\det\left(B^{-1} -J_n\right)$

Lemma
Let $J_n$ be the $n\times n$ matrix of all ones.

Let $A$ be an $n\times n$ matrix.

Let $A_{ij}$ denote the cofactor of element $\left(i,j\right)$ in $\det\left( A\right)$, $1\le i,j \le n$. Then:

Let $A=B^{-1}$, then:

Then: