0
$\begingroup$

I want to find the inverse of this $n\times n$ matrix, assuming it is invertible. The condition of invertible is discussed at Rank of the $n \times n$ matrix with ones on the main diagonal and $a$ off the main diagonal.

Now assume it is invertible. I need to find the inverse.

\begin{pmatrix} 1 & a & a & \cdots & \cdots & a \\ a & 1 & a & \cdots & \cdots & a \\ a & a & 1 & a & \cdots & a \\ \vdots & \vdots & a& \ddots & & \vdots\\ \vdots & \vdots & \vdots & & \ddots & \vdots \\ a & a & a & \cdots &\cdots & 1 \end{pmatrix}

$\endgroup$
6
  • 6
    $\begingroup$ Sometimes they write capital $J$ for the square matrix with all entries $1.$ Then $J^2 = n J, \; $ and you can try to find $x,y$ so that $(xI + y J) ( (1-a)I + a J) = I.$ $\endgroup$
    – Will Jagy
    Commented Sep 27, 2022 at 2:14
  • $\begingroup$ @WillJagy so there is no closed form of the inverse matrix? $\endgroup$
    – Jonathen
    Commented Sep 27, 2022 at 2:50
  • 2
    $\begingroup$ do me a favor, expand $(xI + yJ)((1-a)I + a J )$ and give the final coefficients of $I$ and $J$ $\endgroup$
    – Will Jagy
    Commented Sep 27, 2022 at 2:53
  • $\begingroup$ @WillJagy I get 2 equations. $x(1-a)=1$ and $xa+y-ya+yan=0$ $\endgroup$
    – Jonathen
    Commented Sep 27, 2022 at 3:02
  • 2
    $\begingroup$ So, given $a \neq 1,$ what are $x$ and $y?$ $\endgroup$
    – Will Jagy
    Commented Sep 27, 2022 at 3:05

2 Answers 2

2
$\begingroup$

$$ {\bf M}_n (a) := \begin{bmatrix} 1 & a & a & \dots & a & a\\ a & 1 & a & \dots & a & a\\ a & a & 1 & \dots & a & a\\ \vdots & \vdots & \vdots & \ddots & \vdots & \vdots\\ a & a & a & \dots & 1 & a\\ a & a & a & \dots & a & 1\end{bmatrix} = (1-a) {\bf I}_n + a {\bf 1}_n {\bf 1}_n^{\top} $$

Using Sherman-Morrison,

$$ {\bf M}_n^{-1} (a) = \cdots = \color{blue}{\frac{1}{1 - a} \left( {\bf I}_n - \frac{a}{1 + (n-1) a} {\bf 1}_n {\bf 1}_n^{\top} \right)} $$

which is the matrix that Greg obtained via other means.

$\endgroup$
1
$\begingroup$

If $\def\o{{\tt1}}J$ is the $(n\times n)$ all-ones matrix, then $P=\frac{\o}nJ$ is a projector, i.e. $P^2=P.$

There is a general formula for functions of such matrices: $$ \def\a{\alpha}\def\b{\beta}\def\l{\lambda} \def\LR#1{\:\left[#1\right]} f(\l P+\b I) = f(\l+\b)\,P + f(\b)\,(I-P) $$ The matrix in question can be written as $$\eqalign{ A &= aJ + (\o-a)\,I \\ &= (an)\,P + (\o-a)\,I \\ &\equiv \l P + \b I \\ }$$ Choosing $\:f(A)=A^{-1}\:$ yields $$\eqalign{ A^{-1} &= \frac{P}{\l+\b} + \frac{I-P}{\b} \\ &= \frac{\o}{\b}\LR{I-\frac{\l P}{\l+\b}} \\ &= \frac{\o}{\o-a}\LR{I-\frac{aJ}{an-a+\o}} \\ }$$

$\endgroup$
2
  • 1
    $\begingroup$ @RodrigodeAzevedo It's from Chapter 1 of Higham's Functions of Matrices $\,$ (I can't remember if it's shown as a theorem or as one of the problems in the appendix) $\endgroup$
    – greg
    Commented Oct 2, 2022 at 14:54
  • $\begingroup$ Thank you. When you can find some time, please consider providing a reference to Higham's book. $\endgroup$ Commented Oct 2, 2022 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .