import numpy as np
import numpy.linalg as la
A = np.array([
[1e-20, 1],
[1, 1],
])
Now find an elimination matrix and go to town:
U = A.copy()
M = np.eye(2)
M[1,0] = -A[1,0]/A[0,0]
U = M.dot(U)
U
M
Now define L
:
L = la.inv(M)
L.dot(U) - A
U
correct?