<s>[INST] 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
 [/INST] 
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

</s>