All problems
Determinant of Transpose
Problem
Compute the determinant of the transpose of a 3x3 matrix A by expanding along the first row of A^T.
The result equals det(A), but the work is done on the transposed rows.
Hint
Transpose first, then apply the standard 3x3 cofactor expansion.
Test cases
case 1
in: [[[1,2,3],[4,5,6],[7,8,9]]]
expected: 0
case 2
in: [[[1,2,3],[0,1,4],[5,6,0]]]
expected: 1
case 3
in: [[[2,0,0],[0,3,0],[0,0,4]]]
expected: 24
case 4
in: [[[1,0,1],[0,1,0],[-1,0,1]]]
expected: 2
Starter codePython
def det_transpose(A):
# Your code here
pass4 test cases · run your code against them in the editor