How to calculate the determinant of this n by n matrix? Find the determinant of this n by n matrix.
$$
\begin{pmatrix}
0 & x_1 & x_2 & \cdots& x_k \\
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_k & 0 & 0 & \cdots& 1 \\
\end{pmatrix}
$$
where, $$ k=n-1 $$.
I am new to matrices and determinants, but this is what I did:
I developed the determinant using the second column:
$$
(-1)^2*x_1 
\begin{pmatrix}
x_1  & 0 & \cdots & 0 \\
x_2  & 1& \cdots & 0 \\
\vdots& \vdots& \ddots& \vdots \\
x_k  & 0 & \cdots& 1 \\
\end{pmatrix} + (-1)^3 *1
\begin{pmatrix}
0 & x_2 & \cdots & x_k \\
x_2  & 1& \cdots & 0 \\
\vdots& \vdots& \ddots& \vdots \\
x_k  & 0 & \cdots& 1 \\\end{pmatrix}
$$
the first determinant is triangular, so its equal to $ x_1 $ but this is where I got stuck. I don't know what to do with the second determinant. Any help is appriciated. Thanks
 A: A nice thing about the determinant is that it doesn't change if you add a multiple of one row to another row.
Start by adding $-x_1$ times row $2$ to row $1$. Then continue, for each $i=1,\ldots,k$ adding $-x_i$ times row $i+1$ to row $1$. This has the effect of zeroing out every element in row $1$ except the first one, which becomes $-(x_1^2+\cdots+x_k^2)$.
After that, expanding along the first row, you get precisely:
$$-(x_1^2+\cdots+x_k^2)$$
because all of the other terms are zero.
A: If you denote:
$$D_k=\begin{vmatrix}
0 & x_1 & x_2 & \cdots& x_k \\
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_k & 0 & 0 & \cdots& 1 \\
\end{vmatrix}$$
and expand it by the last column (or row), you get
\begin{align}D_k=\begin{vmatrix}
0 & x_1 & x_2 & \cdots& x_k \\
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_k & 0 & 0 & \cdots& 1 \\
\end{vmatrix}&=(-1)^kx_k\begin{vmatrix}
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_{k-1}&0 &0&\cdots&1\\
x_k & 0 & 0 & \cdots&0\\
\end{vmatrix}
+\begin{vmatrix}
0 & x_1 & x_2 & \cdots& x_{k-1} \\
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_{k-1} & 0 & 0 & \cdots& 1 \\
\end{vmatrix}\\[2ex]
&=(-1)^kx_k\begin{vmatrix}
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_{k-1}&0 &0&\cdots&1\\
x_k & 0 & 0 & \cdots&0\\
\end{vmatrix}
+ D_{k-1}
\end{align}
Now expand this determinant by  the last row:
$$\begin{vmatrix}
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_{k-1}&0 &0&\cdots&1\\
x_k & 0 & 0 & \cdots&0\\
\end{vmatrix}=(-1)^{k-1}x_k\begin{vmatrix}
 1&0&\cdots & 0 \\
0&1&\cdots & 0 \\
 \vdots&\vdots& \ddots  & \vdots\\
0&0&\cdots&1
\end{vmatrix}=(-1)^{k-1}x_k.
$$
Finally we obtain the recursion relation:
$$D_k=(-1)^{2k-1}x_k^2+
+ D_{k-1}=-x_k^2+
+ D_{k-1},$$
from which  a trivial recurrence shows that 
$$D_k=-\sum_{i=1}^k x_i^2.$$
A: You have a minor mistake but your method is very good.  The minor mistake is that for the first term you have moved only one position, and for the second only two, 
so your formula should be
$$
(-1)^1*x_1 
\begin{pmatrix}
x_1  & 0 & \cdots & 0 \\
x_2  & 1& \cdots & 0 \\
\vdots& \vdots& \ddots& \vdots \\
x_k  & 0 & \cdots& 1 \\
\end{pmatrix} + (-1)^2 *1
\begin{pmatrix}
0 & x_2 & \cdots & x_k \\
x_2  & 1& \cdots & 0 \\
\vdots& \vdots& \ddots& \vdots \\
x_k  & 0 & \cdots& 1 \\\end{pmatrix}
$$
 Then if you let $D_k(x_1 \ldots x_k)$ be the determinant for a $k\times k$ matrix of this form,
$$
D_1(x_1) = -x_1^2\\
D_n(x_n \ldots x_k) = -x_n^2 + D_{k-1}(x_{n+1} \ldots x_k)
$$
since the second matrix is just the same for, but starting at the second $x$ instead of the first.  Therefore,
$$
D_k= - \sum_{i=1}^k x_i^2
$$
A: You should just factorize:\begin{pmatrix}
0 & x_1 & x_2 & \cdots& x_k \\
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_k & 0 & 0 & \cdots& 1 \\
\end{pmatrix} = \begin{equation}\begin{pmatrix}
-1 & x_1& \cdots &x_k\\
0 &1 &\cdots &0\\
\vdots &&1\\
0&&&1
\end{pmatrix}\begin{pmatrix}
\sum x_i^2 & 0 &\cdots&\\
x_1&1&&\\
\vdots&&1&&\\
x_k&&&1
\end{pmatrix}
\end{equation}
and then \begin{equation}
\det\begin{pmatrix}
0 & x_1 & x_2 & \cdots& x_k \\
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_k & 0 & 0 & \cdots& 1 \\
\end{pmatrix}=\det\begin{pmatrix}
-1 & x_1& \cdots &x_k\\
0 &1 &\cdots &0\\
\vdots &&1\\
0&&&1
\end{pmatrix}\det\begin{pmatrix}
\sum x_i^2 & 0 &\cdots&\\
x_1&1&&\\
\vdots&&1&&\\
x_k&&&1
\end{pmatrix}
\end{equation}
\begin{equation}
=-1\cdot\sum x_i^2=-\sum x_i^2
\end{equation}
A: 
You can do one thing

$$
\begin{pmatrix}
0 & x_1 & x_2 & \cdots& x_k \\
x_1 & 1 & 0 & \cdots & 0 \\
x_2 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
x_k & 0 & 0 & \cdots& 1 \\
\end{pmatrix}
$$

Taking $x_r$ common from $(r+1)^{th}$ row for r=1 to k

$$
(\prod_{i=1}^k x_k)
\begin{pmatrix}
0 & x_1 & x_2 & \cdots& x_k \\
1 & \frac{1}{x_1} & 0 & \cdots & 0 \\
1 & 0 & \frac{1}{x_2}& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
1 & 0 & 0 & \cdots& \frac{1}{x_k} \\
\end{pmatrix}
$$

And multiply $x_r$ to $(r+1)^{th}$ column for r=1 to k

$$
\begin{pmatrix}
0 & x_1^2 & x_2 ^2 & \cdots& x_k ^2\\
1 & 1 & 0 & \cdots & 0 \\
1 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
1 & 0 & 0 & \cdots& 1 \\
\end{pmatrix}
$$

Now substracting each column from column no. 1

$$
\begin{pmatrix}
-\sum_{i=1}^k x_i^2 & x_1^2 & x_2 ^2 & \cdots& x_k ^2\\
0 & 1 & 0 & \cdots & 0 \\
0 & 0 & 1& \cdots & 0 \\
\vdots& \vdots& \vdots& \ddots  & \vdots\\
0 & 0 & 0 & \cdots& 1 \\
\end{pmatrix}
$$

You know what to do next

