Program to handle the Arithmetic in the Row Reduction of a Linear System
VisualBASIC version (c)1999, Glyn George.
Linear System:
           a       b       d       e       g       h    Number
Row 1:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4 [Equation (1)]   
Row 2:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1 [Equation (2)]   
Row 3:   -1/1     0/1     4/1    -1/1    -1/1     0/1     0/1 [Equation (4)]   
Row 4:    0/1    -1/1    -2/1     4/1     0/1    -1/1     0/1 [Equation (5)]   
Row 5:    4/1    -1/1    -1/1     0/1     0/1     0/1    20/1 [Equation (7)]   
Row 6:   -2/1     4/1     0/1    -1/1     0/1     0/1    10/1 [Equation (8)]   
-----------------------------------------------------------------------------
Selected row operation:    Swap rows 1 and 3 .
Linear System:
Row 1:   -1/1     0/1     4/1    -1/1    -1/1     0/1     0/1    
Row 2:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1    -1/1    -2/1     4/1     0/1    -1/1     0/1    
Row 5:    4/1    -1/1    -1/1     0/1     0/1     0/1    20/1    
Row 6:   -2/1     4/1     0/1    -1/1     0/1     0/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Divide row 1 by -1 / 1 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1    -1/1    -2/1     4/1     0/1    -1/1     0/1    
Row 5:    4/1    -1/1    -1/1     0/1     0/1     0/1    20/1    
Row 6:   -2/1     4/1     0/1    -1/1     0/1     0/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract  4 / 1 times row 1 from row 5 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1    -1/1    -2/1     4/1     0/1    -1/1     0/1    
Row 5:    0/1    -1/1    15/1    -4/1    -4/1     0/1    20/1    
Row 6:   -2/1     4/1     0/1    -1/1     0/1     0/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract -2 / 1 times row 1 from row 6 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1    -1/1    -2/1     4/1     0/1    -1/1     0/1    
Row 5:    0/1    -1/1    15/1    -4/1    -4/1     0/1    20/1    
Row 6:    0/1     4/1    -8/1     1/1     2/1     0/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Swap rows 4 and 2 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1    -1/1    -2/1     4/1     0/1    -1/1     0/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 5:    0/1    -1/1    15/1    -4/1    -4/1     0/1    20/1    
Row 6:    0/1     4/1    -8/1     1/1     2/1     0/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Divide row 2 by -1 / 1 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 5:    0/1    -1/1    15/1    -4/1    -4/1     0/1    20/1    
Row 6:    0/1     4/1    -8/1     1/1     2/1     0/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract -1 / 1 times row 2 from row 5 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 5:    0/1     0/1    17/1    -8/1    -4/1     1/1    20/1    
Row 6:    0/1     4/1    -8/1     1/1     2/1     0/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract  4 / 1 times row 2 from row 6 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1    -1/1     0/1     4/1    -1/1    73/4    
Row 4:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 5:    0/1     0/1    17/1    -8/1    -4/1     1/1    20/1    
Row 6:    0/1     0/1   -16/1    17/1     2/1    -4/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Divide row 3 by -1 / 1 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 5:    0/1     0/1    17/1    -8/1    -4/1     1/1    20/1    
Row 6:    0/1     0/1   -16/1    17/1     2/1    -4/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract  17 / 1 times row 3 from row 5 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 5:    0/1     0/1     0/1    -8/1    64/1   -16/1  1321/4    
Row 6:    0/1     0/1   -16/1    17/1     2/1    -4/1    10/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract -16 / 1 times row 3 from row 6 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1    -1/1    -2/1     4/1    25/1    
Row 5:    0/1     0/1     0/1    -8/1    64/1   -16/1  1321/4    
Row 6:    0/1     0/1     0/1    17/1   -62/1    12/1  -282/1    
-----------------------------------------------------------------------------
Selected row operation:    Divide row 4 by -1 / 1 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1     1/1     2/1    -4/1   -25/1    
Row 5:    0/1     0/1     0/1    -8/1    64/1   -16/1  1321/4    
Row 6:    0/1     0/1     0/1    17/1   -62/1    12/1  -282/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract -8 / 1 times row 4 from row 5 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1     1/1     2/1    -4/1   -25/1    
Row 5:    0/1     0/1     0/1     0/1    80/1   -48/1   521/4    
Row 6:    0/1     0/1     0/1    17/1   -62/1    12/1  -282/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract  17 / 1 times row 4 from row 6 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1     1/1     2/1    -4/1   -25/1    
Row 5:    0/1     0/1     0/1     0/1    80/1   -48/1   521/4    
Row 6:    0/1     0/1     0/1     0/1   -96/1    80/1   143/1    
-----------------------------------------------------------------------------
Selected row operation:    Divide row 5 by  80 / 1 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1     1/1     2/1    -4/1   -25/1    
Row 5:    0/1     0/1     0/1     0/1     1/1    -3/5   521/320  
Row 6:    0/1     0/1     0/1     0/1   -96/1    80/1   143/1    
-----------------------------------------------------------------------------
Selected row operation:    Subtract -96 / 1 times row 5 from row 6 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1     1/1     2/1    -4/1   -25/1    
Row 5:    0/1     0/1     0/1     0/1     1/1    -3/5   521/320  
Row 6:    0/1     0/1     0/1     0/1     0/1   112/5  2993/10   
-----------------------------------------------------------------------------
Selected row operation:    Divide row 6 by  112 / 5 .
Linear System:
Row 1:    1/1     0/1    -4/1     1/1     1/1     0/1     0/1    
Row 2:    0/1     1/1     2/1    -4/1     0/1     1/1     0/1    
Row 3:    0/1     0/1     1/1     0/1    -4/1     1/1   -73/4    
Row 4:    0/1     0/1     0/1     1/1     2/1    -4/1   -25/1    
Row 5:    0/1     0/1     0/1     0/1     1/1    -3/5   521/320  
Row 6:    0/1     0/1     0/1     0/1     0/1     1/1  2993/224  
-----------------------------------------------------------------------------
Note that back substitution could be used from this echelon form.
----------------------------------------------------------------------------- Selected row operation: Subtract -4 / 1 times row 3 from row 1 . Linear System: Row 1: 1/1 0/1 0/1 1/1 -15/1 4/1 -73/1 Row 2: 0/1 1/1 2/1 -4/1 0/1 1/1 0/1 Row 3: 0/1 0/1 1/1 0/1 -4/1 1/1 -73/4 Row 4: 0/1 0/1 0/1 1/1 2/1 -4/1 -25/1 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract 2 / 1 times row 3 from row 2 . Linear System: Row 1: 1/1 0/1 0/1 1/1 -15/1 4/1 -73/1 Row 2: 0/1 1/1 0/1 -4/1 8/1 -1/1 73/2 Row 3: 0/1 0/1 1/1 0/1 -4/1 1/1 -73/4 Row 4: 0/1 0/1 0/1 1/1 2/1 -4/1 -25/1 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract 1 / 1 times row 4 from row 1 . Linear System: Row 1: 1/1 0/1 0/1 0/1 -17/1 8/1 -48/1 Row 2: 0/1 1/1 0/1 -4/1 8/1 -1/1 73/2 Row 3: 0/1 0/1 1/1 0/1 -4/1 1/1 -73/4 Row 4: 0/1 0/1 0/1 1/1 2/1 -4/1 -25/1 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -4 / 1 times row 4 from row 2 . Linear System: Row 1: 1/1 0/1 0/1 0/1 -17/1 8/1 -48/1 Row 2: 0/1 1/1 0/1 0/1 16/1 -17/1 -127/2 Row 3: 0/1 0/1 1/1 0/1 -4/1 1/1 -73/4 Row 4: 0/1 0/1 0/1 1/1 2/1 -4/1 -25/1 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -17 / 1 times row 5 from row 1 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 -11/5 -6503/320 Row 2: 0/1 1/1 0/1 0/1 16/1 -17/1 -127/2 Row 3: 0/1 0/1 1/1 0/1 -4/1 1/1 -73/4 Row 4: 0/1 0/1 0/1 1/1 2/1 -4/1 -25/1 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract 16 / 1 times row 5 from row 2 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 -11/5 -6503/320 Row 2: 0/1 1/1 0/1 0/1 0/1 -37/5 -1791/20 Row 3: 0/1 0/1 1/1 0/1 -4/1 1/1 -73/4 Row 4: 0/1 0/1 0/1 1/1 2/1 -4/1 -25/1 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -4 / 1 times row 5 from row 3 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 -11/5 -6503/320 Row 2: 0/1 1/1 0/1 0/1 0/1 -37/5 -1791/20 Row 3: 0/1 0/1 1/1 0/1 0/1 -7/5 -939/80 Row 4: 0/1 0/1 0/1 1/1 2/1 -4/1 -25/1 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract 2 / 1 times row 5 from row 4 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 -11/5 -6503/320 Row 2: 0/1 1/1 0/1 0/1 0/1 -37/5 -1791/20 Row 3: 0/1 0/1 1/1 0/1 0/1 -7/5 -939/80 Row 4: 0/1 0/1 0/1 1/1 0/1 -14/5 -4521/160 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -11 / 5 times row 6 from row 1 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 0/1 4065/448 Row 2: 0/1 1/1 0/1 0/1 0/1 -37/5 -1791/20 Row 3: 0/1 0/1 1/1 0/1 0/1 -7/5 -939/80 Row 4: 0/1 0/1 0/1 1/1 0/1 -14/5 -4521/160 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -37 / 5 times row 6 from row 2 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 0/1 4065/448 Row 2: 0/1 1/1 0/1 0/1 0/1 0/1 2089/224 Row 3: 0/1 0/1 1/1 0/1 0/1 -7/5 -939/80 Row 4: 0/1 0/1 0/1 1/1 0/1 -14/5 -4521/160 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -7 / 5 times row 6 from row 3 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 0/1 4065/448 Row 2: 0/1 1/1 0/1 0/1 0/1 0/1 2089/224 Row 3: 0/1 0/1 1/1 0/1 0/1 0/1 223/32 Row 4: 0/1 0/1 0/1 1/1 0/1 -14/5 -4521/160 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -14 / 5 times row 6 from row 4 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 0/1 4065/448 Row 2: 0/1 1/1 0/1 0/1 0/1 0/1 2089/224 Row 3: 0/1 0/1 1/1 0/1 0/1 0/1 223/32 Row 4: 0/1 0/1 0/1 1/1 0/1 0/1 293/32 Row 5: 0/1 0/1 0/1 0/1 1/1 -3/5 521/320 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Selected row operation: Subtract -3 / 5 times row 6 from row 5 . Linear System: Row 1: 1/1 0/1 0/1 0/1 0/1 0/1 4065/448 Row 2: 0/1 1/1 0/1 0/1 0/1 0/1 2089/224 Row 3: 0/1 0/1 1/1 0/1 0/1 0/1 223/32 Row 4: 0/1 0/1 0/1 1/1 0/1 0/1 293/32 Row 5: 0/1 0/1 0/1 0/1 1/1 0/1 4321/448 Row 6: 0/1 0/1 0/1 0/1 0/1 1/1 2993/224 ----------------------------------------------------------------------------- Program execution terminated.