# Calculate determinant of matrix $n \times n$.

I have the following matrix $$A=\begin{bmatrix} a-x_1 &-x_1 &\cdots &-x_1\\ -x_2 &a-x_2 &\cdots &-x_2\\ \vdots &\vdots &\ddots &\vdots &\\ -x_n &-x_n &\cdots &a-x_n \\ \end{bmatrix}$$ where $a=1+\sum_{1}^{n}x_i.$ It seems determinant of $A$ has closed form. Can you help?

• Hint: can you perform any column/row operations makes this determinant easier to calculate? – jaslibra Nov 23 '17 at 5:23
• Ok, I can calculate it. I obtain $a^{n-1}$ – ALPHA Nov 23 '17 at 5:42

The matrix $B = A - aI$ consists of $n$ identical columns and thus has rank (at most) $1$. Therefore, $B$ has a $0$ eigenvalue with multiplicity (at least) $n-1$; the sole remaining eigenvalue must be equal to the trace of $B$, which is $\sum_i (-x_i) = 1 - a$. Therefore, the complete set of eigenvalues of $B$ is $$\underbrace{0,\ldots,0}_{n-1\text{ times}}, 1-a.$$ The eigenvalues of $A = B + aI$ are simply shifted upwards by $a$: $$\underbrace{a,\ldots,a}_{n-1\text{ times}},1,$$ so the determinant of $A$ is the product of these, namely $a^{n-1}$.
Subtract second column from first, third column from second, ..., $n$-th column from $(n-1)$-th and you get
$$A\sim a(I-C)$$
where $C$ is the companion matrix with $c_0=-x_1/a,\dots,c_{n-1}=-x_n/a$, using the notation of: https://en.wikipedia.org/wiki/Companion_matrix . The characteristic polynomial of $C$ is $$\chi_C(t)=\det(tI-C)=t^n-\frac{x_n}{a}t^{n-1}-\cdots-\frac{x_2}{a}t-\frac{x_1}{a},$$ so $$\det(A)=a^n\chi_C(1)=a^n\frac{a-x_n-\cdots-x_1}{a}=a^{n-1}.$$