# Auxiliary Routines

Routine naming conventions, mathematical notation, and matrix storage schemes used for LAPACK auxiliary routines are the same as for the driver and computational routines described in previous chapters.

The table below summarizes information about the available LAPACK auxiliary routines.

LAPACK Auxiliary Routines
Routine Name | Data Types | Description
--- | --- | ---
?lacgv | c, z | Conjugates a complex vector.
?lacrm | c, z | Multiplies a complex matrix by a square real matrix.
?lacrt | c, z | Performs a linear transformation of a pair of complex vectors.
?laesy | c, z | Computes the eigenvalues and eigenvectors of a 2-by-2 complex symmetric matrix.
?rot | c, z | Applies a plane rotation with real cosine and complex sine to a pair of complex vectors.
?spmv | c, z | Computes a matrix-vector product for complex vectors using a complex symmetric packed matrix
?spr | c, z | Performs the symmetrical rank-1 update of a complex symmetric packed matrix.
?symv | c, z | Computes a matrix-vector product for a complex symmetric matrix.
?syr | c, z | Performs the symmetric rank-1 update of a complex symmetric matrix.
i?max1 | c, z | Finds the index of the vector element whose real part has maximum absolute value.
?sum1 | sc, dz | Forms the 1-norm of the complex vector using the true absolute value.
?gbtf2 | s, d, c, z | Computes the LU factorization of a general band matrix using the unblocked version of the algorithm.
?gebd2 | s, d, c, z | Reduces a general matrix to bidiagonal form using an unblocked algorithm.
?gehd2 | s, d, c, z | Reduces a general square matrix to upper Hessenberg form using an unblocked algorithm.
?gelq2 | s, d, c, z | Computes the LQ factorization of a general rectangular matrix using an unblocked algorithm.
?geql2 | s, d, c, z | Computes the QL factorization of a general rectangular matrix using an unblocked algorithm.
?geqr2 | s, d, c, z | Computes the QR factorization of a general rectangular matrix using an unblocked algorithm.
?gerq2 | s, d, c, z | Computes the RQ factorization of a general rectangular matrix using an unblocked algorithm.
?gesc2 | s, d, c, z | Solves a system of linear equations using the LU factorization with complete pivoting computed by ?getc2.
?getc2 | s, d, c, z | Computes the LU factorization with complete pivoting of the general n-by-n matrix.
?getf2 | s, d, c, z | Computes the LU factorization of a general m-by-n matrix using partial pivoting with row interchanges (unblocked algorithm).
?gtts2 | s, d, c, z | Solves a system of linear equations with a tridiagonal matrix using the LU factorization computed by ?gttrf.
?isnan | s, d, | Tests input for NaN.
?laisnan | s, d, | Tests input for NaN by comparing itwo arguments for inequality.
?labrd | s, d, c, z | Reduces the first nb rows and columns of a general matrix to a bidiagonal form.
?lacn2 | s, d, c, z | Estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.
?lacon | s, d, c, z | Estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.
?lacpy | s, d, c, z | Copies all or part of one two-dimensional array to another.
?ladiv | s, d, c, z | Performs complex division in real arithmetic, avoiding unnecessary overflow.
?lae2 | s, d | Computes the eigenvalues of a 2-by-2 symmetric matrix.
?laebz | s, d | Computes the number of eigenvalues of a real symmetric tridiagonal matrix which are less than or equal to a given value, and performs other tasks required by the routine ?stebz.
?laed0 | s, d, c, z | Used by ?stedc. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmetric tridiagonal matrix using the divide and conquer method.
?laed1 | s, d | Used by sstedc/dstedc. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is tridiagonal.
?laed2 | s, d | Used by sstedc/dstedc. Merges eigenvalues and deflates secular equation. Used when the original matrix is tridiagonal.
?laed3 | s, d | Used by sstedc/dstedc. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is tridiagonal.
?laed4 | s, d | Used by sstedc/dstedc. Finds a single root of the secular equation.
?laed5 | s, d | Used by sstedc/dstedc. Solves the 2-by-2 secular equation.
?laed6 | s, d | Used by sstedc/dstedc. Computes one Newton step in solution of the secular equation.
?laed7 | s, d, c, z | Used by ?stedc. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is dense.
?laed8 | s, d, c, z | Used by ?stedc. Merges eigenvalues and deflates secular equation. Used when the original matrix is dense.
?laed9 | s, d | Used by sstedc/dstedc. Finds the roots of the secular equation and updates the eigenvectors. Used when the original matrix is dense.
?laeda | s, d | Used by ?stedc. Computes the Z vector determining the rank-one modification of the diagonal matrix. Used when the original matrix is dense.
?laein | s, d, c, z | Computes a specified right or left eigenvector of an upper Hessenberg matrix by inverse iteration.
?laev2 | s, d, c, z | Computes the eigenvalues and eigenvectors of a 2-by-2 symmetric/Hermitian matrix.
?laexc | s, d | Swaps adjacent diagonal blocks of a real upper quasi-triangular matrix in Schur canonical form, by an orthogonal similarity transformation.
?lag2 | s, d | Computes the eigenvalues of a 2-by-2 generalized eigenvalue problem, with scaling as necessary to avoid over-/underflow.
?lags2 | s, d | Computes 2-by-2 orthogonal matrices U, V, and Q, and applies them to matrices A and B such that the rows of the transformed A and B are parallel.
?lagtf | s, d | Computes an LU factorization of a matrix T-λ I, where T is a general tridiagonal matrix, and λ a scalar, using partial pivoting with row interchanges.
?lagtm | s, d, c, z | Performs a matrix-matrix product of the form C = α ab+β C, where A is a tridiagonal matrix, B and C are rectangular matrices, and α and β are scalars, which may be 0, 1, or -1.
?lagts | s, d | Solves the system of equations (T-λ I)x = y or (T-λ I)Tx = y ,where T is a general tridiagonal matrix and λ a scalar, using the LU factorization computed by ?lagtf.
?lagv2 | s, d | Computes the Generalized Schur factorization of a real 2-by-2 matrix pencil (A,B) where B is upper triangular.
?lahqr | s, d, c, z | Computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.
?lahrd | s, d, c, z | Reduces the first nb columns of a general rectangular matrix A so that elements below the k-th subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.
?lahr2 | s, d, c, z | Reduces the specified number of first columns of a general rectangular matrix A so that elements below thespecified subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.
?laic1 | s, d, c, z | Applies one step of incremental condition estimation.
?laln2 | s, d | Solves a 1-by-1 or 2-by-2 linear system of equations of the specified form.
?lals0 | s, d, c, z | Applies back multiplying factors in solving the least squares problem using divide and conquer SVD approach. Used by ?gelsd.
?lalsa | s, d, c, z | Computes the SVD of the coefficient matrix in compact form. Used by ?gelsd.
?lalsd | s, d, c, z | Uses the singular value decomposition of A to solve the least squares problem.
?lamrg | s, d | Creates a permutation list to merge the entries of two independently sorted sets into a single set sorted in ascending order.
?laneg | s, d | Computes the Sturm count.
?langb | s, d, c, z | Returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of general band matrix.
?lange | s, d, c, z | Returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general rectangular matrix.
?langt | s, d, c, z | Returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general tridiagonal matrix.
?lanhs | s, d, c, z | Returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of an upper Hessenberg matrix.
?lansb | s, d, c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a symmetric band matrix.
?lanhb | c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a Hermitian band matrix.
?lansp | s, d, c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a symmetric matrix supplied in packed form.
?lanhp | c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix supplied in packed form.
?lanst/?lanht | s, d/c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric or complex Hermitian tridiagonal matrix.
?lansy | s, d, c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real/complex symmetric matrix.
?lanhe | c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix.
?lantb | s, d, c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a triangular band matrix.
?lantp | s, d, c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a triangular matrix supplied in packed form.
?lantr | s, d, c, z | Returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a trapezoidal or triangular matrix.
?lanv2 | s, d | Computes the Schur factorization of a real 2-by-2 nonsymmetric matrix in standard form.
?lapll | s, d, c, z | Measures the linear dependence of two vectors.
?lapmt | s, d, c, z | Performs a forward or backward permutation of the columns of a matrix.
?lapy2 | s, d | Returns sqrt(x2+y2).
?lapy3 | s, d | Returns sqrt(x2+y2+z2).
?laqgb | s, d, c, z | Scales a general band matrix, using row and column scaling factors computed by ?gbequ.
?laqge | s, d, c, z | Scales a general rectangular matrix, using row and column scaling factors computed by ?geequ.
?laqhb | c, z | Scales a Hermetian band matrix, using scaling factors computed by ?pbequ.
?laqp2 | s, d, c, z | Computes a QR factorization with column pivoting of the matrix block.
?laqps | s, d, c, z | Computes a step of QR factorization with column pivoting of a real m-by-n matrix A by using BLAS level 3.
?laqr0 | s, d, c, z | Computes the eigenvalues of a Hessenberg matrix, and optionally the marixes from the Schur decomposition.
?laqr1 | s, d, c, z | Sets a scalar multiple of the first column of the product of 2-by-2 or 3-by-3 matrix H and specified shifts.
?laqr2 | s, d, c, z | Performs the orthogonal/unitary similarity transformation of a Hessenberg matrix to detect and deflate fully converged eigenvalues from a trailing principal submatrix (aggresive early deflation).
?laqr3 | s, d, c, z | Performs the orthogonal/unitary similarity transformation of a Hessenberg matrix to detect and deflate fully converged eigenvalues from a trailing principal submatrix (aggresive early deflation).
?laqr4 | s, d, c, z | Computes the eigenvalues of a Hessenberg matrix, and optionally the marices from the Schur decomposition.
?laqr5 | s, d, c, z | Performs a single small-bulge multi-shift QR sweep.
?laqsb | s, d, c, z | Scales a symmetric/Hermitian band matrix, using scaling factors computed by ?pbequ.
?laqsp | s, d, c, z | Scales a symmetric/Hermitian matrix in packed storage, using scaling factors computed by ?ppequ.
?laqsy | s, d, c, z | Scales a symmetric/Hermitian matrix, using scaling factors computed by ?poequ.
?laqtr | s, d | Solves a real quasi-triangular system of equations, or a complex quasi-triangular system of special form, in real arithmetic.
?lar1v | s, d, c, z | Computes the (scaled) r-th column of the inverse of the submatrix in rows b1 through bn of the tridiagonal matrix ldLT - σ I.
?lar2v | s, d, c, z | Applies a vector of plane rotations with real cosines and real/complex sines from both sides to a sequence of 2-by-2 symmetric/Hermitian matrices.
?larf | s, d, c, z | Applies an elementary reflector to a general rectangular matrix.
?larfb | s, d, c, z | Applies a block reflector or its transpose/conjugate-transpose to a general rectangular matrix.
?larfg | s, d, c, z | Generates an elementary reflector (Householder matrix).
?larft | s, d, c, z | Forms the triangular factor T of a block reflector H = I - vtvH
?larfx | s, d, c, z | Applies an elementary reflector to a general rectangular matrix, with loop unrolling when the reflector has order ≤ 10.
?largv | s, d, c, z | Generates a vector of plane rotations with real cosines and real/complex sines.
?larnv | s, d, c, z | Returns a vector of random numbers from a uniform or normal distribution.
?larra | s, d | Computes the splitting points with the specified threshold.
?larrb | s, d | Provides limited bisection to locate eigenvalues for more accuracy.
?larrc | s, d | Computes the number of eigenvalues of the symmetric tridiagonal matrix.
?larrd | s, d | Computes the eigenvalues of a symmetric tridiagonal matrix to suitable accuracy.
?larre | s, d | Given the tridiagonal matrix T, sets small off-diagonal elements to zero and for each unreduced block Ti, finds base representations and eigenvalues.
?larrf | s, d | Finds a new relatively robust representation such that at least one of the eigenvalues is relatively isolated.
?larrj | s, d | Performs refinement of the initial estimates of the eigenvalues of the matrix T.
?larrk | s, d | Computes one eigenvalue of a symmetric tridiagonal matrix T to suitable accuracy.
?larrr | s, d | Performs tests to decide whether the symmetric tridiagonal matrix T warrants expensive computations which guarantee high relative accuracy in the eigenvalues.
?larrv | s, d, c, z | Computes the eigenvectors of the tridiagonal matrix T = L D LT given L, D and the eigenvalues of L D LT.
?lartg | s, d, c, z | Generates a plane rotation with real cosine and real/complex sine.
?lartv | s, d, c, z | Applies a vector of plane rotations with real cosines and real/complex sines to the elements of a pair of vectors.
?laruv | s, d | Returns a vector of n random real numbers from a uniform distribution.
?larz | s, d, c, z | Applies an elementary reflector (as returned by ?tzrzf) to a general matrix.
?larzb | s, d, c, z | Applies a block reflector or its transpose/conjugate-transpose to a general matrix.
?larzt | s, d, c, z | Forms the triangular factor T of a block reflector H = I - vtvH.
?las2 | s, d | Computes singular values of a 2-by-2 triangular matrix.
?lascl | s, d, c, z | Multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
?lasd0 | s, d | Computes the singular values of a real upper bidiagonal n-by-m matrix B with diagonal d and off-diagonal e. Used by ?bdsdc.
?lasd1 | s, d | Computes the SVD of an upper bidiagonal matrix B of the specified size. Used by ?bdsdc.
?lasd2 | s, d | Merges the two sets of singular values together into a single sorted set. Used by ?bdsdc.
?lasd3 | s, d | Finds all square roots of the roots of the secular equation, as defined by the values in D and Z, and then updates the singular vectors by matrix multiplication. Used by ?bdsdc.
?lasd4 | s, d | Computes the square root of the i-th updated eigenvalue of a positive symmetric rank-one modification to a positive diagonal matrix. Used by ?bdsdc.
?lasd5 | s, d | Computes the square root of the i-th eigenvalue of a positive symmetric rank-one modification of a 2-by-2 diagonal matrix.Used by ?bdsdc.
?lasd6 | s, d | Computes the SVD of an updated upper bidiagonal matrix obtained by merging two smaller ones by appending a row. Used by ?bdsdc.
?lasd7 | s, d | Merges the two sets of singular values together into a single sorted set. Then it tries to deflate the size of the problem. Used by ?bdsdc.
?lasd8 | s, d | Finds the square roots of the roots of the secular equation, and stores, for each element in D, the distance to its two nearest poles. Used by ?bdsdc.
?lasd9 | s, d | Finds the square roots of the roots of the secular equation, and stores, for each element in D, the distance to its two nearest poles. Used by ?bdsdc.
?lasda | s, d | Computes the singular value decomposition (SVD) of a real upper bidiagonal matrix with diagonal d and off-diagonal e. Used by ?bdsdc.
?lasdq | s, d | Computes the SVD of a real bidiagonal matrix with diagonal d and off-diagonal e. Used by ?bdsdc.
?lasdt | s, d | Creates a tree of subproblems for bidiagonal divide and conquer. Used by ?bdsdc.
?laset | s, d, c, z | Initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
?lasq1 | s, d | Computes the singular values of a real square bidiagonal matrix. Used by ?bdsqr.
?lasq2 | s, d | Computes all the eigenvalues of the symmetric positive definite tridiagonal matrix associated with the qd Array Z to high relative accuracy. Used by ?bdsqr and ?stegr.
?lasq3 | s, d | Checks for deflation, computes a shift and calls dqds. Used by ?bdsqr.
?lasq4 | s, d | Computes an approximation to the smallest eigenvalue using values of d from the previous transform. Used by ?bdsqr.
?lasq5 | s, d | Computes one dqds transform in ping-pong form. Used by ?bdsqr and ?stegr.
?lasq6 | s, d | Computes one dqd transform in ping-pong form. Used by ?bdsqr and ?stegr.
?lasr | s, d, c, z | Applies a sequence of plane rotations to a general rectangular matrix.
?lasrt | s, d | Sorts numbers in increasing or decreasing order.
?lassq | s, d, c, z | Updates a sum of squares represented in scaled form.
?lasv2 | s, d | Computes the singular value decomposition of a 2-by-2 triangular matrix.
?laswp | s, d, c, z | Performs a series of row interchanges on a general rectangular matrix.
?lasy2 | s, d | Solves the Sylvester matrix equation where the matrices are of order 1 or 2.
?lasyf | s, d, c, z | Computes a partial factorization of a real/complex symmetric matrix, using the diagonal pivoting method.
?lahef | c, z | Computes a partial factorization of a complex Hermitian indefinite matrix, using the diagonal pivoting method.
?latbs | s, d, c, z | Solves a triangular banded system of equations.
?latdf | s, d, c, z | Uses the LU factorization of the n-by-n matrix computed by ?getc2 and computes a contribution to the reciprocal Dif-estimate.
?latps | s, d, c, z | Solves a triangular system of equations with the matrix held in packed storage.
?latrd | s, d, c, z | Reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an orthogonal/unitary similarity transformation.
?latrs | s, d, c, z | Solves a triangular system of equations with the scale factor set to prevent overflow.
?latrz | s, d, c, z | Factors an upper trapezoidal matrix by means of orthogonal/unitary transformations.
?lauu2 | s, d, c, z | Computes the product UUH or LHL, where U and L are upper or lower triangular matrices (unblocked algorithm).
?lauum | s, d, c, z | Computes the product UUH or LHL, where U and L are upper or lower triangular matrices (blocked algorithm).
?lazq3 | s, d, | Checks for deflation, computes a shift and calls dqds
?lazq4 | s, d, | Computes an approximation to the smallest eigenvalue using values of d from the previous transform.
?org2l/?ung2l | s, d/c, z | Generates all or part of the orthogonal/unitary matrix Q from a QL factorization determined by ?geqlf (unblocked algorithm).
?org2r/?ung2r | s, d/c, z | Generates all or part of the orthogonal/unitary matrix Q from a QR factorization determined by ?geqrf (unblocked algorithm).
?orgl2/?ungl2 | s, d/c, z | Generates all or part of the orthogonal/unitary matrix Q from an LQ factorization determined by ?gelqf (unblocked algorithm).
?orgr2/?ungr2 | s, d/c, z | Generates all or part of the orthogonal/unitary matrix Q from an RQ factorization determined by ?gerqf (unblocked algorithm).
?orm2l/?unm2l | s, d/c, z | Multiplies a general matrix by the orthogonal/unitary matrix from a QL factorization determined by ?geqlf (unblocked algorithm).
?orm2r/?unm2r | s, d/c, z | Multiplies a general matrix by the orthogonal/unitary matrix from a QR factorization determined by ?geqrf (unblocked algorithm).
?orml2/?unml2 | s, d/c, z | Multiplies a general matrix by the orthogonal/unitary matrix from a LQ factorization determined by ?gelqf (unblocked algorithm).
?ormr2/?unmr2 | s, d/c, z | Multiplies a general matrix by the orthogonal/unitary matrix from a RQ factorization determined by ?gerqf (unblocked algorithm).
?ormr3/?unmr3 | s, d/c, z | Multiplies a general matrix by the orthogonal/unitary matrix from a RZ factorization determined by ?tzrzf (unblocked algorithm).
?pbtf2 | s, d, c, z | Computes the Cholesky factorization of a symmetric/ Hermitian positive definite band matrix (unblocked algorithm).
?potf2 | s, d, c, z | Computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblocked algorithm).
?ptts2 | s, d, c, z | Solves a tridiagonal system of the form AX=B using the L D LH factorization computed by ?pttrf.
?rscl | s, d, cs, zd | Multiplies a vector by the reciprocal of a real scalar.
?sygs2/?hegs2 | s, d/c, z | Reduces a symmetric/Hermitian definite generalized eigenproblem to standard form, using the factorization results obtained from ?potrf (unblocked algorithm).
?sytd2/?hetd2 | s, d/c, z | Reduces a symmetric/Hermitian matrix to real symmetric tridiagonal form by an orthogonal/unitary similarity transformation (unblocked algorithm).
?sytf2 | s, d, c, z | Computes the factorization of a real/complex symmetric indefinite matrix, using the diagonal pivoting method (unblocked algorithm).
?hetf2 | c, z | Computes the factorization of a complex Hermitian matrix, using the diagonal pivoting method (unblocked algorithm).
?tgex2 | s, d, c, z | Swaps adjacent diagonal blocks in an upper (quasi) triangular matrix pair by an orthogonal/unitary equivalence transformation.
?tgsy2 | s, d, c, z | Solves the generalized Sylvester equation (unblocked algorithm).
?trti2 | s, d, c, z | Computes the inverse of a triangular matrix (unblocked algorithm).
clag2z | c → z | Converts a complex single precision matrix to a complex double precision matrix.
dlag2s | d → s | Converts a double precision matrix to a single precision matrix.
slag2d | s → d | Converts a single precision matrix to a double precision matrix.
zlag2c | z → c | Converts a complex double precision matrix to a complex single precision matrix.