Project DelphiTensors Workshop

The ordinary inverse

For a square matrix, A⁻¹ satisfies A⁻¹A = I. It is an exact undo operation.

But it only exists when the columns are linearly independent:

S = np.array([[2., 1.], [1., 3.]]) np.linalg.inv(S) @ S # ≈ identity, fine Singular = np.array([[1., 2.], [2., 4.]]) # column 2 = 2 x column 1 np.linalg.inv(Singular) # raises LinAlgError