<s>[INST] Calculate a determinant. Let $a_{1},  \cdots, a_{n}$ and $b$ be real numbers. I like to know the determinant of the matrix
$$\det\begin{pmatrix}
  a_{1}+b & b & \cdots & b \\
 b & a_{2}+b & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  b & b & \cdots & a_{n}+b
 \end{pmatrix}=?$$
I guess the answer is $$a_{1} \cdots a_{n}+ \sum_{i=1}^{n} a_{1} \cdots a_{i-1} b a_{i+1}\cdots a_{n} $$ after some direct calculations  for $n=2,3$. The question is how to calculate it for general $n$. Thanks!  
 [/INST] Applying multilinearity and an inductive argument:
$$\begin{vmatrix}
  a_{1}+b & b & \cdots & b \\
 b & a_{2}+b & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  b & b & \cdots & a_{n}+b
 \end{vmatrix}=\begin{vmatrix}
  a_{1} & b & \cdots & b \\
 0 & a_{2}+b & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  0 & b & \cdots & a_{n}+b
 \end{vmatrix}+\begin{vmatrix}
  b & b & \cdots & b \\
 b & a_{2}+b & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  b & b & \cdots & a_{n}+b
 \end{vmatrix}$$
$$=\begin{vmatrix}
  a_{1} & 0 & \cdots & b \\
 0 & a_{2} & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  0 & 0 & \cdots & a_{n}+b
 \end{vmatrix}+
\begin{vmatrix}
  a_{1} & b & \cdots & b \\
 b & b & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  b & b & \cdots & a_{n}+b
 \end{vmatrix}+
\begin{vmatrix}
 b & 0 & \cdots & b \\
 b & a_{2} & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  b & 0 & \cdots & a_{n}+b
 \end{vmatrix}+
\begin{vmatrix}
  b & b & \cdots & b \\
 b & b & \cdots & b \\
  \vdots  & \vdots  & \ddots & \vdots  \\
  b & b & \cdots & a_{n}+b
 \end{vmatrix}=\ldots$$
Note the very last determinant is zero.
For example:
$$\begin{vmatrix}a_1+b&b&b\\
b&a_2+b&b\\
b&b&a_3+b\end{vmatrix}=
\begin{vmatrix}a_1&b&b\\
0&a_2+b&b\\
0&b&a_3+b\end{vmatrix}+
\begin{vmatrix}b&b&b\\
b&a_2+b&b\\
b&b&a_3+b\end{vmatrix}=$$
$$=\begin{vmatrix}a_1&0&b\\
0&a_2&b\\
0&0&a_3+b\end{vmatrix}+
\begin{vmatrix}a_1&b&b\\
0&b&b\\
0&b&a_3+b\end{vmatrix}+
\begin{vmatrix}b&0&b\\
b&a_2&b\\
b&0&a_3+b\end{vmatrix}+
\begin{vmatrix}b&b&b\\
b&b&b\\
b&b&a_3+b\end{vmatrix}=\ldots$$
$$=a_1a_2a_3+b(a_1a_2+a_1a_3+a_2a_3)$$
and you were right.
</s>