The inverse of a specific case of symmetric matrix (scalar product of d dimensions vectors)

The problem is the following:

For $$i \in [N]$$, let $$v_i$$ be a $$1 \times d$$ vector and $$b_i$$ a scalar. Moreover, let $$A$$ be a $$N \times N$$ matrix, whose (i, j)-entry is:

$$a_{ij} = \begin{cases} \langle v_i, v_j \rangle + b_i &\text{if } i = j \\ \langle v_i, v_j \rangle &\text{if } i \neq j \end{cases}$$

Find $$A^{-1}$$.

For d = 1, we can find a solution using the Sherman-Morisson equation or using the Leibniz formula and properties of the symmetric group. Which give us:

$$$$\begin{split} a_{ij}^{-1} & = \frac{1}{\prod_{k=1}^n b_k + \sum_{k=1}^n v_k^2 \prod_{l=1, l\neq k}^n b_k} \begin{cases} \prod_{k=1, k\neq i}^n b_k + \sum_{k=1, k\neq i}^n v_k^2 \prod_{l=1, l\neq k, l\neq i}^n b_k & \text{if } i = j\\ -v_jv_i \prod_{k=1, k \neq i, k\neq j}^n b_k& \text{otherwise} \end{cases} \\ \end{split}$$$$

I didn't add the proof to make a smaller post. So now I am trying to derive a general formula for d but I am not really familiar with this field so I am struggling. And to my understanding with $$d>1$$, the Serman-Morisson equation is not usable anymore. I am not really sure in which direction to look or if any formula can be derived. Any help would be really appreciated :)

• I think $A$ is not always invertible. May 15 at 13:30
• Let $V$ be the matrix whose columns are the $v_k$ vectors and $B\!=\!\operatorname{Diag}(b).\;$ Write $A$ in the form $$A = B + V^TV$$ to which the Sherman-Morrison-Woodbury formula can be directly applied.
– greg
May 15 at 13:32