Skip to content
DeepForgeby svx
All problems
EasyLinear Algebrala-066

Determinant of Inverse

Problem

Compute the determinant of the inverse of a 2x2 matrix A using

det(inv(A)) = 1 / det(A)

Return None if det(A) == 0.

Hint

Invertible matrices have nonzero determinant.

Test cases

case 1
in: [[[1,2],[3,4]]]
expected: -0.5
case 2
in: [[[2,0],[0,4]]]
expected: 0.125
case 3
in: [[[4,7],[2,6]]]
expected: 0.1
case 4
in: [[[1,2],[2,4]]]
expected: null
Starter codePython
def det_inverse(A):
    # Your code here
    pass

4 test cases · run your code against them in the editor