SAGE : Reduced Row Echelon Form

1. Solve system of linear equations using Reduced Row Echelon Form, or rref.

\begin{equation} \left\{ \begin{aligned} x_1 - 2x_2 + x_3 &= 0 \\ 2x_2 - 8x_3 &= 8\\ -4x_1 + 5x_2 + 9x_3 &= -9 . \end{aligned} \right. \end{equation}

Notice the two ways to display output:

  1. using print displays the output as ascii left aligned.
  2. using show will display it using "pretty_print".

We see from the SAGE output that the solution set of the original system of linear equations is \begin{equation} \left\{ \begin{aligned} x_1 &= 29 \\ x_2 &= 16 \\ x_3 &= 3 . \end{aligned} \right. \end{equation}



Reduce a Matrix with a Symbolic Coefficient

2. Find all $a$ such that the system of equations has no solution:

\begin{equation} \left\{ \begin{aligned} 2x_1 + a x_2 - x_3 &= 2 \\ x_1 + 2x_2 + 2x_3 &= 6\\ x_1 + 5x_2 + 3x_3 &= -2 . \end{aligned} \right. \end{equation}

It appears that possibly $n$ cannot equal $4$, however, we should simplify a last element in the last column to get a better idea of the restrictions on $a$. (Note: indices for Sage and Python begin at 0, so the rows are 0, 1, 2, and the columns are 0, 1, 2, 3.)


From this output, we can see that $a\ne-11$. Replace $a$ with $-11$ and reduce matA again to see what happens. (Also try $a=4$.)


Problems

Use the above methods to investigate the solution set of each indicated system of linear equations.

  1. $\left\{ \begin{aligned} x_1 - x_2 + 2 x_3 &= 1 \\ 2 x_1 + x_2 + x_3 &= 8\\ x_1 + x_2 &= 5 \end{aligned} \right.$

  2. $\left\{ \begin{aligned} 2 x_1 - 3 x_2 + x_3 - 6 x_4 &= -7 \\ 4 x_1 + x_2 + 2 x_3 + 9 x_4 &= -7 \\ 3 x_1 + x_2 + x_3 + 8 x_4 &= -8 \end{aligned} \right.$

  3. $\left\{ \begin{aligned} 2 x_1 + x_2 + 7 x_3 - 7 x_4 &= 2 \\ -3 x_1 + 4 x_2 - 5 x_3 - 6 x_4 &= 3 \\ x_1 + x_2 + 4 x_3 - 5 x_4 &= 2 \end{aligned} \right.$



Your Computations