I have the following matrix with dimensions $n \times n$ ($z\in\mathbb R$ and $n\in\mathbb N$):
$$\begin{bmatrix} z & 1 & 1 & \cdots & 1 \\ 1 & z & 1 & \cdots & 1 \\ 1 & 1 & z & \cdots & 1 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & 1 & \cdots & z \\ \end{bmatrix}$$
I need to find the determinant of it. I came up with the term $(z-1)^{n-1} (z+(n-1))$ after finding out the determinants for $n=1, n=2, n=3, n=4$, etc. Now my question is, how can I proof it that this
Thanks in advance.
Your matrix is of the form $(z-1) I_n +\boldsymbol{1}^{\rm T}_n \boldsymbol{1}_n$ (a diagonal matrix plus a rank-one matrix.) There is information available for the eigenvalues.