How to obtain submatrix of a given matrix of any size? Actually I have a matrix A of order $n\times n$ with all non-singlular submatrices of order $n-1$ and $n-2$. Now I need another matrix B whose (i,j)th entry is $\frac{det A(i,j)}{det A(i)}$, where $det A(i,j)$ denote the determinant of the sub matrix of A formed by deleting $i^{th}$ and $j^{th}$ rows and columns, and $det A(i)$ denote the determinant of the sub matrix of A formed by deleting $i^{th}$ row and column. I'm unable to generate the submatrices $A(i,j)$ for every element.