<s>[INST] Calculation of determinant of an arrowhead matrix Is there any easier way to make sure the determinant of the following $n \times n$ matrix is $n$?
$$\begin{vmatrix}
  1 & -1 & -1 & -1 & \cdots & -1 \\
  1 &  1 &  0 &  0 & \cdots &  0 \\
  1 &  0 &  1 &  0 & \cdots &  0 \\
  1 &  0 &  0 &  1 & \cdots &  0 \\
  \vdots & \vdots &  \vdots & \vdots  & \ddots &  \vdots \\
  1 & 0 & 0 & 0 &\cdots  & 1
 \end{vmatrix} = n$$
I figured it with a smaller dimension and it indeed produces the determinant that is the size of dimension. I tried to do a cofactor expansion with the first row, and each term produces the determinant of $1$ and if you sum them up, then the total determinant will be $n$. But the sign change for each cofactor is confusing, and it is not easily seen that each cofactor term is actually positive $1$.
 [/INST] $$
 \begin{vmatrix}
  1 & -1 & -1 & -1 & \cdots & -1 \\
  1 &  1 &  0 &  0 & \cdots &  0 \\
  1 &  0 &  1 &  0 & \cdots &  0 \\
  1 &  0 &  0 &  1 &  &  0 \\
  \vdots & \vdots &  \vdots &   & \ddots &  \vdots \\
  1 & 0 & 0 & \cdots & 0 & 1
 \end{vmatrix} = 
 \begin{vmatrix}
  n & 0 & 0 & 0 & \cdots & 0 \\
  1 &  1 &  0 &  0 & \cdots &  0 \\
  1 &  0 &  1 &  0 & \cdots &  0 \\
  1 &  0 &  0 &  1 &  &  0 \\
  \vdots & \vdots &  \vdots &   & \ddots &  \vdots \\
  1 & 0 & 0 & \cdots & 0 & 1
 \end{vmatrix} =
n
$$
Note that in a triangular matrix its determinant equals the product of the diagonal entries.
</s>