Jump to content

Numerical linear algebra

From Wikipedia, the free encyclopedia

Numerical linear algebra,sometimes calledapplied linear algebra,is the study of howmatrix operationscan be used to createcomputer algorithmswhichefficientlyand accurately provide approximate answers to questions incontinuousmathematics. It is a subfield ofnumerical analysis,and a type oflinear algebra.Computersusefloating-point arithmeticand cannot exactly representirrationaldata, so when a computer algorithm is applied to a matrix of data, it can sometimesincrease the differencebetween a number stored in the computer and the true number that it is an approximation of. Numerical linear algebra uses properties of vectors and matrices to develop computer algorithms that minimize the error introduced by the computer, and is also concerned with ensuring that the algorithm is as efficient as possible.

Numerical linear algebra aims to solve problems of continuousmathematicsusing finite precision computers, so its applications to thenaturalandsocial sciencesare as vast as the applications of continuous mathematics. It is often a fundamental part ofengineeringandcomputational scienceproblems, such asimageandsignal processing,telecommunication,computational finance,materials sciencesimulations,structural biology,data mining,bioinformatics,andfluid dynamics.Matrix methods are particularly used infinite difference methods,finite element methods,and the modeling ofdifferential equations.Noting the broad applications of numerical linear algebra,Lloyd N. Trefethenand David Bau, III argue that it is "as fundamental to the mathematical sciences as calculus and differential equations",[1]: x even though it is a comparatively small field.[2]Because many properties of matrices and vectors also apply to functions and operators, numerical linear algebra can also be viewed as a type offunctional analysiswhich has a particular emphasis on practical algorithms.[1]: ix 

Common problems in numerical linear algebra include obtaining matrix decompositions like thesingular value decomposition,theQR factorization,theLU factorization,or theeigendecomposition,which can then be used to answer common linear algebraic problems like solving linear systems of equations, locating eigenvalues, or least squares optimisation. Numerical linear algebra's central concern with developing algorithms that do not introduce errors when applied to real data on a finite precision computer is often achieved byiterativemethods rather than direct ones.

History[edit]

Numerical linear algebra was developed by computer pioneers likeJohn von Neumann,Alan Turing,James H. Wilkinson,Alston Scott Householder,George Forsythe,andHeinz Rutishauser,in order to apply the earliest computers to problems in continuous mathematics, such as ballistics problems and the solutions to systems ofpartial differential equations.[2]The first serious attempt to minimize computer error in the application of algorithms to real data is John von Neumann andHerman Goldstine's work in 1947.[3]The field has grown as technology has increasingly enabled researchers to solve complex problems on extremely large high-precision matrices, and some numerical algorithms have grown in prominence as technologies likeparallel computinghave made them practical approaches to scientific problems.[2]

Matrix decompositions[edit]

Partitioned matrices[edit]

For many problems in applied linear algebra, it is useful to adopt the perspective of a matrix as being a concatenation of column vectors. For example, when solving the linear system,rather than understandingxas the product ofwithb,it is helpful to think ofxas the vector ofcoefficientsin the linear expansion ofbin thebasisformed by the columns ofA.[1]: 8 Thinking of matrices as a concatenation of columns is also a practical approach for the purposes of matrix algorithms. This is because matrix algorithms frequently contain two nested loops: one over the columns of a matrixA,and another over the rows ofA.For example, for matricesand vectorsand,we could use the column partitioning perspective to computey:=Ax+yas

forq=1:n
forp=1:m
y(p)=A(p,q)*x(q)+y(p)
end
end

Singular value decomposition[edit]

The singular value decomposition of a matrixiswhereUandVareunitary,andisdiagonal.The diagonal entries ofare called thesingular valuesofA.Because singular values are the square roots of theeigenvaluesof,there is a tight connection between the singular value decomposition and eigenvalue decompositions. This means that most methods for computing the singular value decomposition are similar to eigenvalue methods;[1]: 36 perhaps the most common method involvesHouseholder procedures.[1]: 253 

QR factorization[edit]

The QR factorization of a matrixis a matrixand a matrixso thatA = QR,whereQisorthogonalandRisupper triangular.[1]: 50 [4]: 223 The two main algorithms for computing QR factorizations are theGram–Schmidt processand theHouseholder transformation.The QR factorization is often used to solvelinear least-squaresproblems, and eigenvalue problems (by way of the iterativeQR algorithm).

LU factorization[edit]

An LU factorization of a matrixAconsists of a lower triangular matrixLand an upper triangular matrixUso thatA = LU.The matrixUis found by an upper triangularization procedure which involves left-multiplyingAby a series of matricesto form the product,so that equivalently.[1]: 147 [4]: 96 

Eigenvalue decomposition[edit]

The eigenvalue decomposition of a matrixis,where the columns ofXare the eigenvectors ofA,andis a diagonal matrix the diagonal entries of which are the corresponding eigenvalues ofA.[1]: 33 There is no direct method for finding the eigenvalue decomposition of an arbitrary matrix. Because it is not possible to write a program that finds the exact roots of an arbitrary polynomial in finite time, any general eigenvalue solver must necessarily be iterative.[1]: 192 

Algorithms[edit]

Gaussian elimination[edit]

From the numerical linear algebra perspective, Gaussian elimination is a procedure for factoring a matrixAinto itsLUfactorization, which Gaussian elimination accomplishes by left-multiplyingAby a succession of matricesuntilUis upper triangular andLis lower triangular, where.[1]: 148 Naive programs for Gaussian elimination are notoriously highly unstable, and produce huge errors when applied to matrices with many significant digits.[2]The simplest solution is to introducepivoting,which produces a modified Gaussian elimination algorithm that is stable.[1]: 151 

Solutions of linear systems[edit]

Numerical linear algebra characteristically approaches matrices as a concatenation of columns vectors. In order to solve the linear system,the traditional algebraic approach is to understandxas the product ofwithb.Numerical linear algebra instead interpretsxas the vector of coefficients of the linear expansion ofbin the basis formed by the columns ofA.[1]: 8 

Many different decompositions can be used to solve the linear problem, depending on the characteristics of the matrixAand the vectorsxandb,which may make one factorization much easier to obtain than others. IfA=QRis a QR factorization ofA,then equivalently.This is as easy to compute as a matrix factorization.[1]: 54 Ifis an eigendecompositionA,and we seek to findbso thatb=Ax,withand,then we have.[1]: 33 This is closely related to the solution to the linear system using the singular value decomposition, because singular values of a matrix are the absolute values of its eigenvalues, which are also equivalent to the square roots of the absolute values of the eigenvalues of the Gram matrix.And ifA=LUis anLUfactorization ofA,thenAx=bcan be solved using the triangular matricesLy=bandUx=y.[1]: 147 [4]: 99 

Least squares optimisation[edit]

Matrix decompositions suggest a number of ways to solve the linear systemr=bAxwhere we seek to minimizer,as in theregression problem.The QR algorithm solves this problem by computing the reduced QR factorization ofAand rearranging to obtain.This upper triangular system can then be solved forx.The SVD also suggests an algorithm for obtaining linear least squares. By computing the reduced SVD decompositionand then computing the vector,we reduce the least squares problem to a simple diagonal system.[1]: 84 The fact that least squares solutions can be produced by the QR and SVD factorizations means that, in addition to the classicalnormal equationsmethod for solving least squares problems, these problems can also be solved by methods that include the Gram-Schmidt algorithm and Householder methods.

Conditioning and stability[edit]

Allow that a problem is a function,whereXis a normed vector space of data andYis a normed vector space of solutions. For some data point,the problem is said to be ill-conditioned if a small perturbation inxproduces a large change in the value off(x). We can quantify this by defining acondition numberwhich represents how well-conditioned a problem is, defined as

Instability is the tendency of computer algorithms, which depend onfloating-point arithmetic,to produce results that differ dramatically from the exact mathematical solution to a problem. When a matrix contains real data with manysignificant digits,many algorithms for solving problems like linear systems of equation or least squares optimisation may produce highly inaccurate results. Creating stable algorithms for ill-conditioned problems is a central concern in numerical linear algebra. One example is that the stability of householder triangularization makes it a particularly robust solution method for linear systems, whereas the instability of the normal equations method for solving least squares problems is a reason to favour matrix decomposition methods like using the singular value decomposition. Some matrix decomposition methods may be unstable, but have straightforward modifications that make them stable; one example is the unstable Gram–Schmidt, which can easily be changed to produce the stablemodified Gram–Schmidt.[1]: 140 Another classical problem in numerical linear algebra is the finding that Gaussian elimination is unstable, but becomes stable with the introduction of pivoting.

Iterative methods[edit]

There are two reasons that iterative algorithms are an important part of numerical linear algebra. First, many important numerical problems have no direct solution; in order to find the eigenvalues and eigenvectors of an arbitrary matrix, we can only adopt an iterative approach. Second, noniterative algorithms for an arbitrarymatrix requiretime, which is a surprisingly high floor given that matrices contain onlynumbers. Iterative approaches can take advantage of several features of some matrices to reduce this time. For example, when a matrix issparse,an iterative algorithm can skip many of the steps that a direct approach would necessarily follow, even if they are redundant steps given a highly structured matrix.

The core of many iterative methods in numerical linear algebra is the projection of a matrix onto a lower dimensionalKrylov subspace,which allows features of a high-dimensional matrix to be approximated by iteratively computing the equivalent features of similar matrices starting in a low dimension space and moving to successively higher dimensions. WhenAis symmetric and we wish to solve the linear problemAx=b,the classical iterative approach is theconjugate gradient method.IfAis not symmetric, then examples of iterative solutions to the linear problem are thegeneralized minimal residual methodandCGN.IfAis symmetric, then to solve the eigenvalue and eigenvector problem we can use theLanczos algorithm,and ifAis non-symmetric, then we can useArnoldi iteration.

Software[edit]

Several programming languages use numerical linear algebra optimisation techniques and are designed to implement numerical linear algebra algorithms. These languages includeMATLAB,Analytica,Maple,andMathematica.Other programming languages which are not explicitly designed for numerical linear algebra have libraries that provide numerical linear algebra routines and optimisation;CandFortranhave packages likeBasic Linear Algebra SubprogramsandLAPACK,Pythonhas the libraryNumPy,andPerlhas thePerl Data Language.Many numerical linear algebra commands inRrely on these more fundamental libraries likeLAPACK.[5]More libraries can be found on theList of numerical libraries.

References[edit]

  1. ^abcdefghijklmnopqTrefethen, Lloyd; Bau III, David (1997).Numerical Linear Algebra(1st ed.). Philadelphia: SIAM.ISBN978-0-89871-361-9.
  2. ^abcdGolub, Gene H."A History of Modern Numerical Linear Algebra"(PDF).University of Chicago Statistics Department.RetrievedFebruary 17,2019.
  3. ^von Neumann, John; Goldstine, Herman H. (1947)."Numerical inverting of matrices of high order".Bulletin of the American Mathematical Society.53(11): 1021–1099.doi:10.1090/s0002-9904-1947-08909-6.S2CID16174165.
  4. ^abcGolub, Gene H.; Van Loan, Charles F. (1996).Matrix Computations(3rd ed.). Baltimore: The Johns Hopkins University Press.ISBN0-8018-5413-X.
  5. ^Rickert, Joseph (August 29, 2013)."R and Linear Algebra".R-bloggers.RetrievedFebruary 17,2019.

Further reading[edit]

  • Dongarra, Jack;Hammarling, Sven (1990). "Evolution of Numerical Software for Dense Linear Algebra". In Cox, M. G.; Hammarling, S. (eds.).Reliable Numerical Computation.Oxford: Clarendon Press. pp. 297–327.ISBN0-19-853564-3.

External links[edit]