$$A_{n\times n}=\begin{bmatrix}a & b & b & b &. &.&.&&b\\b & a &b&b&.&.&.&&b\\b & b &a&b&.&.&.&&b\\b & . &.&.&.&.&.&&b\\b & . &.&.&.&.&.&&b\\b & b &b&b&.&.&.&&a\end{bmatrix}\text{ where } a+(n-1)b =0$$

Define $l^t=\begin{bmatrix}1&1&1&1&1&....1\end{bmatrix}$ Where $l$ is a $ n\times1$ vector, and:

$$B= A+ \frac{l\cdot l^t}{n}$$

Prove that $B$ is non singular and that $AB^{-1}A=A$

What i did:

$\text{A has a 0 eigenvalue , so A is a singular matrix}$ $\text{B has an eigenvalue of 1 with eigenvector} $$\,\, v^{t}= \begin{bmatrix}1&1&1&1&1&....1\end{bmatrix}$

Any idea about how to proceed?


  • $\begingroup$ I am missing something here. $l.l^t$ is a $1\times1$ matrix and there fore $\frac1nl.l^t$ cannot be added to $A$. Did you mean $\frac1nl^t.l$? $\endgroup$ Feb 28, 2018 at 7:22
  • $\begingroup$ yes, sorry..corrected $\endgroup$
    – DRPR
    Feb 28, 2018 at 7:28
  • $\begingroup$ it seems that $B=\frac1n C$ where $C_{i,j}=\begin{cases}nb+1,&i\neq j\\na+1,&i=j\end{cases}$. If $B$ is not singular then it would be enough to show that the column vectors (or row vectors) of $C$ are linearly independent. $\endgroup$
    – Masacroso
    Feb 28, 2018 at 7:35
  • $\begingroup$ @JoséCarlosSantos Erm, if $l$ is $n\times 1$, then $l\,l^t$ is $n\times n$. $\endgroup$
    – Christoph
    Feb 28, 2018 at 8:54
  • $\begingroup$ @Christoph My bad. I read $l=\begin{bmatrix}1&1&1&1&1&\ldots&1\end{bmatrix}$, instead of readind $l^t=\begin{bmatrix}1&1&1&1&1&\ldots&1\end{bmatrix}$. $\endgroup$ Feb 28, 2018 at 9:03

3 Answers 3


Let $\mathbf{1}_n$ denote the $n\times n$ matrix with all entries equal to one and $E_n$ denote the $n\times n$ identity matrix. Then $$ A_n = b\mathbf 1_n + (a-b)E_n = b\mathbf 1_n -nbE_n $$ and $$ B_n = A_n + \frac{1}{n}\mathbf 1_n = \left(b+\frac{1}{n}\right)\mathbf 1_n - nbE_n. $$

In general, for a matrix $X_n=\alpha \mathbf 1_n + \beta E_n$, that is $$ X = \begin{pmatrix} \alpha+\beta & \alpha & \alpha & \cdots & \alpha \\ \alpha & \alpha+\beta & \alpha & \cdots & \alpha \\ \alpha & \alpha & \alpha+\beta & \cdots & \alpha \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ \alpha & \alpha & \alpha & \cdots & \alpha+\beta \end{pmatrix}, $$ we can calculate the determinant by first subtracting the second row from the first to get

$$ \det X_n = \det \begin{pmatrix} \beta & -\beta & 0 & \cdots & 0 \\ \alpha & \alpha+\beta & \alpha & \cdots & \alpha \\ \alpha & \alpha & \alpha+\beta & \cdots & \alpha \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ \alpha & \alpha & \alpha & \cdots & \alpha+\beta \end{pmatrix}, $$ and then Laplace expand with respect to the first row to obtain $$ \det X_n = \beta \det X_{n-1} + \beta \det \begin{pmatrix} \alpha & \alpha & \cdots & \alpha \\ \alpha & \alpha+\beta & \cdots & \alpha \\ \vdots & \vdots & \ddots & \vdots \\ \alpha & \alpha & \cdots & \alpha+\beta \end{pmatrix}. $$ For the second matrix, subtract the first row from all others to get $$ \det X_n = \beta \det X_{n-1} + \beta \det \begin{pmatrix} \alpha & \alpha & \cdots & \alpha \\ 0 & \beta & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \beta \end{pmatrix} = \beta \det X_{n-1} + \alpha \beta^{n-1} $$ Since $\det X_1=\alpha+\beta$, this recursion yields $$\det X_n=n\alpha\beta^{n-1} +\beta^n=\beta^{n-1}(n\alpha+\beta).$$ Thus, $X_n$ is invertible if and only if $\beta\neq 0$ and $n\alpha+\beta\neq 0$. In this case, we may guess that (or consider the adjugate to see that) $X^{-1}$ is of the form $X^{-1} = \gamma \mathbf 1 + \delta E_n$ as well and work out that $$ X^{-1} = -\frac{\alpha}{\beta(n\alpha+\beta)} \mathbf 1_n + \frac{1}{\beta} E_n. $$

In the example at hand, $$ \det B_n = (-nb)^{n-1}(n\left(b+\frac{1}{n}\right)-nb)= (-nb)^{n-1} $$ which is non-zero if and only if $b$ is non-zero. And $$ B_n^{-1} = \frac{nb+1}{n^2b} \mathbf 1_n - \frac{1}{nb} E_n. $$

However, to check that $AB^{-1}A=A$ is satisfied it is enough to show $A^2=AB$, since all matrices of the given form commute.

  • $\begingroup$ . I did try to upvote but there is an error. $\endgroup$
    – DRPR
    Feb 28, 2018 at 12:15
  • $\begingroup$ @Christoph We had an error. I improved the formula for $B$. Correctly $B_n=A_n+(1/n)1_t$ what gives eigenvalue $1$ as suggested by OP. Interesting that despite the error the final result is the same. $\endgroup$
    – Widawensen
    Mar 2, 2018 at 16:05
  • $\begingroup$ @Widawensen Thanks, fixed it. $\endgroup$
    – Christoph
    Mar 2, 2018 at 20:19

In this new answer I would like to propose some other approach to the second part of the question without direct calculating inverse of $B$.

We know form of $A$ and $B$ $$ A = b\mathbf 1_n -nbE $$

$$ B = \left(b+\dfrac{1}{n}\right)\mathbf 1_n - nbE_n. $$

They are both polynomials of the same matrix so their multiplication is commutative. Also $B^{-1}$ can be expressed as such polynomial.

The solution below exploits simply multiplication commutativity of type $a_1\mathbf 1_n+a_0E$ matrices. Taking this into account the equation $AB^{-1}A=A$ can be transformed to the much more friendly form.


The last equation can be written down as $\dfrac{1}{n}(b\mathbf 1_n -nbE)\mathbf 1_n =0$ and taking into account that $\mathbf 1_n^2 =n\mathbf 1_n$ indeed $b\mathbf 1_n-b\mathbf 1_n=0$.

  • $\begingroup$ @Neelotpaldas Summarizing all proposed solutions of the problem the easiest way to answer both questions seems to be. 1. To calculate $A,B $ as functions $b$. Christoph 2. To calculate eigenvalues of $B$ and show that they are non-zero 3. To prove $B^{-1}$ has the same form as $B$ 4. To prove multiplication commutativity and to exploit it in the final proof of equation. $\endgroup$
    – Widawensen
    Mar 2, 2018 at 8:34
  • $\begingroup$ Why do you need that $B^{-1}$ is of the same form? You just need that $\mathbb 1_n$ and $E_n$ commute, right? $\endgroup$
    – Christoph
    Mar 2, 2018 at 8:52
  • $\begingroup$ @Christoph I want to exploit the fact that matrices of form $a_01_n+a_1E$ commute, so we need to know that $B^{-1}$ has the same form. Of course, $1_n$ and $E_n$ also commute what is important in the proof of earlier mentioned commutativity... $\endgroup$
    – Widawensen
    Mar 2, 2018 at 8:56
  • $\begingroup$ As long as $AB=BA$, you get from $AB^{-1}A = A$ to $A^2=AB$. No need to commute with $B^{-1}$. $\endgroup$
    – Christoph
    Mar 2, 2018 at 8:58
  • $\begingroup$ @Christoph How to obtain $A^2=AB$ without commutativity of $B^{-1}$? $\endgroup$
    – Widawensen
    Mar 2, 2018 at 9:01

This answer concerning non-singularity of $B$ is based on notation used by Christoph and it is inspired by him.
The determinant can be calculated also in other way with the use of eigenvalues.

We have $$ B_n = \left(b+\dfrac{1}{n}\right)\mathbf 1_n - nbE_n. $$

Eigenvalues $\lambda_i$ of $\mathbf 1_n$ (it is rank $1$ symmetric matrix) are:
the single value equal to $n$ (with eigenvector $[ 1 \ \ 1 \ \ \dots \ \ 1]^T$) and $n-1$ values of $0$.

$B_n$ is polynomial $p(\mathbf 1_n)$ so its eigenvalues are $p(\lambda_i)$.

In this case $n$ is transformed into $\left(b+\dfrac{1}{n}\right)n-nb=1$ and zeros are transformed into $-nb $. Therefore determinant (product of eigenvalues) is equal $(-nb)^{n-1}$.

Finally one can explain in a different way also why inverse of matrix $B$ has also form $c_i\mathbf 1_n+d_iE_n$, what leads to calculations of coefficients $c_i,d_i$.

It follows directly from the fact the every inverse can be expressed as polynomial of its matrix (what can be obtained from characteristic equation and Cayley-Hamilton theorem).

Now because powers of $\mathbf 1_n$ are matrices of the form $t\mathbf 1_n$ (what is easy to check) , where $t$ is some scalar, then also polynomial of $B$ has to have form $c_p\mathbf 1_n+d_pE_n$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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