# Find the determinant of $N \times N$ matrix

I have the following $$N \times N$$ matrix. $$\begin{vmatrix} 0 & 1 & 1 & \ldots & 1 \\ 1 & a_1 & 0 & \ldots & 0 \\ 1 & 0 & a_2 & \ldots & 0 \\ \vdots & \vdots& &\ddots& \vdots\\ 1 & 0 & 0 & \ldots & a_n \\ \end{vmatrix}$$

There seems to be a pattern going on for the determinant of the $$5 \times 5$$ version of this matrix, but I'm not sure how I would find the determinant for the $$N \times N$$ one.

• The conjecture is that, if $p=a_1a_2\dots a_n$, then the determinant is $-\sum_{i=1}^n\frac{p}{a_i}$. – egreg Nov 23 '18 at 23:41
• You can deduce how that pattern generalises from the Levi-Civita formula for the determinant. – J.G. Nov 23 '18 at 23:43
• @egreg That should be restated as $-\sum_i\prod_{j\ne I} a_j$, in case any of the $a_k$ are zero. – J.G. Nov 23 '18 at 23:44
• @J.G. I consider them as indeterminates. The determinant is then a polynomial in them. – egreg Nov 23 '18 at 23:46

Transform the matrix by the (determinant invariant) operation of adding $$-a_i$$ times the $$(i+1)$$th row on the first row. This gets us $$\begin{vmatrix} -\sum_i \frac{1}{a_i} & 0 & 0 & \ldots & 0 \\ 1 & a_1 & 0 & \ldots & 0 \\ 1 & 0 & a_2 & \ldots & 0 \\ \vdots & \vdots& &\ddots& \vdots\\ 1 & 0 & 0 & \ldots & a_n \\ \end{vmatrix}$$ Then you have a lower triangle matrix whose determinant is just the product of the diagonal elements.
You can determine the pattern by using the Leibniz formula for the determinant. This is given by $$|A| = \sum_{\sigma \in S_n} \operatorname{sgn}(\sigma)A_{1\sigma(1)}A_{2\sigma(2)} \cdots A_{n\sigma(n)}$$ where $$A$$ is an $$n \times n$$ matrix. What this formula does is essentially pick out exactly one element from each row and each column, multiply them all together, and then add up all the possible products you can form this way, multiplied by a sign that reflects the sign of the permutation that it took to form each product.
Because there are so many zeros in that matrix, a lot of possible terms get thrown out in this formula. In particular, going down the first column of that matrix, for each entry we can consider all the possible products that include that entry (and per the formula, no other entry from that column). (Doing this recursively gives you the Laplace cofactor expansion formula for the determinant.) As the first entry in that column is zero, we get nothing from this. For every $$i$$th entry thereafter, we look at all the possible products of elements with exactly one entry from each remaining row and column. For each column, the only possible choices are $$a_j$$ or 1, and in fact the only column for which it can be one is the $$i$$th column (it can't be $$a_i$$ for that column since $$a_i$$ comes from the $$i$$th row, from which an entry has already been picked from the first column). Therefore the only possible product we can form is that of multiplying all the $$a_j$$'s together, except for $$a_i$$. Letting $$p = a_1a_2\cdots a_n$$ per egreg's comment, this looks like $$p/a_i$$. Now we have to ask what is the sign of the permutation that got us this particular product. Most of the entries in this product lie along the main diagonal, so their row has the same index as their column. Thus they correspond to fixed elements of the permutation, which do not affect the sign. In fact, for each product there are only two columns from which an entry is picked from a row with a different index, and this corresponds to a transposition. Therefore the sign is always odd. This gives us the formula $$\sum_{i=1}^n p/a_i$$ as seen in egreg's comment.