Solving Sets of Equations. 150 B.C.E., 九章算術 Carl Friedrich Gauss,

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Solving Sets of Equations. 150 B.C.E., 九章算術 Carl Friedrich Gauss,"

Transcription

1 Solving Sets of Equations 5 B.C.E., 九章算術 Carl Friedrich Gauss,

2 Gaussian-Jordan Elimination In Gauss-Jordan elimination, matrix is reduced to diagonal rather than triangular form Row combinations are used to eliminate entries above as well as below diagonal Numerical Methods Wen-Chieh Lin

3 Numerical Methods Wen-Chieh Lin Gaussian-Jordan Elimination (cont.) Elimination matrix used for given column vector a is of form n i a a m a a a a a a m m m m k i i k n k k k n k k,,, where M k a

4 Gaussian-Jordan Elimination (cont.) Gauss-Jordan elimination requires about n / multiplications and similar number of additions, 5% more expensive than LU factorization During elimination phase, same row operations are also applied to right-hand-side vector (vectors) of system of linear equations Once matrix is in diagonal form, components of solution are computed by dividing each entry of transformed right-hand side by corresponding diagonal entry of matrix Numerical Methods Wen-Chieh Lin 4

5 Using LU for multiple right-hand sides If LU factorization of a matrix A is given, we can solve Ax = b for different b vectors as follows: Ax = b LUx = b Solve Ly = b using forward substitution Then solve Ux = y using backward substitution Numerical Methods Wen-Chieh Lin 5

6 Row Interchanges Gaussian elimination breaks down if leading diagonal entry of remaining unreduced matrix is zero at any stage Easy fix: if diagonal entry in column k is zero, then interchange row k with some subsequent row having nonzero entry in column k and then proceed as usual If there is no nonzero on or below diagonal in column k, then there is nothing to do at this stage, so skip to next column Numerical Methods Wen-Chieh Lin 6

7 Row Interchanges (cont.) Zero on diagonal causes resulting upper triangular matrix to be singular, but LU factorization can still be completed Subsequent back-substitution will fail, however, as it should for singular matrix Numerical Methods Wen-Chieh Lin 7

8 Partial Pivoting In principle, any nonzero value will do as pivot, but in practice pivot should be chosen to minimize error propagation To avoid amplifying previous rounding errors when multiplying remaining portion of matrix by elementary elimination matrix, multipliers should not exceed in magnitude This can be accomplished by choosing entry of largest magnitude on or below diagonal as pivot at each stage Numerical Methods Wen-Chieh Lin 8

9 Partial Pivoting (cont.) Partial pivoting is necessary in practice for numerically stable implementation of Gaussian elimination for general linear system Numerical Methods Wen-Chieh Lin 9

10 LU Factorization with Partial Pivoting With partial pivoting, each M k is preceded by permutation P k to interchange rows to bring entry of largest magnitude into diagonal pivot position Still obtain MA = U, with U upper triangular, but now M = M n- P n- M P L=M - is not a triangular due to permutations L M ( M P T T nn MP MP ) P LP L P Numerical Methods Wen-Chieh Lin T n L n

11 Numerical Methods Wen-Chieh Lin Example: Pivoting Ax b x x x ] [ b A P M ] [ b A M P

12 Numerical Methods Wen-Chieh Lin Example: Pivoting (cont.) ] [ b A P M P ] [ b A M P M P

13 Numerical Methods Wen-Chieh Lin Example: Pivoting (cont.) ) ( L L P P M P M P M L T T U is still upper triangular but L is not lower triangular due to permutations

14 Complete Pivoting Complete pivoting is more exhaustive strategy in which largest entry in entire remaining unreduced submatrix is permuted into diagonal pivot position Requires interchanging columns as well as rows leading to factorization PAQ = LU with L unit lower triangular, U upper triangular, and P, Q permutations Numerical Methods Wen-Chieh Lin 4

15 Complete Pivoting (cont.) Numerical stability of complete pivoting is theoretically superior, but pivot search is more expensive than for partial pivoting Numerical stability of partial pivoting is more than adequate in practice, so it is almost always used in solving linear system by Gaussian elimination Numerical Methods Wen-Chieh Lin 5

16 Example: Pivoting and Precision Consider Without pivoting x ( E y x By Dx Ey C BD F E ) y C F x By CD BD B ( C C F CD CD BD B) C C C B Numerical Methods Wen-Chieh Lin 6

17 Numerical Methods Wen-Chieh Lin 7 Example: Pivoting and Precision With pivoting C By x F Ey Dx D F C y D E B F Ey Dx ) ( B C D E B D F C y BD CE BF D B C E F x ) (

18 Scaling Linear Systems In principle, solution to linear system is unaffected by diagonal scaling of matrix and right-hand-side vector Example: row scaling premultiplying both sides of system by nonsingular diagonal matrix D, the solution is unchanged DAx Db x ( DA) Db A b Numerical Methods Wen-Chieh Lin 8

19 Scaling Linear Systems (cont.) In practice, scaling affects both conditioning of matrix and selection of pivots in Gaussian elimination, which in turn affect numerical accuracy in finite-precision arithmetic It is usually best if all entries of matrix have about same size Numerical Methods Wen-Chieh Lin 9

20 Scaling Linear Systems (cont.) Sometimes it may be obvious how to accomplish this by choice of measurement units for variables, but there is no foolproof method for doing so in general Scaling can introduce error if not done carefully! Numerical Methods Wen-Chieh Lin

21 Given Example: Scale Partial Pivoting A, the exact solution is x = [,, ] T If only digits of precision is used we obtain a erroneous solution x = [.99,.9,.] T.67 5 b Numerical Methods Wen-Chieh Lin

22 Example: Scale Partial Pivoting (cont.) Premultiplying by a scaling matrix A S[ A b], b / S.5.5. / / Pivoting is required at the first column! Numerical Methods Wen-Chieh Lin

23 Example: Scale Partial Pivoting (cont.) In algorithm implementation, we don t scale equations explicitly Instead, we store the scale vector and row interchange information and only use them for pivot selection s partial pivoting no pivoting is required Numerical Methods Wen-Chieh Lin

24 Complexity of Solving Linear System LU factorization requires about n / floatingpoint multiplications and similar number of additions Forward and backward substitution for single right-hand side vector together require about n multiplications and similar number of additions Numerical Methods Wen-Chieh Lin 4

25 Complexity of Solving Linear System Can also solve linear system by matrix inversion: x = A - b Computing A - is equivalent to solve n linear systems, requiring LU factorization of A followed by n forward and backward substitutions, one for each column of identity matrix Operation count for inversion is about n, three times expensive as LU factorization Numerical Methods Wen-Chieh Lin 5

26 Inversion vs. Factorization x=a - b Needs to solve Ax = I LU factorization n forward and backward substitutions Multiplication of matrix and vector LUx = b LU factorization One forward and backward substitution Numerical Methods Wen-Chieh Lin 6

27 Inversion vs. Factorization (cont.) Inversion gives less accuracy answer; e.g., solving x = 8 by division gives x = 8/ = 6, but inversion gives x = - 8 =. 8 = 5.99 (using -digit arithmetic) Numerical Methods Wen-Chieh Lin 7

28 Inversion vs. Factorization (cont.) Matrix inverses often occurs as convenient notation in formulas, but explicit inverse is rarely required to implement such formulas For example, product A - B should be computed by LU factorization of A, followed by forward and backward substitution using each column of B Use factorization instead of inversion Numerical Methods Wen-Chieh Lin 8

29 Ill-Conditioned Systems Recall that A system is ill-conditioned if the solution is very sensitive to changes in the input Example: a near-singular coefficient matrix x.. y. x. y.. b. 98 x. y. 98 b. x y. We cannot test the accuracy of the computed solution merely by substituting the solution into equation to see whether the right-hand sides are reproduced Numerical Methods Wen-Chieh Lin 9

30 Condition Numbers and Norms The condition number of a matrix is defined in terms of norms We ll define the condition number of a matrix after introducing vector and matrix norms Numerical Methods Wen-Chieh Lin

31 Vector Norms Magnitude, modulus, or absolute value for scalars generalizes to norm for vectors We will use only p-norm, defined by x p i i for integer p > and n-vector x Important special cases x x n p n n x x x x max x i i i i i i -norm -norm p -norm Numerical Methods Wen-Chieh Lin

32 Properties of Vector Norms For any vector norm x and x if and only if x kx k x for any scalar k x y x y (triangular inequality) The definition of a vector norm needs to satisfies the above properties Numerical Methods Wen-Chieh Lin

33 Matrix Norms Matrix norm corresponding to given vector norm is defined by A max x Ax x Norm of a matrix measures maximum stretching that the matrix does to any vector in given vector norm Numerical Methods Wen-Chieh Lin

34 Matrix Norms Matrix norm corresponding to vector -nom is maximum absolute column sum A max Matrix norm corresponding to vector -norm is maximum absolute row sum A Handy way to remember these is that matrix norms agree with corresponding vector norms for n by matrix j max i n i n a j a ij ij Numerical Methods Wen-Chieh Lin 4

35 Properties of Matrix Norms Matrix norms we have defined satisfies A ka A B AB and k A A A A B for if B and only if any scalar Above are actually the required properties when a matrix norm is defined! k A Numerical Methods Wen-Chieh Lin 5

36 Condition Number Condition number of square nonsingular matrix A is defined by cond( A) A A By convention, cond(a) = if A is singular Large cond(a) means A is singular Since A x Ax A A max max x x x x condition number measures ratio of maximum stretching to maximum shrinking does to any nonzero vectors Numerical Methods Wen-Chieh Lin 6

37 Properties of Condition Number For any matrix A, cond(a) For identity matrix, cond(i) = For any matrix A and scalar k, cond(ka) = cond(a) Numerical Methods Wen-Chieh Lin 7

38 Computing Condition Number Definition of condition number involves matrix inverse, so it is nontrivial to compute Computing condition number from definition would require much more work than computing solution whose accuracy is to be assessed In practice, condition number is estimated inexpensively as byproduct of solution process Numerical Methods Wen-Chieh Lin 8

39 Computing Condition Number Matrix norm A is easily computed as maximum column sum (or row sum, depending on norm used) Estimating challenging A at low cost is more From properties of norms, if Az = y, then z A y A y A and bound is achieved for optimally chosen y z y Numerical Methods Wen-Chieh Lin 9

40 Computing Condition Number Efficient condition estimators heuristically pick y with large ratio z y, yielding good estimator for A Good software packages for linear systems provide efficient and reliable condition estimator Numerical Methods Wen-Chieh Lin 4

41 Error Bounds Condition number yields error bound for computed solution to linear system Let x be solution to Ax = b, and x approximate solution, r is residual be an r b Ax Ax Ax Ae AB A B r A e e A AB A B r e A r r A e A r Numerical Methods Wen-Chieh Lin 4

42 Error Bounds (cont.) Similarly, from b = Ax and x = A - b we obtain b x A A Combined with previous result r e A A We have r e A A b x b r A A r b Numerical Methods Wen-Chieh Lin 4

43 Error Bounds (cont.) Similarly, from b = Ax and x = A - b we obtain b x A A b Combined with previous result r e A r A condition number of A! We have r e r A A A A b x b Numerical Methods Wen-Chieh Lin 4

44 Error Bounds (cont.) cond( A) r b e x cond( A) r b The relative error in the computed solution vector is bounded by the relative residual divided/multiplied by the condition number When the condition number is large, the residual gives little information about the accuracy Numerical Methods Wen-Chieh Lin 44

45 Error Bounds Illustration In two dimensions, uncertainty in intersection point of two lines depends on whether lines are nearly parallel well-conditioned ill-conditioned Numerical Methods Wen-Chieh Lin 45

46 Residual Residual vector of approximate solution to linear system Ax = b is defined by r b Ax In theory, if A is nonsingular, then x x if, and only if, r but they are not necessarily small simultaneously Since e r cond( A) x b small relative residual implies small relative error in approximate solution only if A is wellconditioned Numerical Methods Wen-Chieh Lin 46

47 Iterative Refinement Given approximate solution x to linear system Ax = b, compute residual r b Ax Now solve linear system Az = r and take x x z as new and better approximate solution, since Ax A ( x z ) Ax Az (b r ) r b Numerical Methods Wen-Chieh Lin 47

48 Iterative Refinement (cont.) Process can be repeated to refine solution successively until convergence, potentially producing solution accurate to full machine precision Numerical Methods Wen-Chieh Lin 48

49 Error in Coefficients of Matrix Let A A matrix and system Using x A x x Ax b A A be E the perturbed coefficient x the solution to the perturbed b A and ( Ax) ( A Ax ( Ax) A A ) x b A ( Ax) Ax x A x Ex x x x A Ex Numerical Methods Wen-Chieh Lin 49

50 Error in Coefficients of Matrix (cont.) x x x x A A Ex E x A x x E cond( A) x A A E A x Error of the solution relative to the norm of the computed solution can be as large as the relative error in the coefficients of A multiplied by the condition number Numerical Methods Wen-Chieh Lin 5

Direct Methods for Solving Linear Systems. Matrix Factorization

Direct Methods for Solving Linear Systems. Matrix Factorization Direct Methods for Solving Linear Systems Matrix Factorization Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011

More information

7 Gaussian Elimination and LU Factorization

7 Gaussian Elimination and LU Factorization 7 Gaussian Elimination and LU Factorization In this final section on matrix factorization methods for solving Ax = b we want to take a closer look at Gaussian elimination (probably the best known method

More information

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix 7. LU factorization EE103 (Fall 2011-12) factor-solve method LU factorization solving Ax = b with A nonsingular the inverse of a nonsingular matrix LU factorization algorithm effect of rounding error sparse

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 3 Linear Least Squares Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction

More information

Solution of Linear Systems

Solution of Linear Systems Chapter 3 Solution of Linear Systems In this chapter we study algorithms for possibly the most commonly occurring problem in scientific computing, the solution of linear systems of equations. We start

More information

Solving Systems of Linear Equations

Solving Systems of Linear Equations LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how

More information

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method 578 CHAPTER 1 NUMERICAL METHODS 1. ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS As a numerical technique, Gaussian elimination is rather unusual because it is direct. That is, a solution is obtained after

More information

Matrix Norms. Tom Lyche. September 28, Centre of Mathematics for Applications, Department of Informatics, University of Oslo

Matrix Norms. Tom Lyche. September 28, Centre of Mathematics for Applications, Department of Informatics, University of Oslo Matrix Norms Tom Lyche Centre of Mathematics for Applications, Department of Informatics, University of Oslo September 28, 2009 Matrix Norms We consider matrix norms on (C m,n, C). All results holds for

More information

Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication).

Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix multiplication). MAT 2 (Badger, Spring 202) LU Factorization Selected Notes September 2, 202 Abstract: We describe the beautiful LU factorization of a square matrix (or how to write Gaussian elimination in terms of matrix

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

More information

Linear Dependence Tests

Linear Dependence Tests Linear Dependence Tests The book omits a few key tests for checking the linear dependence of vectors. These short notes discuss these tests, as well as the reasoning behind them. Our first test checks

More information

Solving Systems of Linear Equations. Substitution

Solving Systems of Linear Equations. Substitution Solving Systems of Linear Equations There are two basic methods we will use to solve systems of linear equations: Substitution Elimination We will describe each for a system of two equations in two unknowns,

More information

Solving Linear Systems of Equations. Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.

Solving Linear Systems of Equations. Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx. Solving Linear Systems of Equations Gerald Recktenwald Portland State University Mechanical Engineering Department gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:

More information

6. Cholesky factorization

6. Cholesky factorization 6. Cholesky factorization EE103 (Fall 2011-12) triangular matrices forward and backward substitution the Cholesky factorization solving Ax = b with A positive definite inverse of a positive definite matrix

More information

Elementary Matrices and The LU Factorization

Elementary Matrices and The LU Factorization lementary Matrices and The LU Factorization Definition: ny matrix obtained by performing a single elementary row operation (RO) on the identity (unit) matrix is called an elementary matrix. There are three

More information

SOLVING LINEAR SYSTEMS

SOLVING LINEAR SYSTEMS SOLVING LINEAR SYSTEMS Linear systems Ax = b occur widely in applied mathematics They occur as direct formulations of real world problems; but more often, they occur as a part of the numerical analysis

More information

Factorization Theorems

Factorization Theorems Chapter 7 Factorization Theorems This chapter highlights a few of the many factorization theorems for matrices While some factorization results are relatively direct, others are iterative While some factorization

More information

by the matrix A results in a vector which is a reflection of the given

by the matrix A results in a vector which is a reflection of the given Eigenvalues & Eigenvectors Example Suppose Then So, geometrically, multiplying a vector in by the matrix A results in a vector which is a reflection of the given vector about the y-axis We observe that

More information

Vector and Matrix Norms

Vector and Matrix Norms Chapter 1 Vector and Matrix Norms 11 Vector Spaces Let F be a field (such as the real numbers, R, or complex numbers, C) with elements called scalars A Vector Space, V, over the field F is a non-empty

More information

Operation Count; Numerical Linear Algebra

Operation Count; Numerical Linear Algebra 10 Operation Count; Numerical Linear Algebra 10.1 Introduction Many computations are limited simply by the sheer number of required additions, multiplications, or function evaluations. If floating-point

More information

DETERMINANTS. b 2. x 2

DETERMINANTS. b 2. x 2 DETERMINANTS 1 Systems of two equations in two unknowns A system of two equations in two unknowns has the form a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 This can be written more concisely in

More information

We seek a factorization of a square matrix A into the product of two matrices which yields an

We seek a factorization of a square matrix A into the product of two matrices which yields an LU Decompositions We seek a factorization of a square matrix A into the product of two matrices which yields an efficient method for solving the system where A is the coefficient matrix, x is our variable

More information

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1. MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

More information

CS3220 Lecture Notes: QR factorization and orthogonal transformations

CS3220 Lecture Notes: QR factorization and orthogonal transformations CS3220 Lecture Notes: QR factorization and orthogonal transformations Steve Marschner Cornell University 11 March 2009 In this lecture I ll talk about orthogonal matrices and their properties, discuss

More information

1 Solving LPs: The Simplex Algorithm of George Dantzig

1 Solving LPs: The Simplex Algorithm of George Dantzig Solving LPs: The Simplex Algorithm of George Dantzig. Simplex Pivoting: Dictionary Format We illustrate a general solution procedure, called the simplex algorithm, by implementing it on a very simple example.

More information

1.2 Solving a System of Linear Equations

1.2 Solving a System of Linear Equations 1.. SOLVING A SYSTEM OF LINEAR EQUATIONS 1. Solving a System of Linear Equations 1..1 Simple Systems - Basic De nitions As noticed above, the general form of a linear system of m equations in n variables

More information

9. Numerical linear algebra background

9. Numerical linear algebra background Convex Optimization Boyd & Vandenberghe 9. Numerical linear algebra background matrix structure and algorithm complexity solving linear equations with factored matrices LU, Cholesky, LDL T factorization

More information

Solving Linear Systems, Continued and The Inverse of a Matrix

Solving Linear Systems, Continued and The Inverse of a Matrix , Continued and The of a Matrix Calculus III Summer 2013, Session II Monday, July 15, 2013 Agenda 1. The rank of a matrix 2. The inverse of a square matrix Gaussian Gaussian solves a linear system by reducing

More information

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation

More information

4. Matrix inverses. left and right inverse. linear independence. nonsingular matrices. matrices with linearly independent columns

4. Matrix inverses. left and right inverse. linear independence. nonsingular matrices. matrices with linearly independent columns L. Vandenberghe EE133A (Spring 2016) 4. Matrix inverses left and right inverse linear independence nonsingular matrices matrices with linearly independent columns matrices with linearly independent rows

More information

Diagonal, Symmetric and Triangular Matrices

Diagonal, Symmetric and Triangular Matrices Contents 1 Diagonal, Symmetric Triangular Matrices 2 Diagonal Matrices 2.1 Products, Powers Inverses of Diagonal Matrices 2.1.1 Theorem (Powers of Matrices) 2.2 Multiplying Matrices on the Left Right by

More information

The Inverse of a Matrix

The Inverse of a Matrix The Inverse of a Matrix 7.4 Introduction In number arithmetic every number a ( 0) has a reciprocal b written as a or such that a ba = ab =. Some, but not all, square matrices have inverses. If a square

More information

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections

More information

Notes on Determinant

Notes on Determinant ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without

More information

Lecture Notes: Matrix Inverse. 1 Inverse Definition

Lecture Notes: Matrix Inverse. 1 Inverse Definition Lecture Notes: Matrix Inverse Yufei Tao Department of Computer Science and Engineering Chinese University of Hong Kong taoyf@cse.cuhk.edu.hk Inverse Definition We use I to represent identity matrices,

More information

Vectors. Philippe B. Laval. Spring 2012 KSU. Philippe B. Laval (KSU) Vectors Spring /

Vectors. Philippe B. Laval. Spring 2012 KSU. Philippe B. Laval (KSU) Vectors Spring / Vectors Philippe B Laval KSU Spring 2012 Philippe B Laval (KSU) Vectors Spring 2012 1 / 18 Introduction - Definition Many quantities we use in the sciences such as mass, volume, distance, can be expressed

More information

Lecture 3: Finding integer solutions to systems of linear equations

Lecture 3: Finding integer solutions to systems of linear equations Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture

More information

Solving Systems of Linear Equations

Solving Systems of Linear Equations LECTURE 5 Solving Systems of Linear Equations Recall that we introduced the notion of matrices as a way of standardizing the expression of systems of linear equations In today s lecture I shall show how

More information

Linear Equations ! 25 30 35$ & " 350 150% & " 11,750 12,750 13,750% MATHEMATICS LEARNING SERVICE Centre for Learning and Professional Development

Linear Equations ! 25 30 35$ &  350 150% &  11,750 12,750 13,750% MATHEMATICS LEARNING SERVICE Centre for Learning and Professional Development MathsTrack (NOTE Feb 2013: This is the old version of MathsTrack. New books will be created during 2013 and 2014) Topic 4 Module 9 Introduction Systems of to Matrices Linear Equations Income = Tickets!

More information

NUMERICALLY EFFICIENT METHODS FOR SOLVING LEAST SQUARES PROBLEMS

NUMERICALLY EFFICIENT METHODS FOR SOLVING LEAST SQUARES PROBLEMS NUMERICALLY EFFICIENT METHODS FOR SOLVING LEAST SQUARES PROBLEMS DO Q LEE Abstract. Computing the solution to Least Squares Problems is of great importance in a wide range of fields ranging from numerical

More information

Helpsheet. Giblin Eunson Library MATRIX ALGEBRA. library.unimelb.edu.au/libraries/bee. Use this sheet to help you:

Helpsheet. Giblin Eunson Library MATRIX ALGEBRA. library.unimelb.edu.au/libraries/bee. Use this sheet to help you: Helpsheet Giblin Eunson Library ATRIX ALGEBRA Use this sheet to help you: Understand the basic concepts and definitions of matrix algebra Express a set of linear equations in matrix notation Evaluate determinants

More information

Introduction to Matrix Algebra I

Introduction to Matrix Algebra I Appendix A Introduction to Matrix Algebra I Today we will begin the course with a discussion of matrix algebra. Why are we studying this? We will use matrix algebra to derive the linear regression model

More information

Linear Algebra: Determinants, Inverses, Rank

Linear Algebra: Determinants, Inverses, Rank D Linear Algebra: Determinants, Inverses, Rank D 1 Appendix D: LINEAR ALGEBRA: DETERMINANTS, INVERSES, RANK TABLE OF CONTENTS Page D.1. Introduction D 3 D.2. Determinants D 3 D.2.1. Some Properties of

More information

SECTION 8.3: THE INVERSE OF A SQUARE MATRIX

SECTION 8.3: THE INVERSE OF A SQUARE MATRIX (Section 8.3: The Inverse of a Square Matrix) 8.47 SECTION 8.3: THE INVERSE OF A SQUARE MATRIX PART A: (REVIEW) THE INVERSE OF A REAL NUMBER If a is a nonzero real number, then aa 1 = a 1 a = 1. a 1, or

More information

13 MATH FACTS 101. 2 a = 1. 7. The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

13 MATH FACTS 101. 2 a = 1. 7. The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions. 3 MATH FACTS 0 3 MATH FACTS 3. Vectors 3.. Definition We use the overhead arrow to denote a column vector, i.e., a linear segment with a direction. For example, in three-space, we write a vector in terms

More information

SYSTEMS OF EQUATIONS

SYSTEMS OF EQUATIONS SYSTEMS OF EQUATIONS 1. Examples of systems of equations Here are some examples of systems of equations. Each system has a number of equations and a number (not necessarily the same) of variables for which

More information

1 VECTOR SPACES AND SUBSPACES

1 VECTOR SPACES AND SUBSPACES 1 VECTOR SPACES AND SUBSPACES What is a vector? Many are familiar with the concept of a vector as: Something which has magnitude and direction. an ordered pair or triple. a description for quantities such

More information

Question 2: How do you solve a matrix equation using the matrix inverse?

Question 2: How do you solve a matrix equation using the matrix inverse? Question : How do you solve a matrix equation using the matrix inverse? In the previous question, we wrote systems of equations as a matrix equation AX B. In this format, the matrix A contains the coefficients

More information

Solutions to Review Problems

Solutions to Review Problems Chapter 1 Solutions to Review Problems Chapter 1 Exercise 42 Which of the following equations are not linear and why: (a x 2 1 + 3x 2 2x 3 = 5. (b x 1 + x 1 x 2 + 2x 3 = 1. (c x 1 + 2 x 2 + x 3 = 5. (a

More information

EC9A0: Pre-sessional Advanced Mathematics Course

EC9A0: Pre-sessional Advanced Mathematics Course University of Warwick, EC9A0: Pre-sessional Advanced Mathematics Course Peter J. Hammond & Pablo F. Beker 1 of 55 EC9A0: Pre-sessional Advanced Mathematics Course Slides 1: Matrix Algebra Peter J. Hammond

More information

1 Review of Least Squares Solutions to Overdetermined Systems

1 Review of Least Squares Solutions to Overdetermined Systems cs4: introduction to numerical analysis /9/0 Lecture 7: Rectangular Systems and Numerical Integration Instructor: Professor Amos Ron Scribes: Mark Cowlishaw, Nathanael Fillmore Review of Least Squares

More information

5.3 Determinants and Cramer s Rule

5.3 Determinants and Cramer s Rule 290 5.3 Determinants and Cramer s Rule Unique Solution of a 2 2 System The 2 2 system (1) ax + by = e, cx + dy = f, has a unique solution provided = ad bc is nonzero, in which case the solution is given

More information

8 Square matrices continued: Determinants

8 Square matrices continued: Determinants 8 Square matrices continued: Determinants 8. Introduction Determinants give us important information about square matrices, and, as we ll soon see, are essential for the computation of eigenvalues. You

More information

1 Determinants and the Solvability of Linear Systems

1 Determinants and the Solvability of Linear Systems 1 Determinants and the Solvability of Linear Systems In the last section we learned how to use Gaussian elimination to solve linear systems of n equations in n unknowns The section completely side-stepped

More information

LINEAR ALGEBRA. September 23, 2010

LINEAR ALGEBRA. September 23, 2010 LINEAR ALGEBRA September 3, 00 Contents 0. LU-decomposition.................................... 0. Inverses and Transposes................................. 0.3 Column Spaces and NullSpaces.............................

More information

We know a formula for and some properties of the determinant. Now we see how the determinant can be used.

We know a formula for and some properties of the determinant. Now we see how the determinant can be used. Cramer s rule, inverse matrix, and volume We know a formula for and some properties of the determinant. Now we see how the determinant can be used. Formula for A We know: a b d b =. c d ad bc c a Can we

More information

General Framework for an Iterative Solution of Ax b. Jacobi s Method

General Framework for an Iterative Solution of Ax b. Jacobi s Method 2.6 Iterative Solutions of Linear Systems 143 2.6 Iterative Solutions of Linear Systems Consistent linear systems in real life are solved in one of two ways: by direct calculation (using a matrix factorization,

More information

Matrix Algebra and Applications

Matrix Algebra and Applications Matrix Algebra and Applications Dudley Cooke Trinity College Dublin Dudley Cooke (Trinity College Dublin) Matrix Algebra and Applications 1 / 49 EC2040 Topic 2 - Matrices and Matrix Algebra Reading 1 Chapters

More information

1 Eigenvalues and Eigenvectors

1 Eigenvalues and Eigenvectors Math 20 Chapter 5 Eigenvalues and Eigenvectors Eigenvalues and Eigenvectors. Definition: A scalar λ is called an eigenvalue of the n n matrix A is there is a nontrivial solution x of Ax = λx. Such an x

More information

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system 1. Systems of linear equations We are interested in the solutions to systems of linear equations. A linear equation is of the form 3x 5y + 2z + w = 3. The key thing is that we don t multiply the variables

More information

10.3 POWER METHOD FOR APPROXIMATING EIGENVALUES

10.3 POWER METHOD FOR APPROXIMATING EIGENVALUES 58 CHAPTER NUMERICAL METHODS. POWER METHOD FOR APPROXIMATING EIGENVALUES In Chapter 7 you saw that the eigenvalues of an n n matrix A are obtained by solving its characteristic equation n c nn c nn...

More information

Solution to Homework 2

Solution to Homework 2 Solution to Homework 2 Olena Bormashenko September 23, 2011 Section 1.4: 1(a)(b)(i)(k), 4, 5, 14; Section 1.5: 1(a)(b)(c)(d)(e)(n), 2(a)(c), 13, 16, 17, 18, 27 Section 1.4 1. Compute the following, if

More information

Numerical Analysis Lecture Notes

Numerical Analysis Lecture Notes Numerical Analysis Lecture Notes Peter J. Olver 6. Eigenvalues and Singular Values In this section, we collect together the basic facts about eigenvalues and eigenvectors. From a geometrical viewpoint,

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

2.1: MATRIX OPERATIONS

2.1: MATRIX OPERATIONS .: MATRIX OPERATIONS What are diagonal entries and the main diagonal of a matrix? What is a diagonal matrix? When are matrices equal? Scalar Multiplication 45 Matrix Addition Theorem (pg 0) Let A, B, and

More information

ALGEBRAIC EIGENVALUE PROBLEM

ALGEBRAIC EIGENVALUE PROBLEM ALGEBRAIC EIGENVALUE PROBLEM BY J. H. WILKINSON, M.A. (Cantab.), Sc.D. Technische Universes! Dsrmstedt FACHBEREICH (NFORMATiK BIBL1OTHEK Sachgebieto:. Standort: CLARENDON PRESS OXFORD 1965 Contents 1.

More information

Solving a System of Equations

Solving a System of Equations 11 Solving a System of Equations 11-1 Introduction The previous chapter has shown how to solve an algebraic equation with one variable. However, sometimes there is more than one unknown that must be determined

More information

Lecture 6. Inverse of Matrix

Lecture 6. Inverse of Matrix Lecture 6 Inverse of Matrix Recall that any linear system can be written as a matrix equation In one dimension case, ie, A is 1 1, then can be easily solved as A x b Ax b x b A 1 A b A 1 b provided that

More information

LS.6 Solution Matrices

LS.6 Solution Matrices LS.6 Solution Matrices In the literature, solutions to linear systems often are expressed using square matrices rather than vectors. You need to get used to the terminology. As before, we state the definitions

More information

MAT188H1S Lec0101 Burbulla

MAT188H1S Lec0101 Burbulla Winter 206 Linear Transformations A linear transformation T : R m R n is a function that takes vectors in R m to vectors in R n such that and T (u + v) T (u) + T (v) T (k v) k T (v), for all vectors u

More information

Solving Systems of Linear Equations Using Matrices

Solving Systems of Linear Equations Using Matrices Solving Systems of Linear Equations Using Matrices What is a Matrix? A matrix is a compact grid or array of numbers. It can be created from a system of equations and used to solve the system of equations.

More information

Vector algebra Christian Miller CS Fall 2011

Vector algebra Christian Miller CS Fall 2011 Vector algebra Christian Miller CS 354 - Fall 2011 Vector algebra A system commonly used to describe space Vectors, linear operators, tensors, etc. Used to build classical physics and the vast majority

More information

UNIT - I LESSON - 1 The Solution of Numerical Algebraic and Transcendental Equations

UNIT - I LESSON - 1 The Solution of Numerical Algebraic and Transcendental Equations UNIT - I LESSON - 1 The Solution of Numerical Algebraic and Transcendental Equations Contents: 1.0 Aims and Objectives 1.1 Introduction 1.2 Bisection Method 1.2.1 Definition 1.2.2 Computation of real root

More information

Lecture 5: Singular Value Decomposition SVD (1)

Lecture 5: Singular Value Decomposition SVD (1) EEM3L1: Numerical and Analytical Techniques Lecture 5: Singular Value Decomposition SVD (1) EE3L1, slide 1, Version 4: 25-Sep-02 Motivation for SVD (1) SVD = Singular Value Decomposition Consider the system

More information

Special Situations in the Simplex Algorithm

Special Situations in the Simplex Algorithm Special Situations in the Simplex Algorithm Degeneracy Consider the linear program: Maximize 2x 1 +x 2 Subject to: 4x 1 +3x 2 12 (1) 4x 1 +x 2 8 (2) 4x 1 +2x 2 8 (3) x 1, x 2 0. We will first apply the

More information

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A = MAT 200, Midterm Exam Solution. (0 points total) a. (5 points) Compute the determinant of the matrix 2 2 0 A = 0 3 0 3 0 Answer: det A = 3. The most efficient way is to develop the determinant along the

More information

Systems of Linear Equations

Systems of Linear Equations Systems of Linear Equations Beifang Chen Systems of linear equations Linear systems A linear equation in variables x, x,, x n is an equation of the form a x + a x + + a n x n = b, where a, a,, a n and

More information

Solving Linear Diophantine Matrix Equations Using the Smith Normal Form (More or Less)

Solving Linear Diophantine Matrix Equations Using the Smith Normal Form (More or Less) Solving Linear Diophantine Matrix Equations Using the Smith Normal Form (More or Less) Raymond N. Greenwell 1 and Stanley Kertzner 2 1 Department of Mathematics, Hofstra University, Hempstead, NY 11549

More information

Inner Product Spaces

Inner Product Spaces Math 571 Inner Product Spaces 1. Preliminaries An inner product space is a vector space V along with a function, called an inner product which associates each pair of vectors u, v with a scalar u, v, and

More information

1 Introduction to Matrices

1 Introduction to Matrices 1 Introduction to Matrices In this section, important definitions and results from matrix algebra that are useful in regression analysis are introduced. While all statements below regarding the columns

More information

Using row reduction to calculate the inverse and the determinant of a square matrix

Using row reduction to calculate the inverse and the determinant of a square matrix Using row reduction to calculate the inverse and the determinant of a square matrix Notes for MATH 0290 Honors by Prof. Anna Vainchtein 1 Inverse of a square matrix An n n square matrix A is called invertible

More information

Matrix Solution of Equations

Matrix Solution of Equations Contents 8 Matrix Solution of Equations 8.1 Solution by Cramer s Rule 2 8.2 Solution by Inverse Matrix Method 13 8.3 Solution by Gauss Elimination 22 Learning outcomes In this Workbook you will learn to

More information

The Characteristic Polynomial

The Characteristic Polynomial Physics 116A Winter 2011 The Characteristic Polynomial 1 Coefficients of the characteristic polynomial Consider the eigenvalue problem for an n n matrix A, A v = λ v, v 0 (1) The solution to this problem

More information

Matrices, Determinants and Linear Systems

Matrices, Determinants and Linear Systems September 21, 2014 Matrices A matrix A m n is an array of numbers in rows and columns a 11 a 12 a 1n r 1 a 21 a 22 a 2n r 2....... a m1 a m2 a mn r m c 1 c 2 c n We say that the dimension of A is m n (we

More information

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices A Biswas, IT, BESU SHIBPUR McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Set of Integers The set of integers, denoted by Z,

More information

Linear Programming. March 14, 2014

Linear Programming. March 14, 2014 Linear Programming March 1, 01 Parts of this introduction to linear programming were adapted from Chapter 9 of Introduction to Algorithms, Second Edition, by Cormen, Leiserson, Rivest and Stein [1]. 1

More information

The Determinant: a Means to Calculate Volume

The Determinant: a Means to Calculate Volume The Determinant: a Means to Calculate Volume Bo Peng August 20, 2007 Abstract This paper gives a definition of the determinant and lists many of its well-known properties Volumes of parallelepipeds are

More information

Cofactor Expansion: Cramer s Rule

Cofactor Expansion: Cramer s Rule Cofactor Expansion: Cramer s Rule MATH 322, Linear Algebra I J. Robert Buchanan Department of Mathematics Spring 2015 Introduction Today we will focus on developing: an efficient method for calculating

More information

Unit 18 Determinants

Unit 18 Determinants Unit 18 Determinants Every square matrix has a number associated with it, called its determinant. In this section, we determine how to calculate this number, and also look at some of the properties of

More information

Lecture 3: Linear Programming Relaxations and Rounding

Lecture 3: Linear Programming Relaxations and Rounding Lecture 3: Linear Programming Relaxations and Rounding 1 Approximation Algorithms and Linear Relaxations For the time being, suppose we have a minimization problem. Many times, the problem at hand can

More information

SECTION 8-1 Systems of Linear Equations and Augmented Matrices

SECTION 8-1 Systems of Linear Equations and Augmented Matrices 86 8 Systems of Equations and Inequalities In this chapter we move from the standard methods of solving two linear equations with two variables to a method that can be used to solve linear systems with

More information

LU Decomposition. The original equation is to solve. Ax b =0ff At the end of the Gauss elimination, the resulting equations were

LU Decomposition. The original equation is to solve. Ax b =0ff At the end of the Gauss elimination, the resulting equations were LU Decomposition LU decomposition is a better way to implement Gauss elimination, especially for repeated solving a number of equations with the same left-hand side That is, for solving the equation Ax

More information

Solution. Area(OABC) = Area(OAB) + Area(OBC) = 1 2 det( [ 5 2 1 2. Question 2. Let A = (a) Calculate the nullspace of the matrix A.

Solution. Area(OABC) = Area(OAB) + Area(OBC) = 1 2 det( [ 5 2 1 2. Question 2. Let A = (a) Calculate the nullspace of the matrix A. Solutions to Math 30 Take-home prelim Question. Find the area of the quadrilateral OABC on the figure below, coordinates given in brackets. [See pp. 60 63 of the book.] y C(, 4) B(, ) A(5, ) O x Area(OABC)

More information

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Linear Algebra Notes for Marsden and Tromba Vector Calculus Linear Algebra Notes for Marsden and Tromba Vector Calculus n-dimensional Euclidean Space and Matrices Definition of n space As was learned in Math b, a point in Euclidean three space can be thought of

More information

Lecture 4: Partitioned Matrices and Determinants

Lecture 4: Partitioned Matrices and Determinants Lecture 4: Partitioned Matrices and Determinants 1 Elementary row operations Recall the elementary operations on the rows of a matrix, equivalent to premultiplying by an elementary matrix E: (1) multiplying

More information

4. MATRICES Matrices

4. MATRICES Matrices 4. MATRICES 170 4. Matrices 4.1. Definitions. Definition 4.1.1. A matrix is a rectangular array of numbers. A matrix with m rows and n columns is said to have dimension m n and may be represented as follows:

More information

Linear Programming in Matrix Form

Linear Programming in Matrix Form Linear Programming in Matrix Form Appendix B We first introduce matrix concepts in linear programming by developing a variation of the simplex method called the revised simplex method. This algorithm,

More information

INTRODUCTORY LINEAR ALGEBRA WITH APPLICATIONS B. KOLMAN, D. R. HILL

INTRODUCTORY LINEAR ALGEBRA WITH APPLICATIONS B. KOLMAN, D. R. HILL SOLUTIONS OF THEORETICAL EXERCISES selected from INTRODUCTORY LINEAR ALGEBRA WITH APPLICATIONS B. KOLMAN, D. R. HILL Eighth Edition, Prentice Hall, 2005. Dr. Grigore CĂLUGĂREANU Department of Mathematics

More information

Generalized Inverse Computation Based on an Orthogonal Decomposition Methodology.

Generalized Inverse Computation Based on an Orthogonal Decomposition Methodology. International Conference on Mathematical and Statistical Modeling in Honor of Enrique Castillo. June 28-30, 2006 Generalized Inverse Computation Based on an Orthogonal Decomposition Methodology. Patricia

More information