Suppose I have a symmetric, positive semidefinite matrix A
of dimension n x n. The rank of A
is d < n, and I want to find a set of indices of length d
such that A[indices, indices]
has rank d
. For example, if
A <- structure(c(3, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), .Dim = c(4L, 4L))
then I would like to identify one of the sets of indices c(1, 2, 3)
or c(1, 2, 4)
.
I can do this by brute force going through all combinations of rows and columns, but my guess is that there exist much more elegant and efficient methods for doing this.