Determinant of a matrix of the form $M = I + xx^t$

Consider the matrix $$N=M-I.$$ It has rank $\le1$, so its characteristic polynomial $P(\lambda)=\det(\lambda I-N)$ has the form $\lambda^n-a\lambda^{n-1}$. But $a$ is the trace of $N$, so $$P(\lambda)=\lambda^n-(x_1^2+\cdots+x_n^2)\lambda^{n-1}.$$ Now $$\det M=\det(I+N)=(-1)^nP(-1)=1+x_1^2+\cdots+x_n^2.$$


You can continue from your observation using the matrix-determinant lemma (which is not hard to prove, by the way).

For a column vector $x = (x_1,...,x_n)$, and an $n\times n $ identity matrix $I$, we have

$$ M = I + x x^T $$

hence, in view of the aforementioned lemma,

$$ \det M = (1 + x^T I x)\det I = 1 + \|x\|^2 = 1 + x_1^2 + \cdots +x_n^2. $$


Denote by $M_n$ the matrix we want to compute the determinant. Letting $\mathbf{x}=(x_1,\dots,x_{n-1})$, we express $M_n$ as a block matrix: $$ M_n=\pmatrix{M_{n-1}& x_n\mathbf x^t\\ x_n\mathbf{x}&1+x_n^2}. $$ Since $\pmatrix{ x_n\mathbf x^t\\1+x_n^2}=\pmatrix{ 0\\1}+\pmatrix{ \mathbf x_nx^t\\x_n^2}$, it follows by multi-linearity of the determinant that $$ \det\left(M_n\right)=\det\pmatrix{M_{n-1}& 0\\ x_n\mathbf{x}&1}+\det\pmatrix{M_{n-1}& x_n\mathbf x^t\\ x_n\mathbf{x}&x_n^2}. $$ The first term of the right hand side is $\det\left(M_{n-1}\right)$; for the second one, using two times the multi-lineartiy of the determinant (with respect to lines and then columns), we derive that $$ \det\left(M_{n}\right)=\det\left(M_{n-1}\right)+x_n^2\det\pmatrix{M_{n-1}& \mathbf x^t\\ \mathbf{x}&1}. $$ The last determinant is one: one can make the linear combinations $C_i\leftarrow x_iC_n$ to see this.