# What software does Sage use to solve linear equations ?

Hi, I have been using Sage in my project mainly to solve a large list of large (hundred of unknowns) linear equations, i.e., solve(eqts, variable). However, Sage is so large that it becomes inconvenient to ask users to download Sage to use my work. I've tried to use sympybut its equation solver is much slower compare to the one in Sage. So I am wondering what software that Sage uses underneath for linear equation solving ? It's probably one of those listed here http://www.sagemath.org/links-compone... but I don't know which.

Note that I want a solver that can give symbolic solution, e.g., instead of solutions such as x = 3, y =6, it would say x = v1, y = 2*v1. This is how I use solve in Sage.

edit retag close merge delete

Sort by » oldest newest most voted From the documentation of solve:

algorithm - string (default: ‘maxima’);


Sage uses Maxima by default.

Also, more precisely, the source code of solve includes:

if len(s) == 0: # if Maxima's solve gave no solutions, try its to_poly_solve
try:
s = m.to_poly_solve(variables)
except Exception: # if that gives an error, stick with no solutions
s = []

if len(s) == 0: # if to_poly_solve gave no solutions, try use_grobner
try:
s = m.to_poly_solve(variables,'use_grobner=true')
except Exception: # if that gives an error, stick with no solutions
s = []


So try Maxima's solve and to_poly_solve, and try the latter with use_grobner=true.

more

If you know you want to solve linear equations you shouldn't use solve. It probably works, but that machinery is used for more complicated types of equations. You should write your system in terms of matrices and vectors and use the specializaed solving routines for that. It depends on the nature of the coefficients which software it uses.

more