Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to calculate the determinant of $$ A=(a_{i,j})_{n \times n}=\left( \begin{array}{ccccc} a&b&b& \cdots & b\\ b& a& b& \cdots& b\\ \vdots& \vdots& \vdots& \ddots&\cdots\\ b&b&b & \cdots&a \end{array} \right)? $$

share|cite|improve this question
May be you should accept some answers.... – Tapu Jul 2 '12 at 19:10
up vote 3 down vote accepted

We note that the sum of the elements of each column is $a+(n-1)b$ for each column, hence $$\det A=(a+(n-1)b)\det\pmatrix{1&1&\dots& 1&1\\ b&a&\dots&b&b\\ \vdots&\ddots&\ddots&\vdots&\vdots\\ b&b&\dots&b&a}.$$ To each row of index $\geq 2$, we do $R_j\leftarrow bR_1$ to get $$\det A=(a+(n-1)b)\det\pmatrix{1&1&\dots& 1&1\\ 0&a-b&\dots&0&0\\ \vdots&\ddots&\ddots&\vdots&\vdots\\ 0&0&\dots&0&a-b}.$$ Finally, we obtain $$\det A=(a+(n-1)b)(a-b)^{n-1}.$$

share|cite|improve this answer

HINT 1: Your matrix $A$ is $$(a-b)I + b e e^T$$

Can you now compute the determinant?

Move your mouse over the gray area below for another hint.

HINT 2: Make use of the fact that $\det(\lambda A) = \lambda^n \det(A)$

Move your mouse over the gray area below for another hint.

HINT 3: $\det(I + \alpha e e^T) = (1+n \alpha)$ where $e$ is a column vector of ones.

Move your mouse over the gray area for the complete answer.

$$\det ((a-b)I + b e e^T) = (a-b)^n \det \left( I + \dfrac{b}{a-b} e e^T\right)$$ Hence, all we need is to find the determinant of $I + \alpha ee^T$, where $\alpha = \dfrac{b}{a-b}$ in our case. Note that $ee^T$ is a rank one matrix and its eigen values are $e^Te = n$ and $n-1$ zeros. If $\lambda$ is an eigen value of $I + \alpha ee^T$, then $$\det (I + \alpha ee^T - \lambda I) = \alpha^n \det \left(ee^T + \dfrac{(1-\lambda)}{\alpha}I \right) = 0$$ This means that $-\dfrac{(1-\lambda)}{\alpha}$ are the eigenvalues of $ee^T$. Hence, we get that $$-\dfrac{(1-\lambda)}{\alpha} = n \text{ or }0 \text{ ($n-1$ times)}.$$ Hence, we get that $$\lambda = 1 + n \alpha, 1 \text{ ($n-1$ times)}$$ Hence, $$\det ((a-b)I + b e e^T) = (a-b)^n \times \left( 1 + n \dfrac{b}{a-b} \right) = (a-b)^{n-1} (a+(n-1)b)$$

share|cite|improve this answer
This is made especially easy using Sylvester's determinant theorem – copper.hat Jul 2 '12 at 19:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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