<s>[INST] How does this determinant calculation work? Given that $a_0, a_1,...,a_{n-1} \in \mathbb{C}$ I am trying to understand how the following calculation for the determinant of the following matrix follows:
$$
\text{det}
\begin{bmatrix}
  x & 0 & 0 & ... & 0 & a_0 \\
  -1 & x & 0 & ... & 0 & a_1 \\
  0 & -1 & x & ... & 0 & a_2 \\
  . \\
  . \\
  . \\ 
  0 & 0 & 0 & ... & -1 & x + a_{n-1} \\ 
\end{bmatrix}
\\ =
(x) \text{ det}
\begin{bmatrix}
  x & 0 & 0 & ... & 0 & a_1 \\
  -1 & x & 0 & ... & 0 & a_2 \\
  0 & -1 & x & ... & 0 & a_3 \\
  . \\
  . \\
  . \\ 
  0 & 0 & 0 & ... & -1 & x + a_{n-1} \\ 
\end{bmatrix}
+
\text{det}
\begin{bmatrix}
  0 & 0 & ... & 0 & a_0 \\
  -1 & x & ... & 0 & a_2 \\
  . \\
  . \\
  . \\ 
  0 & 0 &  ... & -1 & x + a_{n-1} \\ 
\end{bmatrix}
\\ = x(x^{n-1} + a_{n-1}x^{n-2}+...+a_1) + (-1)^{n-1}\text{det}
\begin{bmatrix}
  -1 & x & ... & 0 & a_2 \\
  . \\
  . \\
  . \\
  0 & 0 & ... & -1 & x + a_{n-1} \\
  0 & 0 &  ... & 0 & a_0 \\ 
\end{bmatrix}
$$
I do not understand:
(1) how the determinant can be broken up into the sum of the determinants of the 2 smaller matrices and (2) how are the determinants of the 2 smaller matrices what they are?
 [/INST] If $A=(a_{i,j}) \in M_n(\mathbb{C})$, $$\det(A) = \sum_{k=1}^{n} (-1)^ka_{1,k} \det(\Delta_{1,k}) $$
Where $\Delta_{1,k}$ is A minus the column and the line of $a_{1,k}$
Here the sum only has 2 terms because others are equals to $0$.
</s>