Project DelphiTensors Workshop

Singular matrix

A matrix with linearly dependent columns is singular and has no inverse.

The cheapest way to make one is to duplicate a column. Nothing about the shape changes — a singular 3×3 matrix is still 3×3 — but its rank drops below 3, and the missing rank is the whole problem.

Diagnose it with np.linalg.matrix_rank, not with an exception message. np.linalg.inv does not always raise: sometimes it returns finite, enormous numbers instead.