TITLE: Regularity of a matrix
QUESTION [0 upvotes]: For which $a, b \in\mathbb{R}$ is the matrix $A \in\mathbb{M_n}$ regular
$$A=\begin{bmatrix}a&b&\cdots&b\\b&a&\cdots&b\\\vdots& &\ddots&\vdots\\b&b&\cdots&a\end{bmatrix}$$
I know that in order for a matrix to be a regular one, it needs to be $A  X = I$ where $X$ is the inverse of the matrix $A$.

REPLY [0 votes]: If by regular you mean nonsingular, i.e. has an inverse, then $A$ is regular iff $a \neq b, b(1-n)$. One (rather high-powered) way to see this is via the following two facts: 
i) a real matrix $A$ is nonsingular iff $0$ is not an eigenvalue of $A$, and
ii) If $A$ has eigenvalues $\lambda_1, ..., \lambda_n$, then $A + aI$ has eigenvalues $\lambda_1 + a, ..., \lambda_n + a$ (adding a scalar multiple of the identity shifts the spectrum by that scalar).
For the particular $A$ above, we may write $A = (a - b)I_n + bJ_n$, where $J$ is the matrix of all $1$'s:
$$J_n := 
\begin{bmatrix}
1 & \cdots & 1 \\
\vdots & \ddots & \vdots \\
1 & \cdots & 1
\end{bmatrix}
$$
It's not hard to check that $J_n$ is a rank $1$ matrix and has $[1 \cdots 1]^T$ (the vector of all $1$'s) as an eigenvector, so the eigenvalues of $bJ_n$ are $bn, 0, ..., 0$. Thus the eigenvalues of $A$ are $(a-b)+bn, a-b, ..., a-b$, so $A$ is invertible iff $a \neq b, b(1-n)$.
{"set_name": "stack_exchange", "score": 0, "question_id": 629590}