Solving Linear Systems of Equations

Size: px
Start display at page:

Download "Solving Linear Systems of Equations"

Transcription

1 Solving Linear Systems of Equations Many practical problems could be reduced to solving a linear system of equations formulated as Ax = b This chapter studies the computational issues about directly and iteratively solving Ax = b A Linear System of Equations Vector and Matrix Norms Matrix Condition Number (Cond(A) = A A 1 ) Direct Solution for Ax = b LU-decomposition by Gaussian Elimination Gaussian Elimination with Partial Pivoting Cholesky Algorithm for A = LL t (A is positive definite) Iterative Solutions Jacobi method Gauss-Seidel method Other methods Applications

2 Overdetermined, Underdetermined, Homogeneous Systems 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 m1 x 1 + a m2 x a mn x n = b m Ax = b Definition: A linear system is said to be overdetermined if there are more equations than unknowns (m >n), underdetermined if m<n, homogeneous if b i =0, 1 i m x + y = 1 x + y = 3 x + y = 2 (A) x y = 3 (B) x y = 1 (C) 2x + 2y = 4 x + 2y = 2 2x + y = 5 x y = 2 (A) has no solution, (B) has unique solution, (C) has infinitely many solutions (D) x + 2y + z = 1 2x + 4y + 2z = 3 (E) x + 2y + z = 5 2x y + z = 3 (D) has no solution, (E) has infinitely many solutions

3 Some Special Matrices A =[a ij ] R n n Diagonal if a ij =0 i j Lower Δifa ij =0ifj>i Unit lower ΔifA is lower-δ with a ii =1 Lower Hessenberg if a ij =0forj>i+1 Band matrix with bandwidth 2k +1ifa ij =0for i j >k A band matrix with bandwidth 1isdiagonal A band matrix with bandwidth 3istridiagonal A band matrix with bandwidth 5ispentadiagonal A lower and upper Hessenberg matrix is tridiagonal A 1 = , A 2 = , A 3 = , A 4 =

4 A Direct Solution of Linear Systems A linear system 2x + y + z = 5 4x 6y = 2 2x + 7y + 2z = 9 A matrix representation Ax = b, or x y z = Solution using MATLAB A =[2, 1, 2; 4, 6, 0; 2, 7, 2]; b =[5, 2, 9] ; x = A\b (x = [1; 1; 2])

5 Elementary Row Operations (1) Interchange two rows: A r A s (2) Multiply a row by a nonzero real number: A r αa r (3) Replace a row by its sum with a multiple of another row: A s αa r + A s E 1 =, E 2 = 0 0 2, E 3 = 1 0 1, Example A = , E 1 A = , E 2 A = , E 3 A = Let L 3 = 0 1 1, L 2 = 1 0 1, L 1 = 2 1 0, A = Then L 3 L 2 L 1 A = = U (Upper Δ) A =(L 1 1 L 1 2 L 1 3 )U = LU, where L is unit lower Δ

6 Computing An Inverse Matrix By Elementary Row Operations A = = I E 1 A = = E 1 I E 2 E 1 A = = E 2 E 1 I E 3 E 2 E 1 A = = E 3 E 2 E 1 I E 4 E 3 E 2 E 1 A = = E 4 E 3 E 2 E 1 I = A 1 where the elementary matrices are E 1 = 1 1 0, E 2 = 2 0 1, E 3 = 1 2 0, E 4 = 1 0 3

7 LU-Decomposition If a matrix A can be decomposed into the product of a unit lower-δ matrix L and an upper-δ matrix U, then the linear system Ax = b can be written as LUx = b The problem is reduced to solving two simpler triangular systems Ly = b and Ux = y by forward and back substitutions A = , L 3 = 0 1 1, L 2 = 1 0 1, L 1 = Then where L 3 L 2 L 1 A = = U A = L 1 1 L 1 2 L 1 3 U = LU A = = = LU If b =[5, 2, 9] t,theny =[5, 12, 2] t and x =[1, 1, 2] t B = , b = x = 1 2 1

8 Analysis of Gaussian Elimination Algorithm for i =1, 2,,n 1 for k = i +1,i+2,,n m ki a ki /a ii if a ii 0 a ki a ki for j = i +1,i+2,,n a kj a kj m ki a ij The Worst Computational Complexity is O( 2 3 n3 ) 1 # of divisions are (n 1) + (n 2) + +1= n(n 1) 2 2 # of multiplications are (n 1) 2 +(n 2) = n(n 1)(2n 1) 6 3 # of subtractions are (n 1) 2 +(n 2) = n(n 1)(2n 1) 6

9 The Analysis of Gaussian Elimination and Back Substitution to solve Ax=b 2 3 n n2 7 n 6 R 1 : a 11 x 1 + a 12 x a 1n x n = b 1 R 2 : a 21 x 1 + a 22 x a 2n x n = b 2 R i : a i1 x 1 + a i2 x a in x n = b i R n : a n1 x 1 + a n2 x a nn x n = b n By Guassian Elimination, we need C 1 =[ n k=1 (k+1)(k 1) + n k=1 k(k 1)] flops to reduce the above linear system of equations equivalent to the following upper triangular system R 1 : u 11 x 1 + u 12 x u 1n x n = c 1 R i : u ii x i + + u in x n = c i R n : u nn x n = c n We need C 2 = n k=1 (2k 1) = n 2 flops to solve an upper triangular linear system of equations Therefore, the total number of flops of solving Ax = b is summarized as C 1 + C 2 = 2 3 n n2 7 6 n

10 PA=LU Let A R 4 4 and L 3 P 3 L 2 P 2 L 1 P 1 A = U by Gaussian Elimination with Partial Pivoting Denote L 1 = 0 α 1 α 2 α 3, L 2 = α α 5 0 1, L 3 = α 6 1 Without loss of generality, let P 2 = Then P 2 L 1 =(P 2 L 1 P 1 2 )P 2 = L (2) 1 P 2,where L (2) 1 = 0 α 3 α 2 α 1 Theorem: For any A R n n, there exists a permutation matrix P such that PA = LU, where L is unit lower ΔandU is upper Δ

11 Gaussian Elimination with partial Pivoting Algorithm for i =1, 2,,n p(i)=i for i =1, 2,,n 1 (a) select a pivotal element a p(j),i such that a p(j),i = max i k n a p(k),i (b) p(i) p(j) (c) fork = i +1,i+2,,n m p(k),i = a p(k),i /a p(i),i for j = i +1,i+2,,n a p(k),j = a p(k),j m p(k),i a p(i),j An example A = P 23 P 13 A = LU =

12 Matlab Codes for Gaussian Elimination with Partial Pivoting %% %% %% gaussppm - drive of Gaussian Elimination wit Partial Pivoting %% %% %% fin=fopen( gaussmatdat, r ); n=fscanf(fin, %d,1); A=fscanf(fin, %f,[n n]); A=A ; b=fscanf(fin, %f,n); X=gausspivot(A,b,n) %% %% %% gausspivotm - Gaussian elimination with Partial Pivoting %% %% %% function X=gausspivot(A,b,n) if (abs(det(a))<eps) disp(sprintf( A is singular with det=%f\n,det(a))) end C=[A, b]; % Gaussian Elimination with Partial Pivoting % for i=1:n-1 [pivot, k]=max(abs(c(i:n,i))); if (k>1) temp=c(i,:); C(i,:)=C(i+k-1,:); C(i+k-1,:)=temp; end m(i+1:n,i)= -C(i+1:n,i)/C(i,i); C(i+1:n,:)=C(i+1:n,:)+m(i+1:n,i)*C(i,:); end % Back substitution % X=zeros(n,1); %% Let X be a column vector of size n X(n)=C(n,n+1)/C(n,n); for i=n-1:-1:1 X(i)=(C(i,n+1)-C(i,i+1:n)*X(i+1:n))/C(i,i); end

13 Doolittle s LU Factorization Algorithm: A R n n, A = LU, L is unit lower-δ, U is upper-δ for k =0, 1,,n 1 L kk 1 for j = k, k +1,,n 1 U kj A kj k 1 s=0 L ksu sj for i = k +1,k+2,,n 1 L ik [ A ik k 1 s=0 L isu sk ] /Ukk A = = = LU

14 Crout s LU Factorization Algorithm: A R n n, A = LU, L is lower-δ, U is unit upper-δ for k =0, 1,,n 1 U kk 1 for i = k, k +1,,n 1 L ik A ik k 1 s=0 L isu sk for j = k +1,k+2,,n 1 U kj [ A kj k 1 s=0 L ksu sj ] /Lkk A = = = LU

15 Cholesky Algorithm Algorithm: A R n n, A = LL t, A is positive definite and L is lower-δ for j =0, 1,,n 1 L jj [ A jj ] j 1 1/2 k=0 L2 jk for i = j +1,j+2,,n 1 L ij [ A ij j 1 k=0 L ikl jk ] /Ljj A = = = LL t

16 Vector Norms Definition: A vector norm on R n is a function that satisfies τ : R n R + = {x 0 x R} (1) τ(x) > 0 x 0, τ(0) =0 (2) τ(cx) = c τ(x) c R, x R n (3) τ(x + y) τ(x)+τ(y) x, y R n Hölder norm (p-norm) x p =( n i=1 x i p ) 1/p for p 1 (p=1) x 1 = n i=1 x i (Mahattan or City-block distance) (p=2) x 2 =( n i=1 x i 2 ) 1/2 (Euclidean distance) (p= ) x = max 1 i n { x i } ( -norm)

17 Matrix Norms Definition: A matrix norm on R m n is a function that satisfies τ : R m n R + = {x 0 x R} (1) τ(a) > 0 A O, τ(o) =0 (2) τ(ca) = c τ(a) c R, A R m n (3) τ(a + B) τ(a)+τ(b) A, B R m n Consistency Property: τ(ab) τ(a)τ(b) A, B (a) τ(a) =max{ a ij 1 i m, 1 j n} (b) A F = [ mi=1 nj=1 a 2 ij] 1/2 (Fröbenius norm) Subordinate Matrix Norm: A = max x 0 { Ax / x } (1) If A R m n,then A 1 = max 1 j n ( m i=1 a ij ) (2) If A R m n,then A = max 1 i m ( nj=1 a ij ) (3) Let A R n n be real symmetric, then A 2 = max 1 i n λ i,whereλ i λ(a)

18 Matrix Condition Number Cond(A) = A A 1 For the matrix A = , A 1 = Cond 1 (A) = A 1 A 1 1 =6 45 =27 Cond (A) = A A 1 =8 35 =28 Cond 2 (A) = A 2 A 1 2 = =

19 Sensitivity and Error Bounds Let x and ˆx be the solutions to Ax = b and Aˆx = ˆb, respectively, where ˆx = x +Δx, ˆb = b +Δb Then b = Ax A x or x b A Thus Δx x Δx = A 1 Δb A 1 Δb A 1 Δb A b Cond(A) Δb b Similarly, suppose that (A + E) x = b and Ax = b, wehave Further derivations to get Δx x E Cond(A) A ( Δx Δb x Cond(A) b + E ) A

20 Iterative Methods for Solving Linear Systems 1 Iterative methods are msot useful in solving large sparse system 2 One advantage is that the iterative methods may not require any extra storage and hence are more practical 3 One disadvantage is that after solving Ax = b 1, one must start over again from the beginning in order to solve Ax = b 2 Jacobi Method Given Ax = b, write A = C M, wherec is nonsingular and easily invertible Then Ax = b (C M)x = b Cx = Mx + b x = C 1 Mx + C 1 b x = Bx + c, where B = C 1 M, c = C 1 b Suppose we start with an inital x (0),then x (1) = Bx (0) + c and x (k+1) = Bx (k) + c

21 Jacobi Iterative Method for Solving Linear Systems Suppose x is a solution to Ax = b, then x (1) x =(Bx (0) + c) (Bx + c) =B(x (0) x) x (k) x = B k (x (0) x) x (k) x B k x (0) x B k x (0) x x (k) x 0ask if B = C 1 M < 1 For simplest computations, 1-norm or -norm is used The simplest choice of C, M with A = C M is C = Diag(A), M = (A C) Theorem: Let x (0) R n be arbitrary and define x (k+1) = Bx (k) + c for k =0, 1, If x is a solution to Ax = b, then the necessary and sufficient condition for x (k) x is B < 1 Theorem: If A is diagonally dominant, ie, a ii > j i a ij for 1 i n Let A = C M and B = C 1 M,then n B = max 1 i n b ij = max a ij 1 i n j=1 j i a ii < 1 Example: Let Then 10 1 A = 2 10, b = 10 0 C = 0 10 [ 11 12, M = 0 01 B = C 1 M = 02 0 ], x (0) = 0 1, 2 0 [ 0 0, c = C 1 b = ] [ ] x (1) = Bx (0) + c = [ ], x (2) = [ ], x (3) = [ ]

22 Gauss-Seidel Method Given Ax = b, write A = C M, wherec is nonsingular and easily invertible Jacobi: C = diag(a 11,a 22,,a nn ), M = (A C) Gauss-Seidel: A =(D L) U = C M, wherec = D L, M = U for Jacobi Let x (0) R n be nonzero, then Cx (k+1) = Mx (k) + b implies that (D L)x (k+1) = Ux (k) + b Dx (k+1) = Lx (k+1) + Ux (k) + b x (k+1) 1 = 1 a 11 ( nj=2 a 1j x (k) j + b 1 ) x (k+1) ( i = 1 a ii i 1 j=1 a ij x (k+1) j n j=i+1 a ij x (k) ) j + b i, for i =2, 3,,n The difference between Jacobi and Gauss-Seidel iteration is that in the latter case, one is using the coordinates of x (k+1) as soon as they are calculated rather than in the next iteration The program for Gauss-Seidel is much simpler

23 Convergence of Gauss-Seidel Iterations Theorem: If A is diagonally dominant, ie, a ii > j i a ij for 1 i n Gauss-Seidel iteration converges to a solution of Ax = b Then Proof: Denote A =(D L) U and let j 1 α j = a ji, β j = n a ji, and R j = i=1 i=j+1 β j a jj α j Since A is diagonally dominant, then a jj >α j + β j,thus R j = Therefore, R = Max 1 j n R j < 1 β j a jj α j < a jj α j a jj α j =1 1 j n The remaining problem is to show that B = Max x =1 Bx R<1, where B = C 1 M =(D L) 1 U Let x =1andy = Bx, then y = Max 1 i n y i = y k for some k Then y = Bx =(D L) 1 Ux (D L)y = Ux Dy = Ly + Ux y = D 1 (Ly + Ux) Then y k = 1 a kk ( k 1 i=1 a ki y i n i=k+1 a ki x i ) y = y k 1 (α a kk k y + β k x ) which implies that for all x with x =1, Bx = y Thus, B = Max x =1 Bx R<1 β k a kk α k = R k < 1

24 Example for Gauss-Seidel Iterations Example: 10 1 A = 2 10 = b = [ ], x (0) = [ 0 0 ] 0 1 = D L U 0 0 Then Moreover, Thus x (1) 1 = 1 10 ( a 12x (0) 2 + b 1 )=11 x (1) 2 = 1 10 ( a 21x (1) 1 0+b 2 )=098 x (2) 1 = 1 10 ( a 12x (1) 2 + b 1 )=1002 x (2) 2 = 1 10 ( a 21x (2) 1 0+b 2 )=09996 x (1) =[11, 098] t x (2) =[1002, 09996] t x (3) =[100004, ] t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Chapter 7. Matrices. Definition. An m n matrix is an array of numbers set out in m rows and n columns. Examples. ( 1 1 5 2 0 6

Chapter 7. Matrices. Definition. An m n matrix is an array of numbers set out in m rows and n columns. Examples. ( 1 1 5 2 0 6 Chapter 7 Matrices Definition An m n matrix is an array of numbers set out in m rows and n columns Examples (i ( 1 1 5 2 0 6 has 2 rows and 3 columns and so it is a 2 3 matrix (ii 1 0 7 1 2 3 3 1 is a

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

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

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

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

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

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

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

Numerical Methods I Solving Linear Systems: Sparse Matrices, Iterative Methods and Non-Square Systems

Numerical Methods I Solving Linear Systems: Sparse Matrices, Iterative Methods and Non-Square Systems Numerical Methods I Solving Linear Systems: Sparse Matrices, Iterative Methods and Non-Square Systems Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 Course G63.2010.001 / G22.2420-001,

More information

5. Orthogonal matrices

5. Orthogonal matrices L Vandenberghe EE133A (Spring 2016) 5 Orthogonal matrices matrices with orthonormal columns orthogonal matrices tall matrices with orthonormal columns complex matrices with orthonormal columns 5-1 Orthonormal

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

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

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

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

Section 6.1 - Inner Products and Norms

Section 6.1 - Inner Products and Norms Section 6.1 - Inner Products and Norms Definition. Let V be a vector space over F {R, C}. An inner product on V is a function that assigns, to every ordered pair of vectors x and y in V, a scalar in F,

More information

Math 312 Homework 1 Solutions

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

More information

The Singular Value Decomposition in Symmetric (Löwdin) Orthogonalization and Data Compression

The Singular Value Decomposition in Symmetric (Löwdin) Orthogonalization and Data Compression The Singular Value Decomposition in Symmetric (Löwdin) Orthogonalization and Data Compression The SVD is the most generally applicable of the orthogonal-diagonal-orthogonal type matrix decompositions Every

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

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

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

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 notes on linear algebra

Lecture notes on linear algebra Lecture notes on linear algebra David Lerner Department of Mathematics University of Kansas These are notes of a course given in Fall, 2007 and 2008 to the Honors sections of our elementary linear algebra

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

Applied Linear Algebra I Review page 1

Applied Linear Algebra I Review page 1 Applied Linear Algebra Review 1 I. Determinants A. Definition of a determinant 1. Using sum a. Permutations i. Sign of a permutation ii. Cycle 2. Uniqueness of the determinant function in terms of properties

More information

Methods for Finding Bases

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,

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

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

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

Matrix Differentiation

Matrix Differentiation 1 Introduction Matrix Differentiation ( and some other stuff ) Randal J. Barnes Department of Civil Engineering, University of Minnesota Minneapolis, Minnesota, USA Throughout this presentation I have

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

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

Similar matrices and Jordan form

Similar matrices and Jordan form Similar matrices and Jordan form We ve nearly covered the entire heart of linear algebra once we ve finished singular value decompositions we ll have seen all the most central topics. A T A is positive

More information

Torgerson s Classical MDS derivation: 1: Determining Coordinates from Euclidean Distances

Torgerson s Classical MDS derivation: 1: Determining Coordinates from Euclidean Distances Torgerson s Classical MDS derivation: 1: Determining Coordinates from Euclidean Distances It is possible to construct a matrix X of Cartesian coordinates of points in Euclidean space when we know the Euclidean

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

Iterative Methods for Solving Linear Systems

Iterative Methods for Solving Linear Systems Chapter 5 Iterative Methods for Solving Linear Systems 5.1 Convergence of Sequences of Vectors and Matrices In Chapter 2 we have discussed some of the main methods for solving systems of linear equations.

More information

Orthogonal Bases and the QR Algorithm

Orthogonal Bases and the QR Algorithm Orthogonal Bases and the QR Algorithm Orthogonal Bases by Peter J Olver University of Minnesota Throughout, we work in the Euclidean vector space V = R n, the space of column vectors with n real entries

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

Inner Product Spaces and Orthogonality

Inner Product Spaces and Orthogonality Inner Product Spaces and Orthogonality week 3-4 Fall 2006 Dot product of R n The inner product or dot product of R n is a function, defined by u, v a b + a 2 b 2 + + a n b n for u a, a 2,, a n T, v b,

More information

160 CHAPTER 4. VECTOR SPACES

160 CHAPTER 4. VECTOR SPACES 160 CHAPTER 4. VECTOR SPACES 4. Rank and Nullity In this section, we look at relationships between the row space, column space, null space of a matrix and its transpose. We will derive fundamental results

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

Lecture 2 Matrix Operations

Lecture 2 Matrix Operations Lecture 2 Matrix Operations transpose, sum & difference, scalar multiplication matrix multiplication, matrix-vector product matrix inverse 2 1 Matrix transpose transpose of m n matrix A, denoted A T or

More information

Chapter 6. Orthogonality

Chapter 6. Orthogonality 6.3 Orthogonal Matrices 1 Chapter 6. Orthogonality 6.3 Orthogonal Matrices Definition 6.4. An n n matrix A is orthogonal if A T A = I. Note. We will see that the columns of an orthogonal matrix must be

More information

α = u v. In other words, Orthogonal Projection

α = u v. In other words, Orthogonal Projection Orthogonal Projection Given any nonzero vector v, it is possible to decompose an arbitrary vector u into a component that points in the direction of v and one that points in a direction orthogonal to v

More information

Inner product. Definition of inner product

Inner product. Definition of inner product Math 20F Linear Algebra Lecture 25 1 Inner product Review: Definition of inner product. Slide 1 Norm and distance. Orthogonal vectors. Orthogonal complement. Orthogonal basis. Definition of inner product

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

CONTROLLABILITY. Chapter 2. 2.1 Reachable Set and Controllability. Suppose we have a linear system described by the state equation

CONTROLLABILITY. Chapter 2. 2.1 Reachable Set and Controllability. Suppose we have a linear system described by the state equation Chapter 2 CONTROLLABILITY 2 Reachable Set and Controllability Suppose we have a linear system described by the state equation ẋ Ax + Bu (2) x() x Consider the following problem For a given vector x in

More information

LECTURES IN BASIC COMPUTATIONAL NUMERICAL ANALYSIS

LECTURES IN BASIC COMPUTATIONAL NUMERICAL ANALYSIS x (m+1) (m) = x [J(ƒ (m) 1 )] ƒ(x (m) ) f f i+1 i 1 D f = 0 i 2h LECTURES IN BASIC COMPUTATIONAL NUMERICAL ANALYSIS J M McDonough y = ƒ(y,t) University of Kentucky Lexington, KY 40506 E-mail: jmmcd@ukyedu

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

Systems of Linear Equations

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

More information

Variance Reduction. Pricing American Options. Monte Carlo Option Pricing. Delta and Common Random Numbers

Variance Reduction. Pricing American Options. Monte Carlo Option Pricing. Delta and Common Random Numbers Variance Reduction The statistical efficiency of Monte Carlo simulation can be measured by the variance of its output If this variance can be lowered without changing the expected value, fewer replications

More information

1 Sets and Set Notation.

1 Sets and Set Notation. LINEAR ALGEBRA MATH 27.6 SPRING 23 (COHEN) LECTURE NOTES Sets and Set Notation. Definition (Naive Definition of a Set). A set is any collection of objects, called the elements of that set. We will most

More information

Linear Algebra Review. Vectors

Linear Algebra Review. Vectors Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka kosecka@cs.gmu.edu http://cs.gmu.edu/~kosecka/cs682.html Virginia de Sa Cogsci 8F Linear Algebra review UCSD Vectors The length

More information

15.062 Data Mining: Algorithms and Applications Matrix Math Review

15.062 Data Mining: Algorithms and Applications Matrix Math Review .6 Data Mining: Algorithms and Applications Matrix Math Review The purpose of this document is to give a brief review of selected linear algebra concepts that will be useful for the course and to develop

More information

Yousef Saad University of Minnesota Computer Science and Engineering. CRM Montreal - April 30, 2008

Yousef Saad University of Minnesota Computer Science and Engineering. CRM Montreal - April 30, 2008 A tutorial on: Iterative methods for Sparse Matrix Problems Yousef Saad University of Minnesota Computer Science and Engineering CRM Montreal - April 30, 2008 Outline Part 1 Sparse matrices and sparsity

More information

MATH 551 - APPLIED MATRIX THEORY

MATH 551 - APPLIED MATRIX THEORY MATH 55 - APPLIED MATRIX THEORY FINAL TEST: SAMPLE with SOLUTIONS (25 points NAME: PROBLEM (3 points A web of 5 pages is described by a directed graph whose matrix is given by A Do the following ( points

More information

T ( a i x i ) = a i T (x i ).

T ( a i x i ) = a i T (x i ). Chapter 2 Defn 1. (p. 65) Let V and W be vector spaces (over F ). We call a function T : V W a linear transformation form V to W if, for all x, y V and c F, we have (a) T (x + y) = T (x) + T (y) and (b)

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Math 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = 36 + 41i.

Math 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = 36 + 41i. Math 5A HW4 Solutions September 5, 202 University of California, Los Angeles Problem 4..3b Calculate the determinant, 5 2i 6 + 4i 3 + i 7i Solution: The textbook s instructions give us, (5 2i)7i (6 + 4i)(

More information

3. INNER PRODUCT SPACES

3. INNER PRODUCT SPACES . INNER PRODUCT SPACES.. Definition So far we have studied abstract vector spaces. These are a generalisation of the geometric spaces R and R. But these have more structure than just that of a vector space.

More information

9 MATRICES AND TRANSFORMATIONS

9 MATRICES AND TRANSFORMATIONS 9 MATRICES AND TRANSFORMATIONS Chapter 9 Matrices and Transformations Objectives After studying this chapter you should be able to handle matrix (and vector) algebra with confidence, and understand the

More information

Notes on Symmetric Matrices

Notes on Symmetric Matrices CPSC 536N: Randomized Algorithms 2011-12 Term 2 Notes on Symmetric Matrices Prof. Nick Harvey University of British Columbia 1 Symmetric Matrices We review some basic results concerning symmetric matrices.

More information

1 Lecture: Integration of rational functions by decomposition

1 Lecture: Integration of rational functions by decomposition Lecture: Integration of rational functions by decomposition into partial fractions Recognize and integrate basic rational functions, except when the denominator is a power of an irreducible quadratic.

More information

Linear Maps. Isaiah Lankham, Bruno Nachtergaele, Anne Schilling (February 5, 2007)

Linear Maps. Isaiah Lankham, Bruno Nachtergaele, Anne Schilling (February 5, 2007) MAT067 University of California, Davis Winter 2007 Linear Maps Isaiah Lankham, Bruno Nachtergaele, Anne Schilling (February 5, 2007) As we have discussed in the lecture on What is Linear Algebra? one of

More information

A note on companion matrices

A note on companion matrices Linear Algebra and its Applications 372 (2003) 325 33 www.elsevier.com/locate/laa A note on companion matrices Miroslav Fiedler Academy of Sciences of the Czech Republic Institute of Computer Science Pod

More information

Introduction to Matrix Algebra

Introduction to Matrix Algebra Psychology 7291: Multivariate Statistics (Carey) 8/27/98 Matrix Algebra - 1 Introduction to Matrix Algebra Definitions: A matrix is a collection of numbers ordered by rows and columns. It is customary

More information

University of Lille I PC first year list of exercises n 7. Review

University of Lille I PC first year list of exercises n 7. Review University of Lille I PC first year list of exercises n 7 Review Exercise Solve the following systems in 4 different ways (by substitution, by the Gauss method, by inverting the matrix of coefficients

More information

Inner products on R n, and more

Inner products on R n, and more Inner products on R n, and more Peyam Ryan Tabrizian Friday, April 12th, 2013 1 Introduction You might be wondering: Are there inner products on R n that are not the usual dot product x y = x 1 y 1 + +

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

a 11 a 12 a 13... a 1n x 1 b 1 b 2..., (6.2)

a 11 a 12 a 13... a 1n x 1 b 1 b 2..., (6.2) Chapter 6 Systems of Linear Equations 6. Introduction Systems of linear equations hold a special place in computational physics, chemistry, and engineering. In fact, multiple computational problems in

More information

Mathematics Course 111: Algebra I Part IV: Vector Spaces

Mathematics Course 111: Algebra I Part IV: Vector Spaces Mathematics Course 111: Algebra I Part IV: Vector Spaces D. R. Wilkins Academic Year 1996-7 9 Vector Spaces A vector space over some field K is an algebraic structure consisting of a set V on which are

More information

A Direct Numerical Method for Observability Analysis

A Direct Numerical Method for Observability Analysis IEEE TRANSACTIONS ON POWER SYSTEMS, VOL 15, NO 2, MAY 2000 625 A Direct Numerical Method for Observability Analysis Bei Gou and Ali Abur, Senior Member, IEEE Abstract This paper presents an algebraic method

More information

Similarity and Diagonalization. Similar Matrices

Similarity and Diagonalization. Similar Matrices MATH022 Linear Algebra Brief lecture notes 48 Similarity and Diagonalization Similar Matrices Let A and B be n n matrices. We say that A is similar to B if there is an invertible n n matrix P such that

More information

Matrices and Linear Algebra

Matrices and Linear Algebra Chapter 2 Matrices and Linear Algebra 2. Basics Definition 2... A matrix is an m n array of scalars from a given field F. The individual values in the matrix are called entries. Examples. 2 3 A = 2 4 2

More information

26. Determinants I. 1. Prehistory

26. Determinants I. 1. Prehistory 26. Determinants I 26.1 Prehistory 26.2 Definitions 26.3 Uniqueness and other properties 26.4 Existence Both as a careful review of a more pedestrian viewpoint, and as a transition to a coordinate-independent

More information

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

= 2 + 1 2 2 = 3 4, Now assume that P (k) is true for some fixed k 2. This means that Instructions. Answer each of the questions on your own paper, and be sure to show your work so that partial credit can be adequately assessed. Credit will not be given for answers (even correct ones) without

More information

Eigenvalues and Eigenvectors

Eigenvalues and Eigenvectors Chapter 6 Eigenvalues and Eigenvectors 6. Introduction to Eigenvalues Linear equations Ax D b come from steady state problems. Eigenvalues have their greatest importance in dynamic problems. The solution

More information

RESULTANT AND DISCRIMINANT OF POLYNOMIALS

RESULTANT AND DISCRIMINANT OF POLYNOMIALS RESULTANT AND DISCRIMINANT OF POLYNOMIALS SVANTE JANSON Abstract. This is a collection of classical results about resultants and discriminants for polynomials, compiled mainly for my own use. All results

More information

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Matrix Algebra A. Doerr Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Some Basic Matrix Laws Assume the orders of the matrices are such that

More information

Numerical Methods for Solving Systems of Nonlinear Equations

Numerical Methods for Solving Systems of Nonlinear Equations Numerical Methods for Solving Systems of Nonlinear Equations by Courtney Remani A project submitted to the Department of Mathematical Sciences in conformity with the requirements for Math 4301 Honour s

More information

8. Linear least-squares

8. Linear least-squares 8. Linear least-squares EE13 (Fall 211-12) definition examples and applications solution of a least-squares problem, normal equations 8-1 Definition overdetermined linear equations if b range(a), cannot

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

LU Factoring of Non-Invertible Matrices

LU Factoring of Non-Invertible Matrices ACM Communications in Computer Algebra, LU Factoring of Non-Invertible Matrices D. J. Jeffrey Department of Applied Mathematics, The University of Western Ontario, London, Ontario, Canada N6A 5B7 Revised

More information

MATH 304 Linear Algebra Lecture 20: Inner product spaces. Orthogonal sets.

MATH 304 Linear Algebra Lecture 20: Inner product spaces. Orthogonal sets. MATH 304 Linear Algebra Lecture 20: Inner product spaces. Orthogonal sets. Norm The notion of norm generalizes the notion of length of a vector in R n. Definition. Let V be a vector space. A function α

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

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