Find the sub determinant of a matrix If I have the matrix $A(x)$ which is $5 x 5$ and I need to find the $t x t$ sub-determinants of $A(x)$ for $t = 1$ to $t = 5$, how do I do this? $A(x)$ =  \begin{pmatrix} 
(x-1) & 0 & 0 & 0 & 0 \\
-1 & (x-1) & 0 & 0 & 0 \\
0 & 0 & (x-1) & 0 & 0\\
0 & 0 & 0 & (x+1) & 0\\
0 & 0 & 0 & 0 & (x+1) 
\end{pmatrix}

Let's look for the Smith Canonical Form, since it is your goal behind the question.
For $t=1$, we get in particular $x-1$ and $x+1$, whose $gcd$ is $1$, so the gcd of all $1\times 1$ minors is $1$.
For $t=2$, we get in particular $(x-1)^2$ and $(x+1)^2$, whose $gcd$ is $1$, so the gcd of all $2\times 2$ minors is $1$.
For $t=3$, the only nonzero $3\times 3$ minors are $(x-1)^3, (x-1)^2(x+1), (x-1)(x+1)^2$. So the gcd is $(x-1)(x+1)$.
For $t=4$, the only nonzero $4\times 4$ minors are $(x-1)^3(x+1), (x-1)^2(x+1)^2$. So the gcd is $(x-1)^2(x+1)$.
For $t=5$, the determinant is $(x-1)^3(x+1)^2$.
So the Smith Canonical should be the diagonal matrix 
$$
\mbox{diag}(1,1,(x-1)(x+1), x-1, (x-1)(x+1)).
$$
