Skip to content
DeepForgeby svx
All problems
MediumLinear Algebrala-042

Condition Number via 1-Norms

Problem

Estimate the condition number of A in the 1-norm, given A and its inverse A_inv.

cond_1(A) = ||A||_1 * ||A_inv||_1, where the matrix 1-norm is the maximum absolute column sum.

Hint

The 1-norm of the identity is 1, so the condition number of I is 1.

Test cases

case 1
in: [[[2,0],[0,3]],[[0.5,0],[0,0.3333333333333333]]]
expected: 1.5
case 2
in: [[[1,1],[0,1]],[[1,-1],[0,1]]]
expected: 4
case 3
in: [[[1,0],[0,1]],[[1,0],[0,1]]]
expected: 1
case 4
in: [[[4,1],[1,3]],[[0.2727272727272727,-0.09090909090909091],[-0.09090909090909091,0.36363636363636365]]]
expected: 2.272727272727273
Starter codePython
def condition_number_1norm(A, A_inv):
    # Your code here
    pass

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