General::luc
Examples
Basic Examples (1)
An error occurs because the underlying matrix is ill-conditioned:
m = HilbertMatrix[20];
b = m.Table[1, {20}];
LinearSolve[N[m], N[b]]
The condition number of the matrix can be obtained as the third element of the result of LUDecomposition. A large value of the condition number indicates that the matrix is ill-conditioned:
lud = LUDecomposition[N[m]];
Last[lud]
The solution is more accurate if sufficiently high precision is used:
LinearSolve[N[m, 30], N[b, 30]]