Let us look at the the matrix

$ M =\begin{bmatrix} a & b & \dots & b \\ b & a & \dots & b \\ \vdots & b & \ddots & \vdots \\ b & \dots & b & a \end{bmatrix} $

It has one value $a$ on the main diagonal, and another value $b$ everywhere else. Let us assume that $a \neq b$. I wish to find the inverse of every $n\times n$ matrix of this form ($a$ on the diagonal, $b$ everywhere else).


marked as duplicate by amd, mrp, Namaste linear-algebra Jun 10 '17 at 12:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ There is probably a popular post asking the same question. $\endgroup$ – StubbornAtom May 28 '17 at 12:00
  • $\begingroup$ give me a link of that post? $\endgroup$ – jadey May 28 '17 at 12:07
  • $\begingroup$ Just look to the right. It’s the very first related question. $\endgroup$ – amd May 28 '17 at 18:11

Write $M=(a-b)I+bJ$ where $J$ is the all-one matrix. Try an inverse also of this form $N=xI+yJ$. Taking $I=MN$ will give you two equations in $x$ and $y$ which should be easily soluble.

  • $\begingroup$ i don't understand your answer.can you briefly tell me the answer.thanks $\endgroup$ – jadey May 28 '17 at 12:08
  • $\begingroup$ What do you get when you expand out $((a-b)I+bJ)(xI+yJ)$? @jadey $\endgroup$ – Lord Shark the Unknown May 28 '17 at 12:10
  • $\begingroup$ i don't know how to expand this.can you expand this for me,and tell me why you take M=(a-b)I + bJ , N = xI+yJ ? $\endgroup$ – jadey May 28 '17 at 12:20
  • $\begingroup$ @jadey Note that $J^2=nJ$. $\endgroup$ – egreg May 28 '17 at 13:07
  • $\begingroup$ @egreg can you provide me complete answer briefly? $\endgroup$ – jadey May 28 '17 at 13:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.