1

For a square matrix $M$, the group inverse of $M$, denoted by $M^\#$, is the unique matrix $X$ such that $MXM=M$, $XMX=X$ and $MX=XM$.

Given an $n \times n$ matrix $M$, let $I_n$ denote the identity matrix of size $n$ and $J_{n\times n}$ denote the $n\times n$ matrix with all entries equal to one. How to compute $(M+aI_n-\frac{a}{b}J_{n\times n})^\#$?

For example, if $b=n$, then $(M+aI_n-\frac{a}{n}J_{n\times n})^\#=(M+aI_n)^{-1}-\frac{1}{an}J_{n\times n}$. What about $b\neq n$?

Thanks a lot.

Ralph
  • 77

1 Answers1

0

The matrix $K := -\frac{a}{b} J_{n \times n}$ has rank $1$, so it is given by the outer product of two vectors (namely, $e = (1, \ldots, 1)^T$ and $-\frac{a}{b} e$), and so we can apply the Sherman-Morrison formula, which applies in exactly this situation: Applying the formula given in the link we get

$(M + aI_n + K)^{\#} = (M + a I_n)^{\#} - \frac{(M + a I_n)^{\#} K (M + a I_n)^{\#}}{1 - \frac{a}{b} e^T (M + a I_n)^{\#} e}$.

Note that for any $n \times n$ matrix $C$ that $e^T C e$ is just the sum of the entries of $C$.

Travis Willse
  • 99,363