Module

for

Pivoting Methods

 

Background

    In the Gauss-Jordan module we saw an algorithm for solving a general linear system of equations [Graphics:Images/PivotingMod_gr_1.gif] consisting of n equations and n unknowns where it is assumed that the system has a unique solution.  The method is attributed Johann Carl Friedrich Gauss (1777-1855) and Wilhelm Jordan (1842 to 1899).  The following theorem states the sufficient conditions for the existence and uniqueness of solutions of a linear system [Graphics:Images/PivotingMod_gr_2.gif].  

Theorem (Unique Solutions) Assume that [Graphics:Images/PivotingMod_gr_3.gif] is an [Graphics:Images/PivotingMod_gr_4.gif] matrix.  The following statements are equivalent.

     (i) Given any [Graphics:Images/PivotingMod_gr_5.gif] matrix [Graphics:Images/PivotingMod_gr_6.gif], the linear system [Graphics:Images/PivotingMod_gr_7.gif] has a unique solution.
     
    (ii) The matrix [Graphics:Images/PivotingMod_gr_8.gif] is nonsingular (i.e., [Graphics:Images/PivotingMod_gr_9.gif] exists).
    
   (iii) The system of equations [Graphics:Images/PivotingMod_gr_10.gif] has the unique solution [Graphics:Images/PivotingMod_gr_11.gif].  
   
   (iv) The determinant of [Graphics:Images/PivotingMod_gr_12.gif] is nonzero, i.e. [Graphics:Images/PivotingMod_gr_13.gif].  

    It is convenient to store all the coefficients of the linear system [Graphics:Images/PivotingMod_gr_14.gif] in one array of dimension [Graphics:Images/PivotingMod_gr_15.gif].  The coefficients of [Graphics:Images/PivotingMod_gr_16.gif] are stored in column [Graphics:Images/PivotingMod_gr_17.gif] of the array (i.e. [Graphics:Images/PivotingMod_gr_18.gif]).  Row [Graphics:Images/PivotingMod_gr_19.gif] contains all the coefficients necessary to represent the [Graphics:Images/PivotingMod_gr_20.gif] equation in the linear system. The augmented matrix is denoted [Graphics:Images/PivotingMod_gr_21.gif] and the linear system is represented as follows:

         [Graphics:Images/PivotingMod_gr_22.gif][Graphics:Images/PivotingMod_gr_23.gif]  

    The system [Graphics:Images/PivotingMod_gr_24.gif], with augmented matrix [Graphics:Images/PivotingMod_gr_25.gif], can be solved by performing row operations on [Graphics:Images/PivotingMod_gr_26.gif].  The variables  are placeholders for the coefficients and cam be omitted until the end of the computation.

Proof  Gauss-Jordan Elimination and Pivoting  Gauss-Jordan Elimination and Pivoting  

Theorem (Elementary Row Operations). The following operations applied to the augmented matrix [Graphics:Images/PivotingMod_gr_27.gif] yield an equivalent linear system.

     (i) Interchanges:    The order of two rows can be interchanged.  
     
    (ii) Scaling:              Multiplying a row by a nonzero constant.
    
   (iii) Replacement:    Row r can be replaced by the sum of that tow and a nonzero multiple of any other row;
                                     that is:  [Graphics:Images/PivotingMod_gr_28.gif].      

    It is common practice to implement (iii) by replacing a row with the difference of that row and a multiple of another row.  

Proof  Gauss-Jordan Elimination and Pivoting  Gauss-Jordan Elimination and Pivoting  

Definition (Pivot Element). The number [Graphics:Images/PivotingMod_gr_29.gif] in the coefficient matrix [Graphics:Images/PivotingMod_gr_30.gif] that is used to eliminate [Graphics:Images/PivotingMod_gr_31.gif] where [Graphics:Images/PivotingMod_gr_32.gif], is called the [Graphics:Images/PivotingMod_gr_33.gif] pivot element, and the [Graphics:Images/PivotingMod_gr_34.gif] row is called the pivot row.      

Theorem (Gaussian Elimination with Back Substitution). Assume that [Graphics:Images/PivotingMod_gr_35.gif] is an [Graphics:Images/PivotingMod_gr_36.gif] nonsingular matrix. There exists a unique system [Graphics:Images/PivotingMod_gr_37.gif] that is equivalent to the given system [Graphics:Images/PivotingMod_gr_38.gif], where [Graphics:Images/PivotingMod_gr_39.gif] is an upper-triangular matrix with [Graphics:Images/PivotingMod_gr_40.gif] for [Graphics:Images/PivotingMod_gr_41.gif].  After  [Graphics:Images/PivotingMod_gr_42.gif] are constructed, back substitution can be used to solve [Graphics:Images/PivotingMod_gr_43.gif] for [Graphics:Images/PivotingMod_gr_44.gif].  

Proof  Gauss-Jordan Elimination and Pivoting  Gauss-Jordan Elimination and Pivoting  

 

Pivoting Strategies

    There are numerous
pivoting strategies discussed in the literature.  We mention only a few to give an indication of the possibilities.

(i)  No Pivoting.  No pivoting means no row interchanges.  It can be done only if Gaussian elimination never run into zeros on the diagonal.  Since division by zero is a fatal error we usually avoid this pivoting strategy.

Pivoting to Avoid [Graphics:Images/PivotingMod_gr_45.gif]

    If  
[Graphics:Images/PivotingMod_gr_46.gif],  then row p cannot be used to eliminate the elements in column p below the main diagonal.  It is necessary to find row k, where [Graphics:Images/PivotingMod_gr_47.gif] and k > p, and then interchange row p and row k so that a nonzero pivot element is obtained.  This process is called pivoting, and the criterion for deciding which row to choose is called a pivoting strategy.  The first idea that comes to mind is the following one.

(ii) Trivial Pivoting.  The trivial pivoting strategy is as follows.  If  [Graphics:Images/PivotingMod_gr_48.gif],  do not switch rows.  If  [Graphics:Images/PivotingMod_gr_49.gif],  locate the first row below p in which  [Graphics:Images/PivotingMod_gr_50.gif] and then switch rows k and p.  This will result in a new element  [Graphics:Images/PivotingMod_gr_51.gif],  which is a nonzero pivot element.

Pivoting to Reduce Error

    Because the computer uses fixed-precision arithmetic, it is possible that a small error will be introduced each time that an arithmetic operation is performed. The following example illustrates how use of the trivial pivoting strategy in Gaussian elimination can lead to significant error in the solution of a linear system of equations.

(iii) Partial Pivoting.  The partial pivoting strategy is as follows.  If  [Graphics:Images/PivotingMod_gr_52.gif],  do not switch rows.  If  [Graphics:Images/PivotingMod_gr_53.gif],  locate row u below p in which  [Graphics:Images/PivotingMod_gr_54.gif]  and [Graphics:Images/PivotingMod_gr_55.gif] and then switch rows u and p.  This will result in a new element  [Graphics:Images/PivotingMod_gr_56.gif],  which is a nonzero pivot element.        
Remark. Only row permutations are permitted. The strategy is to switch the largest entry in the pivot column to the diagonal.

(iv) Scaled Partial Pivoting.  At the start of the procedure we compute scale factors for each row of the matrix [Graphics:Images/PivotingMod_gr_57.gif] as follows:
        [Graphics:Images/PivotingMod_gr_58.gif]   for  [Graphics:Images/PivotingMod_gr_59.gif].  
The scale factors are interchanged with their corresponding row in the elimination steps.  The scaled partial pivoting strategy is as follows.  If  [Graphics:Images/PivotingMod_gr_60.gif],  do not switch rows.  If  [Graphics:Images/PivotingMod_gr_61.gif],  locate row u below p in which  [Graphics:Images/PivotingMod_gr_62.gif]  and [Graphics:Images/PivotingMod_gr_63.gif] and then switch rows u and p.  This will result in a new element  [Graphics:Images/PivotingMod_gr_64.gif],  which is a nonzero pivot element.   
Remark. Only row permutations are permitted. The strategy is to switch the largest scaled entry in the pivot column to the diagonal.

(v) Total Pivoting.  The total pivoting strategy is as follows.  If  [Graphics:Images/PivotingMod_gr_65.gif],  do not switch rows.  If  [Graphics:Images/PivotingMod_gr_66.gif],  locate row u below p and column v to the right of p in which  [Graphics:Images/PivotingMod_gr_67.gif]  and [Graphics:Images/PivotingMod_gr_68.gif] and then: first switch rows u and p and second switch column v and p.   This will result in a new element  [Graphics:Images/PivotingMod_gr_69.gif],  which is a nonzero pivot element.  This is also called "complete pivoting" or "maximal pivoting."
Remark. Both row and column permutations are permitted. The strategy is to switch the largest entry in the part of the matrix that we have not yet processed to the diagonal.

Proof  Pivoting Methods

Computer Programs  Pivoting Methods

 

Mathematica Subroutines for Pivoting.  Execute the cells in this group to activate to subroutines.  [Graphics:Images/PivotingMod_gr_81.gif]

 

Example 1.  Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_82.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 1.

 

Example 2. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_101.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 2.

 

    A linear system with a Hilbert matrix   [Graphics:Images/PivotingMod_gr_125.gif]  is difficult to solve numerically. The following examples illustrate this situation.  

 

Example 3. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_126.gif],  where [Graphics:Images/PivotingMod_gr_127.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_128.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 3.

 

Example 4. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_166.gif],  where [Graphics:Images/PivotingMod_gr_167.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_168.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 4.

 

Example 5. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_190.gif],  where [Graphics:Images/PivotingMod_gr_191.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_192.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 5.

 

Example 6. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_214.gif],  where [Graphics:Images/PivotingMod_gr_215.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_216.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 6.

 

Example 7. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_238.gif],  where [Graphics:Images/PivotingMod_gr_239.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_240.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 7.

 

Example 8 Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_264.gif],  where [Graphics:Images/PivotingMod_gr_265.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_266.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 8.

 

Research Experience for Undergraduates

Pivoting Methods  Internet hyperlinks to web sites and a bibliography of articles.  

Hilbert Matrix  Internet hyperlinks to web sites and a bibliography of articles.  

Ill-Conditioned Linear Systems  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook Pivoting Methods

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005