# Determinant problem

Problem: Given a square, ${\displaystyle m\times m}$ matrix ${\displaystyle M}$ whose diagonal elements are each equal to ${\displaystyle m}$ and whose non-diagonal elements are each equal to ${\displaystyle -1}$, calculate its determinant.
${\displaystyle \Delta ={\begin{vmatrix}m&-1&-1&\dots &-1\\-1&m&-1&\dots &-1\\-1&-1&m&\dots &-1\\\vdots &\vdots &\vdots &\ddots &\vdots \\-1&-1&-1&\dots &m\end{vmatrix}}}$
What is ${\displaystyle \Delta }$ as a function of ${\displaystyle m}$?