# How to find the inverse of the following matrix?

I want to calculate the inverse of matrix $A+B$, where

$$\mathbf{A} = \left( \begin{array}{rrrr} x_1+a & a & \cdots & a \\ a & x_2+a & \cdots & a \\ \vdots & \vdots & \ddots & \vdots \\ a & a & \cdots & x_m+a \end{array} \right) , \qquad \qquad \qquad B= \left( \begin{array}{rrrr} b_1^2 & b_1b_2 & \cdots & b_1b_m \\ b_1b_2 & b_2^2 & \cdots & b_2b_m \\ \vdots & \vdots & \ddots & \vdots \\ b_1b_m & b_2b_m & \cdots & b_m^2 \end{array} \right)$$

Can you help me? Thanks.

• Try to calculate the inverse for a $1$x$1$, $2$x$2$ and $3$x$3$ case and see if you can spot a pattern. Then you might be able to use induction (if there is an obvious pattern). – MrYouMath Nov 8 '16 at 11:35
• I have no idea about finding the inverse, but I can give some properties about these matrices that may be useful to anyone trying to come up with an answer. First off, $A$ and $B$ are both symmetric matrices and hence so is $A+B$, and thus the inverse $(A+B)^{-1}$ will also be symmetric. Also, $\det(A) = \prod_{i=1}^mx_i + a\sum_{i=1}^m\prod_{j\neq i}x_j$; and if $b = (b_1, b_2, \dots, b_n)$, then $\det(B) = \left(\prod_{i=1}^mb_i\right)\begin{pmatrix}b\\b\\\vdots\\ b\end{pmatrix} = 0$. – sTertooy Nov 8 '16 at 12:41

$$\mathrm A + \mathrm B = \mbox{diag} (\mathrm x) + a 1_m 1_m^{\top} + \mathrm b \mathrm b^{\top} = \mbox{diag} (\mathrm x) + \begin{bmatrix} | & |\\ \sqrt{a} \, 1_m & \mathrm b\\ | & |\end{bmatrix} \begin{bmatrix} — \sqrt{a} \, 1_m^{\top} —\\ — \mathrm b^{\top} —\end{bmatrix}$$
Let $\mathrm D (\mathrm x) := \mbox{diag} (\mathrm x)$. Assuming that $x_i \neq 0$ for all $i \in [m]$, then $\mathrm D^{-1} (\mathrm x)$ exists and is
$$\mathrm D^{-1} (\mathrm x) = (\mbox{diag} (\mathrm x))^{-1} = \mbox{diag} \left(\frac{1}{x_1}, \frac{1}{x_2}, \dots, \frac{1}{x_m}\right)$$
$$(\mathrm A + \mathrm B)^{-1} = \mathrm D^{-1} (\mathrm x) - -\mathrm D^{-1} (\mathrm x) \begin{bmatrix} | & |\\ \sqrt{a} \, 1_m & \mathrm b\\ | & |\end{bmatrix} \left( \mathrm I_2 + \begin{bmatrix} — \sqrt{a} \, 1_m^{\top} —\\ — \mathrm b^{\top} —\end{bmatrix} \mathrm D^{-1} (\mathrm x) \begin{bmatrix} | & |\\ \sqrt{a} \, 1_m & \mathrm b\\ | & |\end{bmatrix} \right)^{-1} \begin{bmatrix} — \sqrt{a} \, 1_m^{\top} —\\ — \mathrm b^{\top} —\end{bmatrix} \mathrm D^{-1} (\mathrm x)$$
which looks somewhat intimidating but requires only the inversion of a $2 \times 2$ matrix, rather than the inversion of an $m\times m$ matrix.