First of all, I want to know if it is possible to make a constraint in a set of matrices that I have to obtain a subset. For example, if I have a set of square matrices A
, can I build a set B
formed by the elements of A
that has no null determinant?
If the answer is yes, I would like do do the following.
With
m = Table[Table[1, {4}], {3}]
S = ReplacePart[m, #] & /@ Thread[Rest[Subsets@Position[m, 1]] -> -1]
MatrixForm /@ S
Length@S
We obtain from
m={{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}
the set of all matrices like m
but changing the 1's to -1's. Now I want to add the line {1,1,1,1}
to each matrix of the set S
and obtain a set S1
. Then I want to know how can I obtain the subset M
of S1
formed by all matrices that have no null determinant.
The final effect of what I am trying to achieve is to obtain the set of all 4 x 4
invertible matrices with entries 1
or -1
and with the first line {1,1,1,1}
.