Let $A\in\mathcal{M}_{n\times n}(\mathbb{R})$ with diagonal entries $b$ and non-diagonal entries $c$... Find necessary and sufficient conditions on $b$ and $c$ so that $A$ is singular. 
I worked out the $2\times 2$, $3\times 3$, and $4\times 4$ cases and found that we must have $b=\pm c$. I could do an inductive step and reduce cofactors down to the simplest cases, but is there a better way to do this? Thanks in advance! 
 A: Your matrix is of the form $$A=(b-c)I + cE,$$ where $E$ is the matrix with all its entries equal to 1. Since $E=ee^*$, where $e$ is the vector with all entries equal to $1$, the rank of $E$ is one. From $E^2=nE$, we get that the eigenvalues of $E$ are $0$ and $n$. So $cE$ has eigenvalues $0$ and $cn$ (and the multiplicity of $0$ is $n-1$, but we don't need that here). 
Finally, adding a scalar multiple of the identity to $cE$, its eigenvalues are shifted by such multiple. That is, the eigenvalues of $A$ are $$b-c+0=b-c,\ \ \ \text{ and } \ \ b-c+nc=b+(n-1)c.
$$
So $A$ will be singular precisely when $b-c=0$ or $b+(n-1)c=0$. 
A: Alternative: linear equation, or rank of matrices
$\boldsymbol A$ is singular iff $\boldsymbol {Ax=0}$ has non-trivial solutions iff $\mathrm {rank}(\boldsymbol A) = n$. 
Clearly, $\boldsymbol {A}$ is row-equivalent to
$$
\begin{bmatrix}
b & c & c & \cdots &c&c\\
c & b & c &\cdots &c &c\\
c & c & b & \cdots & c&c\\
\vdots & \vdots & \vdots & \ddots & \vdots &\vdots \\
c & c & c & \cdots & b & c\\
b+(n-1)c & b+(n-1)c & b+(n-1)c & \cdots & b+(n-1)c & b+(n-1)c 
\end{bmatrix}. 
$$
Thus $b + (n-1)c =0 \implies \boldsymbol A$ is singular [since the rank is not full]. 
If $b + (n-1)c \neq 0$, then the matrix above is row-equivalent to 
$$
\begin{bmatrix}
b-c & 0 & 0 & \cdots &0&0\\
0 & b-c & 0 &\cdots &0&0\\
0& 0 & b-c & \cdots & 0&0\\
\vdots & \vdots & \vdots & \ddots & \vdots &\vdots \\
0 & 0 & 0 & \cdots & b-c & 0\\
1 & 1 & 1 & \cdots & 1& 1
\end{bmatrix}. 
$$
Then $b=c \implies \boldsymbol A$ is singular. 
Clearly, if $\boldsymbol A$ is singular, then by the same row operations, the two equations above are the only possibilities. Hence the result: $\boldsymbol A$ is singular $\iff b=c$ or $b +(n-1)c =0$. 
