0

Find the inverse of the matrix:

$\begin{bmatrix} -1 & 1 & 1 & \dots & 1 \\ 1 & -1 & 1 & \dots & 1 \\ ... & ... & ... & ... & ...\\ 1 & 1 & 1 & \dots & -1 \end{bmatrix}$

I tried adding the first line to each of the following lines, then dividing lines $2, 3,... n$ with 2, then changing the second line with the last one but I couldn't continue the algorithm.

Liviu
  • 1,886
  • 1
  • 10
  • 17

4 Answers4

4

Assume the inverse has the same structure as the given matrix \begin{eqnarray*} \begin{bmatrix} -1 & 1 & 1 & \cdots & 1 \\ 1 & -1 & 1 & \cdots & 1 \\ 1 & 1 & -1 & \cdots & 1 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & 1 & \cdots & -1 \end{bmatrix} \begin{bmatrix} 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{bmatrix}= \begin{bmatrix} 1 & 0 & 0 & \cdots & 0 \\ 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \cdots & 1 \end{bmatrix} \end{eqnarray*} Now solve \begin{eqnarray*} -a +(n-1)b=1 \\ a+(n-3)b=0 . \end{eqnarray*} This gives \begin{eqnarray*} b= \frac{1}{2(n-2)} \\ a=-\frac{n-3}{2(n-2)}. \end{eqnarray*}

Donald Splutterwit
  • 36,613
  • 2
  • 26
  • 73
2

This answer is intended to supplement Donald Splutterwit’s educated guess that the inverse has the same form as the original matrix.

You know that the inverse matrix is at least going to be symmetric since the original one is. You also know that (or can find out from other questions here) that the eigenvalues of a matrix that has $a$’s along the main diagonal and $b$’s elsewhere are $a+(n-1)b$, with multiplicity $1$, and $a-b$, with multiplicity $n-1$. Moreover, you can find by inspection that the first eigenspace is spanned by $[1,1,1,\dots,1]^T$, while a basis for the second eigenspace is $$\{[1,-1,0,0,\dots,0]^T,[1,0,-1,0,\dots,0]^T,\dots,[1,0,0,0,\dots,-1]^T\}.$$ Observe that this eigenbasis is valid for every matrix of this form, so that every such matrix can be generated by a suitable choice of eigenvalues. Working in the other direction, then, if we start with eigenvalues $\lambda$ and $\mu$, we can find the entries of the resulting matrix by solving the system $\lambda = a+(n-1)b$, $\mu = a-b$ for $a$ and $b$: $$a = b+\mu, b = {\lambda-\mu \over n}.$$ If the matrix is nonsingular, then the eigenvalues of its inverse are the reciprocals of its eigenvalues, with the same multiplicites and eigenspaces, and so the inverse matrix does indeed have the same form.

For your matrix, the eigenvalues are $n-2$ and $-2$, so the inverse eigenvalues are $\frac1{n-2}$ and $-\frac12$, and therefore the inverse matrix has $-{n-3\over2n-4}$ on the main diagonal and ${1\over2n-4}$ elsewhere. When $n=2$, the matrix is singular, as should be obvious by inspection.

amd
  • 53,693
0

For $2n+1$ and $2n$: $$\begin{pmatrix} -n&1&1&1&1\\ 1&-n&1&1&1\\ 1&1&-n&1&1\\ 1&1&1&-n&1\\ 1&1&1&1&-n\ \end{pmatrix}$$ times an appropriate constant.

0

If you denote by $E$ the matrix consisting of all ones, then you have $E^2=nE$ and $$A=E-2I.$$ From this you get $AE=(E-2I)E=E^2-2E=nE-2E=(n-2)E.$ Hence \begin{align*} AE&=(n-2)E\\ AE-(n-2)A&=2(n-2)I\\ A[E-(n-2)I]&=2(n-2)I\\ A\cdot\frac{E-(n-2)I}{2(n-2)}&=I \end{align*} and you get that $$A^{-1}=\frac{E-(n-2)I}{2(n-2)}.$$

You can find on this site also some posts about generalization of this question - with the values $\pm1$ replaced by some two real numbers. (I guess it is clear that approaches at least from some of the answers should also work more generally.) For example: Inverse of constant matrix plus diagonal matrix