# 6 Gaussian Elimination

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 G1BINM Introduction to Numerical Methods Gaussian Elimination 61 Simultaneous linear equations Consider the system of linear equations a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2 a n1 x 1 + a n2 x a nn x n = b n (61) which is to be solved for x 1,, x n Notice that the number of equations, n, is equal to the number of unknowns, so it is reasonable to expect that there should usually be a unique solution Such systems arise in many different applications, and it is important to have an efficient method of solution, especially when n is large The system (61) can be written more succinctly, using the summation convention, as a ij x j = b i, or alternatively, using matrix notation, as Ax = b, (62) where A is an n n matrix with entries {a ij }, x = (x 1,, x n ) T and b = (b 1,, b n ) T If A is invertible, we can formally multiply (62) through by A 1 to obtain Example 61 The system x = A 1 b x 1 + x 2 + 2x 3 = 1, 3x 1 x 2 + x 3 = 1, x 1 + 3x 2 + 4x 3 = 1, may be written as Ax = b, where A = 3 1 1, x = x 1 x 2 x 3, b = The inverse of this A was found in 2 The solution may thus be determined via x = A 1 b = = 1 2 8, which gives x 1 = 1/5, x 2 = 4/5, x 3 = 4/ (63)

2 6 2 School of Mathematical Sciences University of Nottingham The problem with this approach is that, when n is large, it is extremely timeconsuming to calculate A 1 using determinants In this section we discuss the method of Gaussian elimination, which provides a much more efficient algorithm for solving systems like (61) 62 Doing it by hand In practice, one would go about solving a system like (63) by eliminating the variables one at a time until just one remains Then the other variables would be determined by back-substitution Gaussian elimination is a formal procedure for doing this, which we illustrate with an example Example 62 Consider again the system (63) We eliminate the variables one at a time as follows 1 Eliminate x 1 from the second and third equations by subtracting suitable multiples of the first equation ( 3 and 1 respectively) This results in the new system x 1 + x 2 + 2x 3 = 1, 2x 2 + 7x 3 = 4, 2x 2 + 2x 3 = 0 (64) 2 Subtract a suitable multiple (here 1) of the second equation from the third to eliminate x 2 : x 1 + x 2 + 2x 3 = 1, 2x 2 + 7x 3 = 4, 5x 3 = 4 (65) 3 Now we can solve by back-substitution The third equation gives x 3 = 4/5; then the second gives 2x 2 = 4 7 4/5 x 2 = 4/5 Finally, from the first equation, x 1 = 1 ( 4/5) 2 4/5 x 1 = 1/5 The elimination process just described is performed by applying so-called elementary operations to the equations These comprise 1 swapping two equations; 2 multiplying an equation by a nonzero constant; 3 adding a multiple of one equation to another equation The crucial point is that, when any combination of these operations is performed upon a system of equations, the result is an equivalent system, in the sense that it has the same set of solutions Thus the systems (63), (64) and (65) are all equivalent The idea of Gaussian elimination is to use elementary operations to reduce the original system to an equivalent one which is in triangular form, and can then readily be solved by back-substitution

3 G1BINM Introduction to Numerical Methods The augmented matrix; elementary row operations In practice, when carrying out this procedure on a general matrix equation of the form (62), it is useful to define the so-called augmented matrix Ã, which consists of A with the right-hand side b tacked on as an extra column: Ã = (A b) Thus each n-dimensional system of the form (61) corresponds to an n (n+1) augmented matrix, and to each elementary operation, which may be performed upon a system of equations, corresponds an elementary row operation, which may be performed upon the augmented matrix Ã: 1 swapping two rows; 2 multiplying a row by a nonzero constant; 3 adding a multiple of one row to another row In Gaussian elimination we perform a combination of these operations such as to reduce the augmented matrix to a triangular form, known as echelon form Example 63 Consider the system 3x 1 4x 2 + 5x 3 = 1, 3x 1 + 2x 2 + x 3 = 1, 6x 1 + 8x 2 x 3 = 35, whose corresponding augmented matrix is The first operation is to use the first equation to eliminate x 1 from the other two This corresponds to subtracting appropriate multiples of row one from rows two and three so as to eliminate their first column The boxed number 3 is called the pivot: it must be divided into the first entry of each subsequent row to determine the appropriate multiple of row one to be subtracted Here 3/3 = 1 and 6/3 = 2, so we subtract ( 1) (row one) from (row two) and 2 (row one) from (row three), resulting in Next we use row two to eliminate the second element from row three Here the pivot is 2; 16/( 2) = 8 so we subtract ( 8) (row two) from (row three) two obtain This is now in echelon form which completes the Gaussian elimination It remains to perform back substitution [exercise] which gives the solution x 3 = 1, x 2 = 3, x 1 = 2

4 6 4 School of Mathematical Sciences University of Nottingham Let us reiterate the process just described: 1 use multiples of row 1 to eliminate column 1 from rows 2, 3, ; 2 use multiples of row 2 to eliminate column 2 from rows 3, ; 3 and so on Note once more the role of the pivot in determining the right multiple to be subtracted at each stage In particular, the pivot must be nonzero for the process to work 64 Pivoting Example 64 The system corresponds to the augmented matrix x 1 + x 2 + x 3 = 1, 2x 1 + 2x 2 + 5x 3 = 8, 4x 1 + 6x 2 + 8x 3 = 14, First use the pivot 1 to clear out column one: Now we appear to be in trouble, since 0 cannot be used as a pivot: it does not allow us to clear out the row below The remedy to this difficulty is simply to switch rows 2 and 3: Now the pivot is nonzero, and indeed the matrix is in echelon form and ready for back-substitution The process of swapping two rows as just described is called pivoting This suggests the following modification of the procedure outlined above: 1 check that the first pivot is nonzero; (a) if it is zero, find a row beneath whose first entry is nonzero and swap it with row 1; 2 use multiples of row 1 to eliminate column 1 from rows 2, 3, ; 3 check that the second pivot is nonzero;

5 G1BINM Introduction to Numerical Methods 6 5 (a) if it is zero, find a row beneath whose second entry is nonzero and swap it with row 2; 4 use multiples of row 2 to eliminate column 2 from rows 3, ; 5 and so on 65 When pivoting fails Notice that the procedure outlined above fails if we encounter a zero entry in the pivot position, but there is nothing nonzero with which to swap it Example 65 The system x 1 + x 2 + x 3 = 1, 2x 1 + 2x 2 + 5x 3 = 8, 4x 1 + 4x 2 + 8x 3 = 14, (66) corresponds to the augmented matrix As before, begin by using the first pivot, 1, to eliminate the first column: (67) Now the entry in the pivot position is zero, and the situation cannot be remedied by pivoting In fact the system (66) has no solution; the final two equations in (67) read 3x 3 = 6 and 4x 3 = 10, and are therefore inconsistent In general, if no nonzero pivot can be found, this corresponds to the original matrix A being singular, ie A = 0 As an aside, we should point out that A being singular does not necessarily imply that Ax = b has no solution Example 66 If we adjust the right-hand side of (66) by changing the 14 to 12, the augmented matrix is reduced by Gaussian elimination to Now the final two equations both give x 3 = 2 and the first implies x 1 + x 2 = 1, ie there is an infinity of solutions

6 6 6 School of Mathematical Sciences University of Nottingham This situation, though, is nongeneric: any other value apart from 12 in this last entry would have given no solution Therefore, when performing Gaussian elimination in practice (using real arithmetic with finite precision) it is safest simply to stop the calculation if A appears to be singular; the system almost certainly has no solution 66 Implementation of Gaussian elimination Now we show how one could write a computer program to carry out Gaussian elimination We illustrate the algorithm by means of a flowchart in figure 1 It is straightforward to translate this into (eg) Maple The main loop variable i goes from 1 to n 1; at each stage the first step is to check whether the pivot entry a ii is zero If it is, we pass to the pivoting subroutine, otherwise the program proceeds directly to the elimination stage In the pivoting subroutine, j looks at each row in turn below the i th row until it finds one with a nonzero pivot entry The program then swaps rows i and j and returns to the elimination stage If j reaches n and no nonzero pivot entry has been located, then the matrix is singular The purpose of the elimination stage is to use the i th row to eliminate the i th column Thus k cycles through all the rows below the i th one; for each, r calculates the multiple of row i that must be subtracted from row k When k reaches n, elimination of the i th column is completed, and so i can be incremented When i reaches n, Gaussian elimination is finished, the matrix is in echelon form, and back-substitution may proceed 67 Operations count When evaluating any algorithm, the following criteria should be borne in mind: 1 ease of programming; 2 effect of rounding errors; 3 storage space required; 4 computing time required Gaussian elimination is straightforward to program, and rounding errors may be controlled by the method of partial pivoting, described below It requires the n (n + 1) augmented matrix to be stored, which may be inefficient if n is very large, but most of the coefficients of A are zero Such systems are called sparse, and some routines that may be more efficient for large, sparse systems are discussd in 6 Here we address the question of computing time An estimate of the time it will take to perform a calculation may be obtained by counting the number of arithmetic operations involved It is standard to count each multiplication and each division as a single operation, but to ignore additions and subtractions (which require significantly less processor time)

7 G1BINM Introduction to Numerical Methods 6 7 START Do i = 1 to n 1 Pivoting Is a ii = 0? Yes Do j = i + 1 to n No j < n Is a ji = 0? Yes Next j No j = n Elimination Swap row i with row j MATRIX IS SINGULAR Do k = i + 1 to n Set r = a ki /a ii Subtract r (row i) from (row k) k < n Next k k = n i < n 1 Next i i = n 1 ELIMINATION FINISHED Figure 1: Flow chart for Gaussian elimination

8 6 8 School of Mathematical Sciences University of Nottingham The first step in Gaussian elimination is to use the top row to eliminate the first column from each subsequent row For each, we have to carry out 1 division, to calculate the multiple of row 1 to be substracted (ie the ratio r in figure 1), followed by n multiplication-subtractions This makes n + 1 operations for each of the n 1 rows below the top one, leading to a total of (n 1)(n + 1) = n 2 1 operations needed to eliminate the first column Next we continue to the second row Effectively we must perform the same operation as that just described, but with an (n 1) n matrix instead of n (n + 1) Thus the number of operations needed to eliminate column 2 is (n 1) 2 1 Therefore, to complete the elimination through all n rows, the total number of operations required is 1 N n = n ( k 2 1 ) = k=1 n(n + 1)(2n + 1) 6 n = Of particular interest is the behaviour of N n when n is large: N n = n3 3 + n2 2 5n 6 n3 3 n(n 1)(2n + 5) 6 since n 3 n 2 or n for large n Thus an adequate estimate of the number of operations required for Gaussian elimination of an n-dimensional system is n 3 /3 This should be compared with the n! operations needed to find the determinant of the same system It should be clear that Gaussian elimination is vastly preferable to solving using determinants if n is at all large For example, a system requires fewer than 10 6 operations, which a 1000MHz machine could perform in less than a millisecond 68 Back-substitution Now suppose the elimination process is complete and the augmented matrix is in echelon form Thus the reduced system takes the form a 11 x 1 + a 12 x a 1(n 1) x n 1 + a 1n x n = b 1, a 22 x a 2(n 1) x n 1 + a 2n x n = b 2, a (n 1)(n 1) x n 1 + a (n 1)n x n = b n 1, a nn x n = b n The next stage is back-substitution, of which the first step is to solve the final equation for x n : x n = b n /a nn 1 Here we use the identity n k 2 = k=1 n(n + 1)(2n + 1) 6

9 G1BINM Introduction to Numerical Methods 6 9 Then with x n known, the penultimate equation gives x n 1 = ( b n 1 a (n 1)n x n ) /a(n 1)(n 1) By continuing in a similar fashion we may generate in turn x n 2,, x 2, x 1 ; the algorithm for back substitution may thus be written in the following form START Do k = n to 1 step ( 1) Set x k = 1 b k a kk End do END n j=k+1 a kj x j Now let us count the number of operations required for back substitution To solve for x n requires just one division, while one multplication-subtraction followed by one division are needed to solve for x n 1 In general, then, at the k th step, k operations are needed, giving rise to a total of n k = k=1 n(n + 1) 2 n2 2 when n is large The main point is that this is negligible compared to the number of operations used in the elimination stage 69 Partial pivoting We have seen that it may be necessary to swap two rows if a diagonal entry, which we intend to use as a pivot, turns out to be zero However, when implementing the procedure on a computer with finite-precision arithmetic, testing whether a quantity is equal to zero is unsafe In any case, inaccuracy may arise if the pivot is too small, so it is prudent at each stage to choose the row with the largest possible entry in the pivot position, and use that as the pivot Example 67 Consider the augmented matrix ( ), (68) in which the pivot entry, although nonzero, is small The effect of this is that we have to use a large multiple, 10000, in eliminating the first column, resulting in ( )

10 6 10 School of Mathematical Sciences University of Nottingham Now back-substitution gives x 2 = 9998/9999, and if only three decimal places are stored, this is approximated by x 2 = 1000 Then we find 00001x 1 = 0000, that is x 1 = 0000, which is the wrong answer However if, on the grounds that the pivot entry is too small, we first swap rows: ( then Gaussian elimination leads to ( Now back-substitution results in (to three decimal places) x 2 = 1000, x 1 = 1000, which is correct Errors, like those just illustrated, which arise from the fact that a computer can only store real numbers with a finite precision are called rounding errors Actually, the argument for selecting the largest possible pivot entry is still slightly unsound, since we can multiply a whole row through by any factor we like to make the pivot entry bigger, without alleviating the problem For example, multiplication of the first row of (68) by results in ( Now the pivot entry in the first row looks fine, but the same loss of accuracy occurs if Gaussian elimination is attempted without pivoting [exercise] What one should really look for, when deciding whether or not to swap rows, is the size of the pivot entry compared with the other entries in the same row In the method of partial pivoting, we choose at each stage the row which maximises (in absolute value) the ratio between the pivot entry and the largest entry in the same row (apart from the last one, ie the right-hand side) The row which maximises this so-called pivot ratio is then switched into the pivot position ), ) Example 68 [Kreyszig] Consider the augmented matrix In row one the largest entry (apart from the last) is 5, giving a pivot ratio 3/5 The corresponding ratios for rows two and three are 3/3 and 6/8, of which that for row two is the biggest We therefore swap row two into the pivot position, , and then eliminate column one: )

11 G1BINM Introduction to Numerical Methods 6 11 Now the 6 is the largest entry in row two, giving a pivot ratio of 2/6, compared with 12/1 for row three So we switch row three into the pivot position: , and eliminate to give which is now ready for back-substitution /6 37/6 Note that, as well as avoiding unnecessary rounding errors, this procedure automatically swaps zero pivots where necessary and possible (ie it replaces the pivoting stage in figure 1) Partial pivoting may be written as an algorithm as follows START Do i = 1 to n 1 Set temp 1 = 00 Set m = 0 Do j = i to n Set temp 2 = max k=i+1,,n a jk If a ji > temp 1 temp 2 then Set temp 1 = a ji /temp 2 Set m = j End if End do If m i then End if End do Swap row i with row m ELIMINATE COLUMN i ELIMINATION FINISHED This fits inside the main loop of figure 1, at the point where we are about to use row i to eliminate column i We start by initialising a temporary real variable temp 1 and an integer m; these will be used to store the maximum pivot ratio found so far, and the row in which it occurs Now j cycles through all the rows below and including the i th one, and in each such row, temp 2 calculates the largest entry Then the pivot ratio,

12 6 12 School of Mathematical Sciences University of Nottingham for that row is given by a ji /temp 2 ; we check to see whether this is greater than temp 1 If so, row j holds the largest pivot ratio found so far, so temp 1 and m are replaced accordingly When j has run through every row, m tells us which row has the largest pivot ratio; if m is not equal to i, we swap rows i and m Now we have the best possible row in the pivoting position, and are ready to continue with elimination Finally, we mention that there is an even more complicated procedure, called total pivoting, which involves swapping columns as well as rows to maximise the pivot ratio at each stage This is even safer, so far as rounding errors are concerned However, it is also considerably more expensive in terms of computer time, and since partial pivoting usually gives adequate accuracy, is rarely used

### 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

### 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

### 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

### 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

### 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

### 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

### 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

### 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

### 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

### 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.

### 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

### 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

### Section 1.5 Arithmetic in Other Bases

Section Arithmetic in Other Bases Arithmetic in Other Bases The operations of addition, subtraction, multiplication and division are defined for counting numbers independent of the system of numeration

### 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 +

### 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

### 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

### 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

### Solving Systems of Linear Equations; Row Reduction

Harvey Mudd College Math Tutorial: Solving Systems of Linear Equations; Row Reduction Systems of linear equations arise in all sorts of applications in many different fields of study The method reviewed

### 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

### Reduced echelon form: Add the following conditions to conditions 1, 2, and 3 above:

Section 1.2: Row Reduction and Echelon Forms Echelon form (or row echelon form): 1. All nonzero rows are above any rows of all zeros. 2. Each leading entry (i.e. left most nonzero entry) of a row is in

### 1. LINEAR EQUATIONS. A linear equation in n unknowns x 1, x 2,, x n is an equation of the form

1. LINEAR EQUATIONS A linear equation in n unknowns x 1, x 2,, x n is an equation of the form a 1 x 1 + a 2 x 2 + + a n x n = b, where a 1, a 2,..., a n, b are given real numbers. For example, with x and

### 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

### 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

### 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,

### 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

### 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

### 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

### 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

### Solutions to Linear Algebra Practice Problems 1. form (because the leading 1 in the third row is not to the right of the

Solutions to Linear Algebra Practice Problems. Determine which of the following augmented matrices are in row echelon from, row reduced echelon form or neither. Also determine which variables are free

### 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

### 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

### 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

### 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)

### 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

### 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

### 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

### 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

### LINEAR SYSTEMS. Consider the following example of a linear system:

LINEAR SYSTEMS Consider the following example of a linear system: Its unique solution is x +2x 2 +3x 3 = 5 x + x 3 = 3 3x + x 2 +3x 3 = 3 x =, x 2 =0, x 3 = 2 In general we want to solve n equations in

### MathQuest: Linear Algebra. 1. Which of the following matrices does not have an inverse?

MathQuest: Linear Algebra Matrix Inverses 1. Which of the following matrices does not have an inverse? 1 2 (a) 3 4 2 2 (b) 4 4 1 (c) 3 4 (d) 2 (e) More than one of the above do not have inverses. (f) All

### Row Echelon Form and Reduced Row Echelon Form

These notes closely follow the presentation of the material given in David C Lay s textbook Linear Algebra and its Applications (3rd edition) These notes are intended primarily for in-class presentation

### 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:

### Math 240: Linear Systems and Rank of a Matrix

Math 240: Linear Systems and Rank of a Matrix Ryan Blair University of Pennsylvania Thursday January 20, 2011 Ryan Blair (U Penn) Math 240: Linear Systems and Rank of a Matrix Thursday January 20, 2011

### 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!

### Section 8.2 Solving a System of Equations Using Matrices (Guassian Elimination)

Section 8. Solving a System of Equations Using Matrices (Guassian Elimination) x + y + z = x y + 4z = x 4y + z = System of Equations x 4 y = 4 z A System in matrix form x A x = b b 4 4 Augmented Matrix

### 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

### 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

### 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

### 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

### 5.5. Solving linear systems by the elimination method

55 Solving linear systems by the elimination method Equivalent systems The major technique of solving systems of equations is changing the original problem into another one which is of an easier to solve

### Solutions to Math 51 First Exam January 29, 2015

Solutions to Math 5 First Exam January 29, 25. ( points) (a) Complete the following sentence: A set of vectors {v,..., v k } is defined to be linearly dependent if (2 points) there exist c,... c k R, not

### 8.1. Cramer s Rule for Solving Simultaneous Linear Equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Cramer s Rule for Solving Simultaneous Linear Equations 8.1 Introduction The need to solve systems of linear equations arises frequently in engineering. The analysis of electric circuits and the control

### 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

### 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

### 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.

### L1-2. Special Matrix Operations: Permutations, Transpose, Inverse, Augmentation 12 Aug 2014

L1-2. Special Matrix Operations: Permutations, Transpose, Inverse, Augmentation 12 Aug 2014 Unfortunately, no one can be told what the Matrix is. You have to see it for yourself. -- Morpheus Primary concepts:

### 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

### 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

### 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

### 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

### 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

### 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

### What is Linear Programming?

Chapter 1 What is Linear Programming? An optimization problem usually has three essential ingredients: a variable vector x consisting of a set of unknowns to be determined, an objective function of x to

### Typical Linear Equation Set and Corresponding Matrices

EWE: Engineering With Excel Larsen Page 1 4. Matrix Operations in Excel. Matrix Manipulations: Vectors, Matrices, and Arrays. How Excel Handles Matrix Math. Basic Matrix Operations. Solving Systems of

### 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

### 9.2 Summation Notation

9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a

### 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

### 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

### 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

### Solving Systems of 3x3 Linear Equations - Elimination

Solving Systems of 3x3 Linear Equations - Elimination We will solve systems of 3x3 linear equations using the same strategies we have used before. That is, we will take something we don t recognize and

### 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

### Lecture Notes 2: Matrices as Systems of Linear Equations

2: Matrices as Systems of Linear Equations 33A Linear Algebra, Puck Rombach Last updated: April 13, 2016 Systems of Linear Equations Systems of linear equations can represent many things You have probably

### Math 312 Homework 1 Solutions

Math 31 Homework 1 Solutions Last modified: July 15, 01 This homework is due on Thursday, July 1th, 01 at 1:10pm Please turn it in during class, or in my mailbox in the main math office (next to 4W1) Please

### Methods for Finding Bases

Methods for Finding Bases Bases for the subspaces of a matrix Row-reduction methods can be used to find bases. Let us now look at an example illustrating how to obtain bases for the row space, null space,

### Systems of Linear Equations

Chapter 1 Systems of Linear Equations 1.1 Intro. to systems of linear equations Homework: [Textbook, Ex. 13, 15, 41, 47, 49, 51, 65, 73; page 11-]. Main points in this section: 1. Definition of Linear

### Chapter 6: Sensitivity Analysis

Chapter 6: Sensitivity Analysis Suppose that you have just completed a linear programming solution which will have a major impact on your company, such as determining how much to increase the overall production

### COMPASS Numerical Skills/Pre-Algebra Preparation Guide. Introduction Operations with Integers Absolute Value of Numbers 13

COMPASS Numerical Skills/Pre-Algebra Preparation Guide Please note that the guide is for reference only and that it does not represent an exact match with the assessment content. The Assessment Centre

### 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

### Arithmetic and Algebra of Matrices

Arithmetic and Algebra of Matrices Math 572: Algebra for Middle School Teachers The University of Montana 1 The Real Numbers 2 Classroom Connection: Systems of Linear Equations 3 Rational Numbers 4 Irrational

### 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:

### Equations, Inequalities & Partial Fractions

Contents Equations, Inequalities & Partial Fractions.1 Solving Linear Equations 2.2 Solving Quadratic Equations 1. Solving Polynomial Equations 1.4 Solving Simultaneous Linear Equations 42.5 Solving Inequalities

### NODAL ANALYSIS. Circuits Nodal Analysis 1 M H Miller

NODAL ANALYSIS A branch of an electric circuit is a connection between two points in the circuit. In general a simple wire connection, i.e., a 'short-circuit', is not considered a branch since it is known

### Situation 23: Simultaneous Equations Prepared at the University of Georgia EMAT 6500 class Date last revised: July 22 nd, 2013 Nicolina Scarpelli

Situation 23: Simultaneous Equations Prepared at the University of Georgia EMAT 6500 class Date last revised: July 22 nd, 2013 Nicolina Scarpelli Prompt: A mentor teacher and student teacher are discussing

### 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

### 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

### Equations and Inequalities

Rational Equations Overview of Objectives, students should be able to: 1. Solve rational equations with variables in the denominators.. Recognize identities, conditional equations, and inconsistent equations.

### Math 215 HW #6 Solutions

Math 5 HW #6 Solutions Problem 34 Show that x y is orthogonal to x + y if and only if x = y Proof First, suppose x y is orthogonal to x + y Then since x, y = y, x In other words, = x y, x + y = (x y) T

### 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

### 3. Applications of Number Theory

3. APPLICATIONS OF NUMBER THEORY 163 3. Applications of Number Theory 3.1. Representation of Integers. Theorem 3.1.1. Given an integer b > 1, every positive integer n can be expresses uniquely as n = a

### 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

### Au = = = 3u. Aw = = = 2w. so the action of A on u and w is very easy to picture: it simply amounts to a stretching by 3 and 2, respectively.

Chapter 7 Eigenvalues and Eigenvectors In this last chapter of our exploration of Linear Algebra we will revisit eigenvalues and eigenvectors of matrices, concepts that were already introduced in Geometry

### CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

### Math 215 HW #1 Solutions

Math 25 HW # Solutions. Problem.2.3. Describe the intersection of the three planes u+v+w+z = 6 and u+w+z = 4 and u + w = 2 (all in four-dimensional space). Is it a line or a point or an empty set? What

### MATH10212 Linear Algebra B Homework 7

MATH22 Linear Algebra B Homework 7 Students are strongly advised to acquire a copy of the Textbook: D C Lay, Linear Algebra and its Applications Pearson, 26 (or other editions) Normally, homework assignments

### Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Chapter 6 Linear Programming: The Simplex Method Introduction to the Big M Method In this section, we will present a generalized version of the simplex method that t will solve both maximization i and

### The basic unit in matrix algebra is a matrix, generally expressed as: a 11 a 12. a 13 A = a 21 a 22 a 23

(copyright by Scott M Lynch, February 2003) Brief Matrix Algebra Review (Soc 504) Matrix algebra is a form of mathematics that allows compact notation for, and mathematical manipulation of, high-dimensional

### 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

### 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

### 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