Is there any elegant way to calculate the determinant of the $~n\times n~$ symmetric matrix $~M~$, where the $(i,j)$ term is defined by:
$$M_{ij}=m_i+m_j$$
with $0\le m_i, m_j \le1$
The solution will be in terms of $m_i$ and $m_j$. Any suggestions are highly appreciated.
Note that $M$ = $\begin{bmatrix}m_1&m_2&\cdots&m_n\\m_1&m_2&\cdots&m_n\\\vdots&\vdots&\ddots&\vdots\\m_1&m_2&\cdots&m_n\end{bmatrix} + \begin{bmatrix}m_1&m_1&\cdots&m_1\\m_2&m_2&\cdots&m_2\\\vdots&\vdots&\ddots&\vdots\\m_n&m_n&\cdots&m_n\end{bmatrix}$.
Hence, $M$ is the sum of two rank-$1$ matrices. Therefore, $M$ has rank at most $2$.
So, if $n \ge 3$, then $M$ is rank deficient, and thus, $\det M = 0$.
If $n = 1$, then $M = \begin{bmatrix} 2m_1 \end{bmatrix}$ and $\det M = 2m_1$.
If $n = 2$, then $M = \begin{bmatrix}2m_1 & m_1+m_2 \\ m_1+m_2 & 2m_2\end{bmatrix}$, and $\det M = -(m_1-m_2)^2$.