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$.

  • 4
    $\begingroup$ The matrix is $I_n + XX^T$, where $X = \left(x_1, x_2, ..., x_n\right)^T$. The matrix $XX^T$ has rank $\leq 1$. So you are looking for the determinant of a "rank-$1$ update" of a matrix, or for the characteristic polynomial of the rank-$\leq 1$ matrix $XX^T$. Either interpretation suggests a way of computing it (I think the latter is better known). $\endgroup$ – darij grinberg Jan 12 '15 at 19:28
  • $\begingroup$ sherman-morrison or woodbury formula $\endgroup$ – abel Jan 13 '15 at 16:36
  • $\begingroup$ A more general case was treated here: Determinant of rank-one perturbation of a diagonal matrix $\endgroup$ – hardmath Jan 14 '15 at 2:31

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 $$

  • $\begingroup$ On the third line below the matrix, do you mean $\lambda = trace(X)$? Why is that so? $\endgroup$ – Paul555 Jan 13 '15 at 16:14
  • $\begingroup$ @Paul555 see my update $\endgroup$ – Ewan Delanoy Jan 13 '15 at 16:15
  • 1
    $\begingroup$ Note: Instead of saying "$X$ is similar to ${\textsf{diag}}(0,0,0,\ldots, 0,\sum_{i=1}^n x_i^2)$", it may be better to say "$X$ is similar to a triangular matrix with diagonal $(0,0,0,\ldots, 0,\sum_{i=1}^n x_i^2)$", since this frees us from having to prove that $X$ is diagonalizable. $\endgroup$ – darij grinberg Mar 5 '19 at 4:12
  • $\begingroup$ @darijgrinberg Indeed. Corrected, thanks $\endgroup$ – Ewan Delanoy Mar 5 '19 at 5:35

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)

  • $\begingroup$ how do we know that there is only one nonzero $\lambda$ and all other eigenvalues are 0 ? $\endgroup$ – Paul555 Jan 12 '15 at 23:13
  • $\begingroup$ The other eigenvalues are all 1. If $\lambda = 1$ we see that the equation is satisfied iff $v$ perpendicular to $x$. This eigenspace is $n-1$ dimensional, leaving only the final dimension for the non-1 eigenvalue. $\endgroup$ – Mark Jan 13 '15 at 4:53
  • $\begingroup$ Thanks, Mark. Could you also explain why $v$ must be parallel to $x$ ? $\endgroup$ – Paul555 Jan 13 '15 at 16:33
  • $\begingroup$ You see that the range of $x \cdot x^T$ lies entirely in the line of $x$. This is because whenever you multiply by a vector $v$ on the right, $x^T v$ turns into a real number and you get out something parallel to $x$. $\endgroup$ – Mark Jan 13 '15 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.