A square matrix $M \in \mathbb{R}^{n \times n}$ is defined by
$$M_{i,j} = \begin{cases} 1 & \text{if } i=j \\ p & \text{otherwise}\end{cases}$$
where $M_{i,j}$ denotes the $(i,j)$-th entry. What is the "iff" condition for $p$ to make the matrix $M$ positive definite?
Given a matrix $M_{n\times n}$ defined as proposed, its eigenvalues are
$$ \{1-p,\cdots,1-p,1+(n-1)p\} $$ so the conditions are
$$ \cases{ 1-p > 0\\ 1+(n-1)p > 0 } $$
or
$$ -\frac{1}{n-1}< p < 1 $$