In a calculation I need the determinant of $\mathbf{I}_n+(a_ia_j)_{1\leq i,j\leq n}$ for given real numbers $a_1,\ldots,a_n$. I conjecture that the determinant equals $1+\sum_{k=1}^na_k^2$, which seems reasonable after making calculations for $n$ up to $5$. However, I did not manage to proof this formula. I tried proving the formula with induction, but any way I tried working out the induction step using linearity of the first row/column did not work. I'm just looking for some help towards a proof, so an inductive proof is not necessary.
Any help is much appreciated.