[Math] Determinant of a matrix having diagonal and subdiagonal entries zero

determinants

I have found the determinant of the following matrix of order $n\ge3$ using some elemetary operations
$$\begin{bmatrix}0& 1 & 1& \dots & 1 \\ 0 & 0 & 1& \ddots & 1\\ 1 & 0 & 0 & \ddots & 1 \\ \vdots & \ddots & \ddots & \ddots & 1 \\ 1 & 1 & 1 & \dots & 0 \end{bmatrix}_{n\times n},$$ that is, a matrix which have diagonal, subdiagonal entries zero and rest of entries are equal to 1. Its determinant comes out to be equal to $$(-1)^n\Big(\lfloor\frac{n-2}{2}\rfloor\Big),$$ where, $\lfloor.\rfloor$ is the floor function. Now, I want to find determinant of the following matrix
$$
\begin{bmatrix}0& -1 & 1& \dots & 1 \\ 0 & 0 & -1& \ddots & 1\\ 1 & 0 & 0 & \ddots & 1 \\ \vdots & \ddots & \ddots & \ddots & -1\\ 1 & 1 & 1 & \dots & 0 \end{bmatrix}_{n\times n},$$ that is, a matrix having diagonal and subdiagonal entries zero. Superdiagonal elements are -1 and rest of the entries are equal to 1.

Best Answer

Here is a principal solution (some details left for you).

Let $A$ be an $n\times n$ tridiagonal matrix such that all its entries consisting of zeros except for those on (i) the main and subdiagonals are $-1$; (ii) superdiagonals are $-2$.

Let $u$ be the column vector all entries are $1$ so that $uu^T$ is an $n\times n$ matrix of all $1$'s. This way, your matrix becomes $A+uu^T$. Now, apply the Matrix Determinant Lemma to obtain $$\det(A+uu^T)=(1+u^TA^{-1}u)\cdot\det(A).$$ The good news is: determinants and inverses of tridiagonal matrices are calculable (see this on Wiki). For example, in the present case $$f_n:=\det(A)=(-1)^n\sum_{k=0}^{\lfloor\frac{n}2\rfloor}(-1)^k\binom{n-k}k2^k.$$ Also, observe that the quantity $u^TA^{-1}u$ is the sum of all entries of the inverse matrix $A^{-1}$.

UPDATE. Since you still ask about the inverse and etc, I've computed your determinant \begin{align} \det(A+uu^T)&=f_n+\sum_{i\leq j}^{1,n}2^{j-i}f_{i-1}f_{n-j}+\sum_{j<i}^{1,n}f_{j-1}f_{n-i} \\ &=f_n+\sum_{i=1}^nf_{i-1}f_{n-i}+\sum_{j<i}^{1,n}(1+2^{i-j})f_{j-1}f_{n-i}. \end{align}

Related Question