Inverse of certain matrix Let $x\neq 0$ be a vector in $\mathbb{R}^n$ and let $a \in \mathbb{R}$. What is the determinant of the matrix
$$|x|^2\cdot \mathrm{id} + a \,x \otimes x,$$
where $a>-1$, and how to calculate it?
 A: Pick an orthonormal (and correctly oriented) basis where $x/\left|x\right|$ is the first basis vector, then
$$\begin{bmatrix}
\left|x\right|^2+a\left|x\right|^2 & 0 &\dots & 0\\
0 & \left|x\right|^2 &\dots & 0\\
\vdots &  &\ddots & \vdots\\
0 & 0 &\dots & \left|x\right|^2\\
\end{bmatrix}$$
is our matrix, so the determinant is $(a+1)\left|x\right|^{2n}$.
A: Let $  A:= |x|^2I +axx^T$ and $\{ e_i\}_{i=1}^n$ be an orthonormal set where $e_1=x/|x|$ Then $$ i>1,\ Ae_k=|x|^2e_k$$
and $$ Ae_1=(a+1)|x|^2 e_1$$
Hence we have $n$-eigenvectors and eigenvalues. 
A: Another way to compute this is to use Sylvester's determinant theorem which says that $\det(I+AB)=\det(I+BA)$ whenever $A$ is an $n\times m$ matrix and $B$ is an $m\times n$ matrix. Note that swapping $A$ and $B$ changes the dimension from $n$ to $m$.
Here we have $A=\tfrac{a}{\left|x\right|^2}x^T$ and $B=x$ so that
$$\det(\left|x\right|^2I+ax^Tx)=\left|x\right|^{2n}\det(I+\tfrac{a}{\left|x\right|^2}x^Tx)=\left|x\right|^{2n}\det(I+\tfrac{a}{\left|x\right|^2}xx^T)=\left|x\right|^{2n}(1+a)$$
where the last equality holds because the determinant of a $1\times 1$ matrix is itself.
