Fact-checked by Grok 2 weeks ago

Pivot element

In linear algebra, a pivot element, also known simply as a , is the leading nonzero entry in a nonzero row of a after it has been transformed into via . This element serves as the reference point for performing row operations to eliminate entries below it (and optionally above it) in the same column, facilitating the simplification of the matrix for solving systems of linear equations. The positions and number of pivot elements play a crucial role in analyzing matrix properties. Specifically, the pivot elements mark the locations of the leading 1s (or nonzero entries) in the , and their count equals the of the , which measures the of its column space and indicates the maximum number of linearly independent rows or columns. Columns containing pivot elements are termed pivot columns, corresponding to variables in the of linear systems, while non-pivot columns identify variables that can take arbitrary values. To ensure , especially when dealing with , pivoting strategies are employed during . Partial pivoting involves swapping rows to place the largest in the current column as the pivot element, reducing the propagation of rounding errors. Complete pivoting, a more robust but computationally intensive method, swaps both rows and columns to select the overall largest entry in the remaining submatrix as the pivot. These techniques are essential in practical implementations, such as , to avoid division by near-zero elements and maintain accuracy in solving large-scale systems.

Fundamentals of Pivot Elements

Definition and Role

In linear algebra, solving a Ax = b, where A is an n \times n , x is the unknown , and b is the right-hand side , often requires transforming the [A \mid b] into an equivalent upper triangular form through row operations. This process, known as row reduction or forward elimination, facilitates efficient solution via back-substitution while preserving the solution set. A pivot element is the diagonal entry a_{kk}^{(k)} in the k-th column of the matrix during the k-th step of , serving as the divisor to compute row multipliers that zero out the elements below it in the same column. This element is crucial for performing the elimination operations without , assuming it is nonzero. The primary role of the pivot element is to enable the forward elimination phase, which systematically transforms the matrix into upper triangular form by eliminating subdiagonal entries column by column. For each step k, the multipliers are calculated as m_{ik} = a_{ik}^{(k)} / a_{kk}^{(k)} for i > k, and these are used to update the remaining submatrix. The elimination formula is: a_{ij}^{(k+1)} = a_{ij}^{(k)} - \frac{a_{ik}^{(k)}}{a_{kk}^{(k)}} a_{kj}^{(k)}, \quad i, j \geq k+1. This operation ensures that after all steps, the matrix is upper triangular, allowing straightforward back-substitution to solve for x.

Historical Development

The concept of a pivot in linear equation solving emerged implicitly in the early 19th century through Carl Friedrich Gauss's work on Gaussian elimination, detailed in his 1809 treatise Theoria motus corporum coelestium in sectionibus conicis solem ambientium, where he described a systematic elimination process for solving systems of linear equations without explicitly naming the pivot element. The formal recognition of pivoting's role in ensuring numerical stability gained prominence in the 1940s amid the advent of electronic computing, with John von Neumann and Herman H. Goldstine analyzing the error propagation in Gaussian elimination for high-order matrices in their 1947 paper "Numerical Inverting of Matrices of High Order," which highlighted the necessity of complete pivoting to control growth in element magnitudes during computation on early machines like ENIAC. Complementing this, Alan Turing's 1948 paper "Rounding-off Errors in Matrix Processes" further emphasized pivot selection to bound error growth, introducing the LU factorization framework and the condition number concept while referencing potential pivot-induced amplification in iterative methods for matrix inversion. By the mid-20th century, pivoting became a cornerstone of stable numerical algorithms, as articulated in James H. Wilkinson's influential 1965 monograph The Algebraic Eigenvalue Problem, which rigorously demonstrated through backward error analysis that partial pivoting in effectively mitigates instability for a wide class of matrices, establishing it as a standard practice in eigenvalue computations and general linear solving. This theoretical foundation transitioned to practical implementation in the , culminating in the 1979 release of the LINPACK library for , which integrated partial pivoting into its core routines to enable reliable solving of dense linear systems on vector processors and early supercomputers.

Necessity and Challenges in Pivoting

Systems Requiring Pivoting

Pivoting becomes essential in for linear systems where the naive process without row interchanges leads to numerical , particularly in matrices with small or zero diagonal elements that cause by near-zero values or excessive error amplification due to rounding in . Such systems often arise in ill-conditioned matrices, characterized by a high \kappa(A), where small perturbations in the input can produce large changes in the solution, exacerbating rounding errors during elimination. A classic illustration is the 2×2 matrix A = \begin{bmatrix} \epsilon & 1 \\ 1 & 1 \end{bmatrix}, where $0 < \epsilon \ll 1 (e.g., \epsilon on the order of machine epsilon u \approx 2^{-53} in double precision). Without pivoting, the first pivot is \epsilon, and the multiplier for the second row is $1/\epsilon, leading to a growth factor \rho_n = 1/\epsilon - 1 \approx 1/\epsilon. This results in the computed LU factors deviating significantly from the true factorization, with forward substitution yielding solutions contaminated by relative errors up to nearly 1, even though the exact solution is well-behaved. For larger systems, consider the 3×3 matrix A = \begin{bmatrix} 4 & -2 & 2 \\ -2 & 1 & 3 \\ 2 & -2 & 2 \end{bmatrix}, which is nonsingular (\det(A) = 16) but causes failure without pivoting. The elimination process uses multipliers l_{21} = -2/4 = -0.5 and l_{31} = 2/4 = 0.5, producing an intermediate matrix with zero on the second diagonal (u_{22} = 0), rendering the 2×2 principal submatrix singular and halting the algorithm due to division by zero. This demonstrates how without pivoting, even nonsingular matrices can lead to algorithmic breakdown if leading principal submatrices become singular during elimination. In general, without pivoting, pivot growth in n \times n matrices can amplify rounding errors exponentially, with worst-case factors reaching up to $2^{n-1} or larger, particularly in systems prone to successive large multipliers that propagate instabilities across elimination steps.

Numerical Stability Concerns

In numerical computations involving , the choice of pivot element is critical because a small pivot can lead to large multipliers during the elimination process, which amplifies rounding errors and propagates them throughout the computation. Specifically, when the pivot is much smaller than other elements in the column, the multipliers l_{ij} = a_{ij}^{(k-1)} / a_{kk}^{(k-1)} can exceed 1 in magnitude, causing subsequent subtractions to involve nearly canceling large terms and resulting in significant loss of relative accuracy. The relative backward error in Gaussian elimination is bounded by O(\epsilon \, u \, n^3), where \epsilon is the machine epsilon (unit roundoff), u is the growth factor, and n is the matrix dimension; in the worst case without pivoting, u can reach $2^{n-1}, leading to exponentially large error amplification. The growth factor u is mathematically defined as u = \max_{1 \leq k \leq n} \frac{\max_{i,j} |a_{ij}^{(k)}|}{\max_{i,j} |a_{ij}|}, where a_{ij}^{(k)} denotes the elements of the matrix after k-1 elimination steps, measuring the maximum growth of any entry relative to the initial matrix maximum. Without pivoting, this factor can grow exponentially, as demonstrated by specially constructed matrices where elements double at each step, achieving u = 2^{n-1}. Numerical stability in this context distinguishes between forward and backward stability. Backward stability requires that the computed solution \hat{x} satisfies (A + \delta A) \hat{x} = b + \delta b, where the relative perturbations satisfy \|\delta A\| / \|A\| = O(\epsilon \, u \, n^3) and similarly for \delta b, ensuring the algorithm solves a nearby problem exactly. In contrast, forward stability concerns the direct relative error \|\hat{x} - x\| / \|x\|, which may not remain small even if backward stability holds. Pivoting strategies aim to bound u (typically to O(n) or smaller), thereby achieving backward stability for most matrices. Floating-point arithmetic inherently introduces errors of order \epsilon at each operation, but the condition number \kappa(A) = \|A\| \cdot \|A^{-1}\| plays a key role in amplifying any failures in pivoting: the forward relative error satisfies \|\hat{x} - x\| / \|x\| \leq \kappa(A) \cdot O(\epsilon \, u \, n^3) / (1 - \kappa(A) \cdot O(\epsilon \, u \, n^3)), so ill-conditioned matrices exacerbate the impact of large growth factors.

Standard Pivoting Strategies

Partial Pivoting

Partial pivoting is a pivoting strategy employed in Gaussian elimination for to enhance numerical stability by selecting the entry with the largest absolute value in the current column below or on the diagonal as the pivot, necessitating row interchanges. This approach mitigates the risk of division by small pivots, which can amplify roundoff errors during elimination. The resulting decomposition takes the form PA = LU, where P is a permutation matrix accounting for the row swaps, L is a unit lower triangular matrix containing the multipliers, and U is an upper triangular matrix. The procedure for partial pivoting in LU factorization of an n \times n matrix A proceeds as follows: At each elimination step k (for k = 1 to n-1), identify the index i \geq k such that |a_{ik}| is maximized in column k from row k to n. Swap row k with row i in A, updating the permutation matrix P accordingly; the new pivot becomes \hat{a}_{kk} = \max_{i \geq k} |a_{ik}|. Then, for each row j = k+1 to n, compute the multiplier l_{jk} = a_{jk} / \hat{a}_{kk} and eliminate the subdiagonal entry by updating row j as a_{j*} \leftarrow a_{j*} - l_{jk} a_{k*} for columns from k to n. This process yields the factors L and U after all steps, with L storing the multipliers below the diagonal. The following pseudocode outlines the partial pivoting algorithm for computing PA = LU:
Algorithm PartialPivotingLU(A, n):
    Initialize p = [1, 2, ..., n]^T  // permutation vector
    U = copy of A
    L = identity(n)
    for k = 1 to n-1:
        // Find pivot
        max_val = |U[k, k]|
        pivot_row = k
        for i = k+1 to n:
            if |U[i, k]| > max_val:
                max_val = |U[i, k]|
                pivot_row = i
        // Swap rows if necessary
        if pivot_row != k:
            swap U[k, :] with U[pivot_row, :]
            swap p[k] with p[pivot_row]
        // Elimination
        for j = k+1 to n:
            l_jk = U[j, k] / U[k, k]
            L[j, k] = l_jk
            for m = k+1 to n:
                U[j, m] = U[j, m] - l_jk * U[k, m]
            U[j, k] = 0  // Optional, for clarity
    // Construct P from p
    P = [permutation matrix](/page/Permutation_matrix) from p
    return P, L, U
This implementation modifies A in place to store U and the subdiagonal of L, with P derived from the row swap records. Partial pivoting offers significant advantages in , bounding the —the ratio of the largest element magnitude in L and U to that in A—by $2^{n-1} in the worst case, as proven by Wilkinson. This bound ensures backward for most practical matrices, though it can be pessimistic for random dense inputs where growth is typically much smaller, on the order of O(\sqrt{n}). It is the standard strategy implemented in major numerical libraries such as LAPACK's DGETRF routine, which employs it for efficient and reliable of dense matrices.

Complete and Rook Pivoting

Complete pivoting is a pivoting strategy employed in Gaussian elimination for LU factorization that involves searching the entire trailing submatrix to select the pivot. At step k, the element with the maximum absolute value |a_{ij}| is identified for i, j \geq k in the submatrix A_{k:n,k:n}, after which row i is swapped with row k and column j with column k to position this element at the pivot location (k,k). This process yields the decomposition PAQ = LU, where P and Q are permutation matrices accounting for the row and column interchanges, respectively, L is unit lower triangular, and U is upper triangular. The primary advantage of complete pivoting lies in its strong theoretical guarantees for , particularly in controlling the —the ratio of the largest in the computed U to the largest in the original —which is bounded by n^{1/2} (2 \cdot 3^{1/2} \cdots n^{1/(n-1)})^{1/2}, established by Wilkinson, growing superlinearly though empirical examples show values close to or slightly above n. However, the exhaustive search at each step requires O((n-k+1)^2) comparisons, leading to an overall search cost of O(n^3), which significantly increases the computational overhead compared to more efficient alternatives. Rook pivoting serves as a computationally efficient variant of complete pivoting, designed to approximate its benefits while reducing the search complexity. In this approach, the pivot selection simulates the movement of a on a within the active submatrix: starting from the current row or column, the largest in that row (or column) is identified, followed by a search in the corresponding column (or row) of the remaining submatrix to find an element that is maximal in both its row and column. This iterative process, typically requiring at most a few alternations (often 2–3 in practice), selects a that is among the largest candidates without scanning the full submatrix. The resulting also takes the form PAQ = [LU](/page/Lu), but with pivots chosen to accuracy and . Introduced as a strategy to bridge partial and complete pivoting, rook pivoting maintains comparable stability to complete pivoting by achieving growth factors that are subexponential in practice, ensuring well-conditioned back-substitution, with error multipliers rarely exceeding 10 in empirical tests. Its expected comparison cost is O(3n^2/2), roughly three times that of partial pivoting but far less than complete pivoting's O(n^3), making it particularly suitable for solvers where preserving structure and minimizing fill-in are critical. In sparse contexts, rook pivoting facilitates implementations that respect nonzero patterns, often leading to smaller residuals in inversions and factorizations compared to partial pivoting alone. In comparison, complete pivoting provides strong growth bounds and is theoretically robust for dense matrices requiring maximal stability, but its quadratic per-step cost limits its practicality for large-scale problems. Rook pivoting, by contrast, achieves near-equivalent stability—with growth subexponentially bounded in practice—with linear per-step overhead, rendering it a preferred choice in sparse direct solvers and applications where computational budget constrains full searches. Both strategies outperform partial pivoting in scenarios with potential for large growth, though rook pivoting's approximation enables broader adoption without sacrificing essential robustness.

Advanced Pivoting Methods

Scaled Pivoting

Scaled pivoting, often referred to as scaled partial , addresses the limitations of standard strategies in matrices where entries vary significantly in magnitude across rows. It normalizes rows using their infinity norm, defined as the maximum absolute entry in each row, to ensure pivot selection is based on relative rather than absolute sizes. This prevents undue preference for rows with large entries, which could otherwise lead to suboptimal choices and increased error propagation during elimination. The approach selects the pivot row that maximizes the |a_{ik}| / s_i, where s_i is the scale factor for row i and a_{ik} is the candidate in column k. The procedure integrates seamlessly with partial pivoting frameworks. Scale factors are computed as s_i = \max_j |a_{ij}| for each row i, typically once at the outset for efficiency, though updates per column can be used in dynamic scenarios. At elimination step k, among rows i \geq k, the row yielding the largest |a_{ik}| / s_i is identified and swapped into position k. Elimination then proceeds by updating the submatrix below the , reducing entries via multipliers derived from the scaled . This method enhances partial pivoting's robustness for matrices exhibiting disparate scales, as analyzed in foundational work on . By focusing on relative magnitudes, scaled pivoting mitigates round-off errors and improves backward stability, particularly in ill-conditioned systems where unscaled methods might amplify perturbations. It bounds the and more effectively than unscaled alternatives, ensuring reliable even with varying entry sizes. Furthermore, scaled pivoting is incorporated into sparsity-preserving variants like Markowitz pivoting, where it helps minimize fill-in while maintaining numerical reliability in sparse decompositions. The core equation for scaled pivot selection is: \text{pivot row at step } k = \arg\max_{i \geq k} \frac{|a_{ik}|}{s_i}, with s_i = \max_j |a_{ij}|.

Pivot Position Selection

In position selection during for , a for accepting a candidate involves comparing its magnitude to a relative to the largest in the subcolumn below it. Specifically, after identifying a potential position—often the current diagonal entry a_{kk}—it is accepted if |a_{kk}| \geq \delta \max_{i \geq k} |a_{ik}|, where \delta is a user-defined typically set between 0.01 and 0.1 to balance and computational efficiency. If this condition fails, the algorithm may reject the position, triggering a row swap to a larger candidate or, in advanced implementations, applying techniques to avoid . This -based validation, known as threshold partial pivoting in sparse contexts, helps prevent excessive growth in the factors while maintaining reliability. The implications of pivot positioning extend to the matrix structure post-selection and during subsequent elimination steps. After a successful row swap, the accepted pivot is placed on the diagonal of the active submatrix, ensuring it serves as the division element for elimination without off-diagonal complications in the U factor. However, the original off-diagonal candidates become diagonal pivots only after , which is recorded to preserve the solution's integrity. Throughout elimination, pivot growth is monitored via the \rho = \max |u_{ij}| / \max |a_{ij}|, where deviations from unity signal potential instability; positions yielding large \rho (e.g., exceeding $2^{n-1} in worst cases) prompt reevaluation or strategy adjustments. In advanced applications, such as iterative refinement for improving solution accuracy, pivot positions are tracked to estimate backward error bounds, with small pivots contributing to inflated condition number assessments via \kappa \approx \|U\| \|L\| / \min |u_{ii}|. The permutation vector, which stores pivot indices by recording row interchanges (e.g., p(k) indicates the row swapped to position k), facilitates efficient application of the factorization PA = LU and error propagation analysis. Special cases arise with zero or near-zero pivots, where exact zeros after exhaustive search confirm , halting as the leading principal submatrix is singular. For near-zero pivots (e.g., |u_{kk}| < \epsilon \|A\|_\infty, with \epsilon around times a safety factor), numerical is detected, often triggering warnings or fallback to rank-revealing decompositions; in such scenarios, the algorithm may fail gracefully or perturb the to proceed, depending on the implementation.

References

  1. [1]
    What are pivots in matrices? - Matrix Operations - CK-12
    A pivot or a pivot element is the first non-zero element in each row of a matrix that has been transformed into row echelon form or reduced row echelon form.
  2. [2]
    Gauss Jordan Elimination Through Pivoting
    The objective of pivoting is to make an element above or below a leading one into a zero. The "pivot" or "pivot element" is an element on the left hand side of ...
  3. [3]
    [PDF] Appendix A - Review of Linear Algebra
    The first nonzero row elements of the matrix are called pivot elements. A column in which a pivot element appears is called a pivot column. 2. Except for the ...
  4. [4]
    Pivoting -- from Wolfram MathWorld
    The element in the diagonal of a matrix by which other elements are divided in an algorithm such as Gauss-Jordan elimination is called the pivot element.Missing: definition | Show results with:definition
  5. [5]
    3.3. Partial Pivoting — Introduction to Numerical Methods and ...
    The row that is swapped with row k is sometimes called the pivot row, and the new denominator is the corresponding pivot element. This approach is robust so ...
  6. [6]
    [PDF] ICME Linear Algebra Refresher Course Lecture 1: Preliminaries
    Sep 20, 2016 · Gaussian Elimination for solving Ax = b: Perform elementary row operations to turn [A|b] → [U|y] where U is upper triangular. Perform ...
  7. [7]
    [PDF] Lecture 7 - Gaussian Elimination with Pivoting
    This requires searching in the partial column below the pivot element. Partial pivoting is usually sufficient. T. Gambill (UIUC). CS 357. February ?, 2011.Missing: algebra | Show results with:algebra
  8. [8]
    [PDF] Gaussian Elimination without/with Pivoting and Cholesky ...
    Gaussian Elimination WITH Pivoting. We now have for each column several pivot candidates: the diagonal element and all elements below it. If one of the pivot ...
  9. [9]
    [PDF] History of Gaussian Elimination, (pdf) - Carl Meyer
    Gauss modified the basic elimination method to suit his specialized purposes and developed a practical algorithm for the positive definite systems that arise ...
  10. [10]
    NUMERICAL INVERTING OF MATRICES OF HIGH ORDER 1021
    von Neumann, entitled Solution of linear systems of high order. Page 29. 19471. NUMERICAL INVERTING OF MATRICES OF HIGH ORDER. 1049.
  11. [11]
    The Algebraic Eigenvalue Problem - Google Books
    The Algebraic Eigenvalue Problem Monographs on numerical analysis. Author, James Hardy Wilkinson. Edition, reprint. Publisher, Clarendon Press, 1965. Original ...
  12. [12]
    [PDF] Gaussian elimination - The University of Manchester
    As the standard method for solving systems of linear equations, Gaussian elimination (GE) is one of the most important and ubiquitous numerical algorithms.
  13. [13]
    [PDF] AVERAGE-CASE STABILITY OF GAUSSIAN ELIMINATION* .)
    Gaussian elimination with partial pivoting is unstable in the worst case: the "growth factor" can be as large as 2"- l, where n is the matrix dimension, ...
  14. [14]
    Error Analysis of Direct Methods of Matrix Inversion
    Error Analysis of Direct Methods of Matrix Inversion. Author: J. H. Wilkinson ... First page of PDF. Formats available. You can view the full content in the ...
  15. [15]
    [PDF] LU Factorization with Partial Pivoting (Numerical Linear Algebra ...
    LU factorization with partial pivoting (GEPP) finds PA=LU, where P is a permutation matrix, and L=P2L-1. The process is (L/n-1...L/2L/1)(Pn-1...P2P1)A=U.
  16. [16]
    dgetrf - LAPACK - The Netlib
    DGETRF computes an LU factorization of a general M-by-N matrix A using partial pivoting with row interchanges.Missing: documentation | Show results with:documentation
  17. [17]
    ALAFF Numerical stability of linear solve via LU factorization with ...
    We have shown that LU factorization with partial pivoting is equivalent to the LU factorization without partial pivoting on a pre-permuted matrix: PA=LU, P A = ...
  18. [18]
    Growth factor and expected growth factor of some pivoting strategies
    Several measures have been used as the growth factor for the Gaussian elimination: given an n × n nonsingular matrix, we can mention the classical growth factor ...
  19. [19]
    What Is the Growth Factor for Gaussian Elimination? - Nick Higham
    Jul 14, 2020 · James Wilkinson showed in the early 1960s that the numerical stability of Gaussian elimination depends on the growth factor. \rho_n ...
  20. [20]
  21. [21]
  22. [22]
    Some Features of Gaussian Elimination with Rook Pivoting
    Finally for a typical inversion method involving the LU factorization we show rook pivoting usually makes both left and right residuals for the computed inverse ...
  23. [23]
    The Rook's pivoting strategy - ScienceDirect.com
    Rook's pivoting (RP) was introduced in [3] and is designed to simultaneously reduce round-off error during the SWOP and control instability that might arise ...
  24. [24]
    [PDF] 6.1 Linear Systems of Equations
    Scaled Partial Pivoting​​ If there are large variations in magnitude of the elements within a row, scaled partial pivoting should be used.
  25. [25]
    [PDF] 2.2 Gaussian Elimination with Scaled Partial Pivoting - TalkPlayFun
    Gaussian elimation with scaled partial pivoting always works, if a unique solution exists. • A square linear equation system has a unique solution, if the left- ...
  26. [26]
    [PDF] Scaling for Numerical Stability in Gaussian Elimination
    Finally, a forward error analysis shows that the problem of scaling for accuracy has many solutions, one of which depends only on the coefficient matrix.
  27. [27]
    [PDF] The Design of MA48, a Code for the Direct Solution of Sparse ...
    Abstract. We describe the design of a new code for the direct solution of sparse unsymmetric linear systems of equations. The new code utilizes a novel.
  28. [28]
    [PDF] Golub and Van Loan - EE IIT Bombay
    The decomposition via partial pivoting in Step A requires a lot of communication. ... "Perturbation Bounds for the LDLT and LU Decompositions," BIT 31, 358-363.
  29. [29]
    [PDF] Threshold Pivoting for Dense LU Factorization
    Our theoretical analysis bounds the element growth similarly to partial pivoting; however, it also shows that the growth of threshold pivoting for a given ...