Skip to main content
added 3 characters in body
Source Link
march
  • 24.2k
  • 2
  • 46
  • 102

Probably less efficient than Mathe172's answer, but with simpler logic:

Select[Tuples[{1, -1}, {4, 4}], Det[#] =!= 0 && #[[1]] == {1, 1, 1, 1} &]

Select[Tuples[{1, -1}, {4, 4}], Det[#] =!= 0 && #[[1]] == {1, 1, 1, 1} &]

This generates all 4x4 matrices with +/-1 entries, then selects all those with Det not zero and with the specified first row.

Probably less efficient than Mathe172's answer, but with simpler logic:

Select[Tuples[{1, -1}, {4, 4}], Det[#] =!= 0 && #[[1]] == {1, 1, 1, 1} &]

This generates all 4x4 matrices with +/-1 entries, then selects all those with Det not zero and with the specified first row.

Probably less efficient than Mathe172's answer, but with simpler logic:

Select[Tuples[{1, -1}, {4, 4}], Det[#] =!= 0 && #[[1]] == {1, 1, 1, 1} &]

This generates all 4x4 matrices with +/-1 entries, then selects all those with Det not zero and with the specified first row.

Source Link
bill s
  • 69.7k
  • 4
  • 103
  • 198

Probably less efficient than Mathe172's answer, but with simpler logic:

Select[Tuples[{1, -1}, {4, 4}], Det[#] =!= 0 && #[[1]] == {1, 1, 1, 1} &]

This generates all 4x4 matrices with +/-1 entries, then selects all those with Det not zero and with the specified first row.