Sage SS2 Solving Systems, Part 2

We can now resolve a bit of the mystery around Sage's .solve_right() method. Recall from Sage SS1 that if a linear system has solutions, Sage only provides one solution, even in the case when there are infinitely many solutions. In our previous discussion, we used the system from Example ISSI.



The vector $\vect{c}$ described in the statement of Theorem VFSLS is precisely the solution returned from Sage's .solve_right() method. This is the solution where we choose the $\alpha_i$, $1\leq i\leq n-r$ to all be zero, in other words, each free variable is set to zero (how convenient!). Free variables correspond to columns of the row-reduced augmented matrix that are not pivot columns. So we can profitably employ the .nonpivots() matrix method. Let us put this all together.





Since the eighth column (numbered 7) of the reduced row-echelon form is not a pivot column, we know by Theorem RCLS that the system is consistent. We can use the indices of the remaining non-pivot columns to place zeros into the vector $\vect{c}$ in those locations. The remaining entries of $\vect{c}$ are the entries of the reduced row-echelon form in the last column, inserted in that order. Boom!

So we have three ways to get to the same solution: (a) row-reduce the augmented matrix and set the free variables all to zero, (b) row-reduce the augmented matrix and use the formula from Theorem VFSLS to construct $\vect{c}$, and (c) use Sage's .solve_right() method.

One mystery left to resolve. How can we get Sage to give us infinitely many solutions in the case of systems with an infinite solution set? This is best handled in the next section, Section SS, specifically in Sage SS3.