# How to obtain a smaller-sized output from Solve

I am solving a system of 15 simultaneous linear equations using Solve. On running the code, I get a message saying "A very large output was generated" with options for viewing the ouput. I want to use the solution inside a larger program where the next step relies on the ouput of Solve. I am stuck unless there is a reasonable way for me to capture the output from Solve. Is there a way to do this?

• You don't need to display the output; if you do sol = Solve[...]; you'll suppress the output (with ;) but everything will be assigned to sol. Jan 4, 2013 at 22:05
• If you have not already done so, set Cubics->False and Quartics->False and see if that improves matters. Jan 4, 2013 at 22:05
• Because these are linear equations, why aren't you using LinearSolve? Jan 5, 2013 at 18:03

Is something like this useful?

s1 = Solve[Table[RandomInteger[100, {15}]. Array[x, 15] == y@i, {i, 15}], Array[y, 15]];
y /. s1[]


Thanks for the suggestions. I first put the set of equations as a SparseArray using CoefficientArrays function. Then solved using LinearSolve.

{b,m}=CoefficientArrays[Set of Equations, {Variable List}];
LinearSolve[m,-b]


See the tutorial "Solving Linear Systems" (I have version 8)

• Ah, I missed "linear". That being the case you might also want to experiment with options Method->OneStepRowReduction or DivisionFreeRowReduction. Jan 10, 2013 at 23:01