In a linear algebra book, I found the following problem.
Find the rank of the matrix
$$\begin{bmatrix} 1 & x & x & \dots & x\\ x & 1 & x & \dots & x\\ \vdots & \vdots & \vdots & \ddots & \vdots & \\ x & x & x & \dots & 1\end{bmatrix}$$
I used four pages of my scrap notebook to find some patterns for the $3 \times 3$ and $4 \times 4$ cases, where the matrix is reduced to triangular ones, and maybe prove by induction.
As I need to read ahead, I stopped spending time on this. Besides, I have a job. I guess there got to be a simple way to solve this problem. Does anyone have an idea?
Suggestion: As this is known to be duplicate, I might like to edit. Many solution to this problem I see in stackexchange uses the determinant of the given matix. Unfortunately, the problem appears before the section where the determinant is defined in a book I read (This is not a lie.)
Thus, I would like to know a solution which doesn't use determinant or eigenvalues or orthogonal space of {1, 1, ..., 1}.
Let $\bf e$ be the all $1$ colomn vector $[1,\ldots,1]^T$, and let $F={\bf e}^\bot$ which is the $(n-1)$-dimensional vector subspace orthogonal to $\bf e$, $$F=\{[u_1,\ldots,u_n]^T:u_1+\cdots+u_n=0\}$$ Finally, let the given matrix be denoted by $M$.
Clearly $M{\bf e}=(1+(n-1)x){\bf e}$ and $M{\bf u}=(1-x){\bf u}$ for every ${\bf u}\in F$. Thus, we have the following cases: