computig all possible determinants of submatrices of a given matrix

Sett 24 ganger
Hopp til første uleste melding

GUSTAVO TERRA BASTOS

ulest,
20. mars 2023, 17:36:1520.03.2023
til sage-support
Hi all.

Is there any specific comand to compute the determinants of all square submatrices of a given 4x4 - matrix over finite fields?

best regards

Gustavo



William Stein

ulest,
20. mars 2023, 18:09:0720.03.2023
til sage-s...@googlegroups.com
This is

https://ask.sagemath.org/question/41136/how-to-find-all-the-sub-square-matrices-of-an-4x4-matrix-and-all-their-determinants/

 -- William

PS: For fun, I also asked a robot from the future and it said to use the following code, but unfortunately "submatrix_iterator" doesn't exist yet:

F = FiniteField(17)
A = matrix(F, 4, [1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16]) # replace the elements of the matrix with your desired matrix

dets = []
for i in range(1,5):
    for submatrix in A.submatrix_iterator(i):
        if submatrix.is_square():
            dets.append(submatrix.det())
           
print(dets)


--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/97ff54ff-8569-497a-9100-05ff2ae2cf9an%40googlegroups.com.


--

John H Palmieri

ulest,
21. mars 2023, 13:55:2721.03.2023
til sage-support
From the ask.sagemath.org answers:

[m.minors(k) for k in range(5)]

is pretty close to what you want: you just have to flatten the list.
Svar alle
Svar til forfatter
Videresend
0 nye meldinger