How to calculate the determinant of a matrix with ... How to calculate the determinant using Laplace?
$$
\det \begin{bmatrix}
       -t & 0 & 0 & \dots & 0 & a_1           \\[0.3em]
       a_2 & -t & 0 & \dots & 0 & 0\\[0.3em]
       0 & a_3 & -t & \dots & 0 & 0\\[0.3em]
       \dots & \dots & \dots & \dots & \dots & \dots\\[0.3em]
       0 & 0 & 0 & \dots & -t & 0\\[0.3em]
       0 & 0 & 0 & \dots & a_n & -t\\[0.3em]
     \end{bmatrix}
$$
 A: Suppose we expand by cofactors using the top row:
$$ \det A = (-t)(-t)^{n-1} + (-1)^{n-1} a_1(a_2\ldots a_n) = (-t)^n + (-1)^{n-1} a_1 a_2\ldots a_n $$
with a sign depending on whether $n$ is even or odd, i.e.
$$ \det A = (-1)^n (t^n - a_1 a_2 \ldots a_n ) $$

This result may be connected with the (Frobenius) companion matrix for $t^n - b$ where $b = a_1 a_2 \ldots a_n$ by applying a sequence of row and column scalings.  Divide the second row by $a_2$, and then multiply the second column by the same factor (thus leaving the matrix determinant unchanged).  Continuing in this way up to the last row we accumulate the product $a_2 a_3 \ldots a_n$ in the next to last entry there (while leaving the diagonal entries $-t$ as they are).  Scaling the last row and last column similarly then puts the product $b$ of all $a_i$'s in the last entry of the first column, and the transformation to a "companion matrix" is completed:
$$ \begin{bmatrix}
       -t & 0 & 0 & \dots & 0 & b           \\[0.3em]
       1 & -t & 0 & \dots & 0 & 0\\[0.3em]
       0 & 1 & -t & \dots & 0 & 0\\[0.3em]
       \dots & \dots & \dots & \dots & \dots & \dots\\[0.3em]
       0 & 0 & 0 & \dots & -t & 0\\[0.3em]
       0 & 0 & 0 & \dots & 1 & -t\\[0.3em]
     \end{bmatrix} $$
