I'm trying to show that, if $I_k$ is the $k \times k$ identity matrix, $J_k$ is a $k \times k$ matrix with all elements equal to unity, and $a$ is a scalar, then
$$(I_k + a J_k)^{-1} = I_k - \frac{a}{ka + 1} J_k$$
I've used a CAS to show that this holds for several specific values of $k$, but I need to show that it holds for all $k$. How would I go about this?
Multiplying $I_k+aJ_k$ with its prospective inverse, we have: \begin{align} (I_k+aJ_k)\left(I_k - \frac a{ka+1}J_k\right) &= I_k -\frac a{ka+1}J_k + aJ_k - \frac {a^2}{ka+1}J_k^2 \end{align} Now, in general when $A$ is a $m\times n$ matrix and $B$ a $n\times p$ matrix, the $(i,j)$ entry of the product $AB$ is given by $\sum_{\ell=1}^n a_{i\ell}b_{\ell j}$. Here $m=n=p=k$ and $a_{i\ell}=b_{\ell i}=1$, so it is clear that the $(i,j)$ entry of $J_k$ is $k$. It follows that \begin{align} I_k -\frac a{ka+1}J_k + aJ_k - \frac {a^2}{ka+1}J_k^2 &= I_k + \left(a - \frac a{ka+1} -\frac{ka^2}{ka+1} \right)J_k\\ &= I_k + \left(\frac{a(ka+1)-a-ka^2}{ka+1} \right)J_k\\ &= I_k + 0\cdot J_k\\ &= I_k, \end{align} so that indeed $$(I_k+aJ_k$)^{-1} = I_k - \frac a{ka+1}J_k.$$