-2

$$A=\begin{pmatrix} a & b & b & \cdots & b \\ b & a & b & \cdots & b \\ b & b & a & \cdots & b \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ b & b & b & \cdots & a \end{pmatrix}$$

I have tried it in like $(a-b)I_n + bJ_n$, where $I_n$ is the identity matrix and $J_n$ is a matrix with all elements equal to $1$, form... I want to do that in a simpler way...

kabenyuk
  • 10,712
  • 1
    Welcome to MSE. Your question is phrased as an isolated problem, without any further information or context. This does not match many users' quality standards, so it may attract downvotes, or closed. To prevent that, please [edit] the question. This will help you recognise and resolve the issues. Concretely: please provide context, and include your work and thoughts on the problem. These changes can help in formulating more appropriate answers. – José Carlos Santos Dec 07 '21 at 10:08
  • This is a duplicate. Search this site! – Dietrich Burde Dec 07 '21 at 10:50
  • 1
    @DietrichBurde: (i) Please link to the duplicate question. (ii) Search for what, for heaven's sake? – TonyK Dec 07 '21 at 11:04
  • I don't understand why this question has all those downvotes. – TonyK Dec 07 '21 at 11:05
  • @TonyK (ii) Search for "what"? For the various duplicates, of course. Let me link to this one. There are many more. See also this duplicate on the determinant. – Dietrich Burde Dec 07 '21 at 11:38
  • 1
    @DietrichBurde: perhaps I wasn't clear. What search string should I use to search for a duplicate? If I try "matrix inverse", I get thousands of irrelevant hits. – TonyK Dec 07 '21 at 11:44
  • @TonyK I entered to google:"inverse of matrix with all diagonal entries equal". Then immediately the first five hits are all relevant for me. Among them the posts, where also all off-diagonal entries are equal. Did you try this? – Dietrich Burde Dec 07 '21 at 11:47
  • 1
    @DietrichBurde, that is sufficiently non-obvious that saying "Search this site!" to a new contributor can best be described as unsympathetic. – TonyK Dec 07 '21 at 11:55
  • @TonyK I am sorry. I always assume that the new contributors put at least some effort in looking up similar posts. But yes, if they just enter two words in their search, that is hardly an effort (sounds not nice, but how can you say a truth otherwise). And very often they just ignore to search at all. – Dietrich Burde Dec 07 '21 at 11:59

1 Answers1

1

I am quite surprised that what you did wasn't working for you. The way you started it is about as simple as it can get. Please soldier on until you find the solution. The only thing I would add: I would perhaps search for the solution of a slightly more general form: $xI_n+yJ_n$, where $I_n$ is the identity matrix and $J_n$ is the matrix filled with $1$'s.

So, try to solve:

$$A(xI_n+yJ_n)=I_n$$ i.e.

$$((a-b)I_n+bJ_n)(xI_n+yJ_n)=I_n+0J_n$$

for $x$ and $y$. This turns into a simple system of two equations with two unknowns. You may use that $J_n^2=nJ_n$.