The documentation for Jama is not very good.
In fact, if you look through the sourcecode, you will find that Matrix.inverse()
ultimately calls LUDecomposition.solve(...)
and the code says:
270 /** Solve A*X = B
271 @param B A Matrix with as many rows as A and any number of columns.
272 @return X so that L*U*X = B(piv,:)
273 @exception IllegalArgumentException Matrix row dimensions must agree.
274 @exception RuntimeException Matrix is singular.
275 */
277 public Matrix solve (Matrix B) {
278 if (B.getRowDimension() != m) {
279 throw new IllegalArgumentException("Matrix row dimensions must agree.");
280 }
281 if (!this.isNonsingular()) {
282 throw new RuntimeException("Matrix is singular.");
283 }
As Wikipedia says:
"In linear algebra an n-by-n (square) matrix A is called invertible or nonsingular or nondegenerate, if there exists an n-by-n matrix B such that AB = BA = In
where In denotes the n-by-n identity matrix and the multiplication used is ordinary matrix multiplication."
In short, singular means not invertible.
If you are unhappy with JAMA, take a look at the Apache Commons Maths libraries, in particular the Linear Algebra module.