in reply to Math::MatrixReal Example Help

If your system of equations is non-singular, then you can just use the inverse method:

my $matrix = Math::MatrixReal->new_from_string(...); my $ones = Math::MatrixReal->new_from_string("[ 1 1 1 1 ]"); my $inv = $matrix->inverse(); my $answer = $inv->multiply($ones);

However, if your matrix is singular, (i.e. the determinant is zero), then there are two possibilities: there is no solution or there is an infinite number of solutions. In this case we use the LR-decomposition of the matrix. The Math::MatrixReal documentation has a big section on using the LR-decomposition to solve a system of equations, so just check that out.