Can anyone provide the analytical solution of the following $n\times n$ system of linear equations
$\underbrace{\begin{pmatrix} a & -b & -b & ... & -b\\ -b & a & -b & ... & -b\\ -b & -b & a & ... & -b\\ : & : & : & ... & : \\ : & : & : & ... &: & \\ -b & -b & -b & ... & a \\ \end{pmatrix}}_{A}\underbrace{\begin{pmatrix}x_1\\ x_2\\ x_3\\ :\\ :\\ x_n \end{pmatrix}}_{X}=\underbrace{\begin{pmatrix}y_1\\ y_2\\ y_3\\ :\\ :\\ y_n \end{pmatrix}}_{Y} $ where $A_{(n\times n)}$ is a symmetric matrix and $a$, $b$, $y_i$ are positive real numbers.
Note: I would appreciate if someone could provide more details about the theory of eigenvalues-eigenvectors related to the solutuion of a linear system of eaquations.
You can write your equations as $$ \left((a+b)I-b\mathbb{1}\mathbb{1}^T\right)x=y\ ,$$ where $\ \mathbb{1}\ $ is the column vector whose entries are all $1$. Multiplying this equation on the left by the row vector $\ \mathbb{1}^T\ $ gives \begin{align} (a+b)\mathbb{1}^Tx-b\mathbb{1}^T\mathbb{1}\mathbb{1}^Tx&=\mathbb{1}^Ty\\ &=\big(a-(n-1)b\big)\mathbb{1}^Tx\ ,\\ \hspace{-18em}\text{or}\\ \mathbb{1}^Tx&=\big(a-(n-1)b\big)^{-1}\mathbb{1}^Ty\ , \end{align} provided $\ a-(n-1)b\ne0\ $. Now rewriting the first equation above as $$ (a+b)x=y+b\mathbb{1}\mathbb{1}^Tx\ , $$ and substituting $\ \big(a-(n-1)b\big)^{-1}\mathbb{1}^Ty\ $ for $\ \mathbb{1}^Tx\ $ gives \begin{align} x&=\left(\frac{1}{a+b}\right)y+\left(\frac{b}{(a+b)\big(a-(n-1)b\big)}\right)\mathbb{1}\mathbb{1}^Ty\\ &=\left(\left(\frac{1}{a+b}\right)I+\left(\frac{b}{(a+b)\big(a-(n-1)b\big)}\right)\mathbb{1}\mathbb{1}^T\right)y\ , \end{align} provided $\ (a+b)\ne0\ $, which gives you the solution to your problem.