This may be a very basic question, so apologies in advance, I'm a first-time Mathematica & StackExchange user!
I have a 7x3 matrix X with all rows being unique in a 2D-list format.
For example:
X={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,1,1}}
I want to choose three of these rows from which to construct a new matrix called Y, then calculate the rank of Y using MatrixRank
.
For example:
Y={{1,0,0},{0,0,1},{1,0,1}}
OR Y={{0,1,0},{0,0,1},{1,1,1}}
OR Y = ...
What I really want to do is create a loop that chooses a different set of three rows each time, and calculates the rank each time, until I find a set of three rows where the rank of my matrix Y is some arbitrary value z.
Finally, I want the loop to finish and tell me which rows were used to create Y that gave a rank of z. Is this possible?