Find the determinant of the following matrix

Find the determinant of the following matrix: $$A = \begin{bmatrix} 1+x_1^2 &x_1x_2 & ... & x_1x_n \\ x_2x_1&1+x_2^2 &... & x_2x_n\\ ...& ... & ... &... \\ x_nx_1& x_nx_2 &... & 1+x_n^2 \end{bmatrix}$$

I computed for the case $n=2$, and $n=3$ and guessed that $\det(A)$ should be $ 1+\sum_{i=1}^n x_i^2 $ but not sure how to proceed for any $n$.


To expand on darij grinberg's comment, let

$$ X=A-I_n = \begin{bmatrix} x_1^2 &x_1x_2 & ... & x_1x_n \\ x_2x_1&x_2^2 &... & x_2x_n\\ ...& ... & ... &... \\ x_nx_1& x_nx_2 &... & x_n^2 \end{bmatrix}=(x_ix_j)_{1\leq i,j\leq n} $$

Then all the lines of $X$ are multiples of $(x_1,x_2,\ldots,x_n)$ ; so ${\textsf{rank}}(X)\leq 1$. The eigenvalues of $X$ (counted with multiplicity) are therefore $0,0,\ldots,0$ ($n-1$ times), plus some $\lambda\in{\mathbb R}$. Since the trace of ​​$X$​​ equals the sum of its eigenvalues, we must have $\lambda={\textsf{trace}}(X)=\sum_{i=1}^n x_i^2$. Then $X$ is similar to a triangular matrix with diagonal ${\textsf{diag}}(0,0,0,\ldots, 0,\sum_{i=1}^n x_i^2)$, so that $A$ is similar to a triangular matrix with diagonal ${\textsf{diag}}(1,1,1,\ldots, 1,1+\sum_{i=1}^n x_i^2)$, whence

$$ {\textsf{det}}(A)=1+\sum_{i=1}^n x_i^2 $$


Here is a method without using (at least explicitely) the notion of eigenvalue.

Call $f(x_1,\dots,x_n)$ the wanted determinant. View the last column as $$\pmatrix{0\\\vdots\\ 0\\1 }+x_n\pmatrix{x_1\\\vdots\\ x_{n-1} \\x_n }.$$ This gives by linearity with respect to the last column, $$f(x_1,\dots,x_n)=f(x_1,\dots,x_{n-1})+x_n\det\begin{bmatrix} 1+x_1^2 &x_1x_2 & ...&x_1x_{n-1} & x_1 \\ x_2x_1&1+x_2^2 &... &x_2x_{n-1}& x_2\\ ...& ... & ... &&... \\ x_nx_1& x_nx_2 &...& x_nx_{n-1} & x_n \end{bmatrix}$$ (the first determinant is computed by expanding with respect to the last column). In the last determinant, do $C_i\leftarrow C_i-x_iC_n$, $1\leqslant i\leqslant n-1$ in order to show that $$\det\begin{bmatrix} 1+x_1^2 &x_1x_2 & ...&x_1x_{n-1} & x_1 \\ x_2x_1&1+x_2^2 &... &x_2x_{n-1}& x_2\\ ...& ... & ... &&... \\ x_nx_1& x_nx_2 &...& x_nx_{n-1} & x_n \end{bmatrix}=x_n.$$ Now we can conclude by induction.


Consider the eigenvalues of $x \cdot x^T + I$

$x \cdot x^T v + v = \lambda v$
$x \cdot x^T v = \lambda v - v$

$v$ must be parallel to $x$ or ($\lambda$ = 1). wlog $v = x$

$||x|| ^2 x= (\lambda - 1) x$
$\lambda = ||x||^2 + 1$

You can use the fact that the determinant is the product of eigenvalues (there should be $n$ of them)