To give the close-form of $\det(\mathbf{G})$, where $\mathbf{G}$ is \begin{align} \mathbf{G}=a\mathbf{I}+b\boldsymbol{ee}^T \end{align} in which $a$ and $b$ are constant, and $\boldsymbol{e}$ is a column vector with all elements being $1$. In addition, $(\cdot)^T$ is transposition operation. $\mathbf{G}$ is $u\times u$. We use $\mathbf{G}_u$ to underline the dimension of $\mathbf{G}$.
The question is to determine $\det(\mathbf{G})$.
As I know: We rewrite $\mathbf{G}_u$ as \begin{align} \mathbf{G}_u=\left[\begin{array}{ccc} \mathbf{G}_{u-1} & b\\ b & a+b \end{array} \right] \end{align} Using the determinant of block matrix lemma \begin{align} \det\left[\begin{array}{ccc} \mathbf{A} & \mathbf{B}\\ \mathbf{C} & \mathbf{D} \end{array} \right]=\det(\mathbf{A})\det(\mathbf{D}-\mathbf{C}\mathbf{A}^{-1}\mathbf{B}) \end{align} We then have \begin{align} \det(\mathbf{G}_u)=\det(\mathbf{G}_{u-1})\det(a+b-b^2\boldsymbol{e}^T\mathbf{G}_{u-1}^{-1}\boldsymbol{e}) \end{align} It still needs to get $\mathbf{G}_{u-1}^{-1}$ via matrix inverse lemma \begin{align} (\mathbf{A}+\mathbf{BC})^{-1}=\mathbf{A}^{-1}-\mathbf{A}^{-1}\mathbf{B}(\mathbf{I}+\mathbf{CA}^{-1}\mathbf{B})^{-1}\mathbf{CA}^{-1} \end{align} We then have \begin{align} \mathbf{G}_{u} &=\frac{1}{a}\mathbf{I}-\frac{1}{a^2}b\boldsymbol{e}\left(1+\frac{b}{a}\boldsymbol{e}^T\boldsymbol{e}\right)^{-1}\boldsymbol{e}^T\\ &=\frac{1}{a}\mathbf{I}-\frac{b}{a(a+bu)}\boldsymbol{ee}^T \end{align} where $\boldsymbol{e}^T\boldsymbol{e}=u$ is used. Plugging it into \begin{align} &\det(a+b-b^2\boldsymbol{e}^T\mathbf{G}_{u-1}^{-1}\boldsymbol{e})\\ =&a+b-b^2\left({\frac{u-1}{a}-\frac{b(u-1)^2}{a[a+b(u-1)]}}\right) \end{align} Then \begin{align} \det(\mathbf{G}_u)=\det(\mathbf{G}_{u-1})\left[{a+b-b^2\left({\frac{u-1}{a}-\frac{b(u-1)^2}{a[a+b(u-1)]}}\right)}\right] \end{align} Although, the connection between $\mathbf{G}_u$ and $\mathbf{G}_{u-1}$ is found, I can't give the expression of $\mathbf{G}_u$. Please give me hand, thanks a lot!