Find the determinant, inverse of a matrix and under what condition it is positive The matrix is 
$B=[(1-\rho)I_n+\rho\textbf{1}\textbf{1}']$ where $\textbf{1}=[1\;\cdots\;1]'$, an $n\times 1$ vector with every entry $1$.
So what's the determinant, inverse of this matrix and under what condition it is positive?
(I just know the matrix is equal to $\begin{bmatrix}
1 &\rho  & \cdots & \rho\\ 
 \rho& 1 &\cdots  & \rho\\ 
 \cdots&\cdots  &\cdots  &\cdots \\ 
\rho & \rho & \cdots & 1
\end{bmatrix}$, but what's then?)
 A: Let 
$$
\mathbf{u}_1 := \frac{1}{\sqrt{n}}(1,1,\cdots,1)^T,
$$
and complete it to an orthonormal basis $\{\mathbf{u}_1,\dotsc,\mathbf{u}_n\}$ of $\mathbb{R}^n$. Then
$$
 B = (1-\rho)I_n + \rho \mathbf{1} \mathbf{1}^T\\
 = (1-\rho)\sum_{k=1}^n\mathbf{u}_k \mathbf{u}_k^T + n\rho\mathbf{u}_1 \mathbf{u}_1^T\\
 = (1+(n-1)\rho) \mathbf{u}_1 \mathbf{u}_1^T + \sum_{k=2}^n (1-\rho) \mathbf{u}_k \mathbf{u}_k^T,
$$
so that $B$ is either orthogonally diagonalisable with distinct eigenvalues $1+(n-1)\rho$ with multiplicity $1$ and $1-\rho$ with multiplicity $n-1$, or $B = 0$. In the non-trivial case, then,
$$
 \det(B) = (1+(n-1)\rho)(1-\rho)^{n-1},
$$
and $B$ is positive if and only if $1+(n-1)\rho > 0$ and $1-\rho > 0$, if and only if
$$
 -\frac{1}{n-1} < \rho < 1.
$$
Finally, if $B$ is invertible, i.e., if $1+(n-1)\rho \neq 0$ and $1-\rho \neq 0$, or equivalently,
$$
 \rho \neq 1, \quad \rho \neq -\frac{1}{n-1},
$$
then
$$
 B^{-1} = \frac{1}{1+(n-1)\rho}\mathbf{u}_1\mathbf{u}_1^T + \sum_{k=2}^n \frac{1}{1-\rho} \mathbf{u}_k \mathbf{u}_k^T\\
= \left(\frac{1}{1+(n-1)\rho} - \frac{1}{1-\rho} \right)\mathbf{u}_1 \mathbf{u}_1^T + \frac{1}{1-\rho}\sum_{k=1}^n \mathbf{u}_k \mathbf{u}_k^T\\
= \frac{1}{1-\rho} I_n - \frac{n}{(1-\rho)(1-(n-1)\rho)}\mathbf{u}_1\mathbf{u}_1^T\\
= \frac{1}{1-\rho} I_n - \frac{1}{(1-\rho)(1-(n-1)\rho)} \mathbf{1}\mathbf{1}^T.
$$
A: If we subtract the first row from all of the remaining rows, we obtain the matrix
$$\begin{bmatrix}
1 &\rho  & \rho & \cdots & \rho\\ 
\rho-1& 1-\rho & 0 & \cdots  & 0\\ 
\rho-1 & 0 & 1-\rho & \cdots  & 0\\ 
 \cdots&\cdots  &\cdots  &\cdots \\ 
\rho-1 & 0 & 0 & \cdots & 1-\rho
\end{bmatrix}$$
which has the same determinant (link).
If we compute the determinant, we obtain:  $$(1-\rho)^{n-1}-(n-1) \times \rho(\rho-1)(1-\rho)^{n-2}$$ accounting for the diagonals marked with $(*)$ below:
$$\begin{bmatrix}
1 (*) & \rho & \rho & \cdots & \rho\\ 
\rho-1 & 1-\rho (*) & 0 & \cdots  & 0\\ 
\rho-1 & 0 & 1-\rho (*) & \cdots  & 0\\ 
 \cdots&\cdots  &\cdots  &\cdots \\ 
\rho-1 & 0 & 0 & \cdots & 1-\rho (*)
\end{bmatrix}$$
for the first term
$$\begin{bmatrix}
1 & \rho (*)& \rho & \cdots & \rho\\ 
\rho-1 (*) & 1-\rho & 0 & \cdots  & 0\\ 
\rho-1 & 0 & 1-\rho (*)  & \cdots  & 0\\ 
 \cdots&\cdots  &\cdots  &\cdots \\ 
\rho-1 & 0 & 0 & \cdots & 1-\rho (*)
\end{bmatrix}, \qquad \begin{bmatrix}
1 & \rho & \rho (*)& \cdots & \rho\\ 
\rho-1 & 1-\rho (*) & 0 & \cdots  & 0\\ 
\rho-1 (*) & 0 & 1-\rho  & \cdots  & 0\\ 
 \cdots&\cdots  &\cdots  &\cdots \\ 
\rho-1 & 0 & 0 & \cdots & 1-\rho (*)
\end{bmatrix}, \qquad \text{etc.}$$
for the second term (noting that there are $n-1$ ways this type of diagonal can be found).
The above equation simplifies to $$\det=(1-(n-1)\rho)(1-\rho)^{n-1}.$$
