Linear Programing and Inversions
|
|
- Godfrey McCoy
- 5 years ago
- Views:
Transcription
1 Linear Programing and Inversions Linear programming (LP, also called linear optimization) is a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical model whose requirements are represented by linear relationships. Linear programming is a special case of optimization (WIKI) y= a x + b The solution tries to set the left side = right side), or achieve the minimum differences between the two sides of the equal sign. This is really an optimization problem, or minimization problem with the solution (sometimes we refer to as models ) produce the least amount of errors (so called the best fits/matches between the two sides of the equation. Example of a model: the line y that fits two or more points (x 1, y 1 ), (x 2, y 2 ). Then a and b are model coefficients If we have multiple equations, or a system of linear equations, we have a linear algebra problem involving matrices and vectors. 1
2 What we have done here borders on the art of inversions, i.e., given AX = B, solve for X by finding the inverse of something (e.g., A). Where it all began: Radon transform: (Johan Radon, 1917): integral of function over a straight line segment. Medical Tomography Brain Scanning: Could the best valentine s gift to your love ones a freshly taken brainogram? The spots of red shows your love, not your words! 2 2
3 Review: Matrices and Determinants Symmetric Diagonal Upper Triangular Lower Triangular Zero Identity Suppose Addition and Subtraction Multiplication A B C 3
4 Further review: Transpose of a Matrix switching rows and columns Determinant of a Matrix (1) Determinant of a 2 x 2 The determinant of this matrix becomes: Determinant of 3 x 3 4
5 Matrices and Vector Operations (Python) import numpy as np A = np.array([[1, 2, 3], [1, 0, 2]]) B = np.array([[2, 1, 2], [1, 0, 3]]) print('a + B = ') print(a+b) print('\n A - B = ') print(a-b) print() A = np.array([[1, 2,], [3, 4]]) B = np.array([[5, 6 ], [7, 8]]) print(a) print(b) print('\n A * B =') print(a*b) # this is element-wise multiplication! print('\n A dot B =') print(np.dot(a, B)) v = np.array([[1], [2], [3]]) # column vector print(v) print('transpose of column vector v') print(np.transpose(v)) 5 print(v.t) # transpose method from array object
6 Output: A + B = [[3 3 5] [2 0 5]] A - B = [[-1 1 1] [ 0 0-1]] [[1 2] [3 4]] [[5 6] [7 8]] A * B = [[ 5 12] [21 32]] A dot B = [[19 22] [43 50]] [[1] [2] [3]] transpose of column vector v [[1 2 3]] Continued here rank of matrix A (2, 2) [[1 2 3]] matrix A [[1 2] [3 4]] determinant of A = -2 # Code below shows that a nonsquare matrix has determinant of 0 M_ill = np.array([[1, 2, 3], [0, 0, 0], [0, 0, 0]]) print('\n non-square matrix M_ill') print(m_ill) print('determinant = %g\n' % np.linalg.det(m_ill)) Output: non-square matrix M_ill [[1 2 3] [0 0 0] [0 0 0]] determinant = 0 6
7 Python script import numpy as np a = np.zeros([2, 2]) a b = np.ones([2, 2]) b c = np.full([2, 2], 5) c d = np.eye(3) d e = np.random.random((2, 2)) e Output: array([[0., 0.], [0., 0.]]) array([[1., 1.], [1., 1.]]) array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]) array([[ , ], [ , ]]) 7
8 Linearization We have encountered problems in the past where a system of equations needs to be solved for the coefficients of interpolation function (e.g., line or cubic polynomials). Example: for a given 4 data points, we would like to find a function to interpolate the value in between or beyond. The key is to set up the system of a equations to solve for the same number of unknowns (coefficients) b(x) (x 2, b 2 ) Cubic polynomial (x 4, b 4 ) 8 (x 1, b 1 ) (x 3, b 3 ) x This could be done using a Cubic polynomial, where we need to solve a 4 x 4 system of equations for 4 data points: a 1 + a 2 x i + a 3 x i 2 + a 4 x i 3 = b i In other words: a 1 + a 2 x 1 + a 3 x1 2 + a 4 x3 1 = b 1 a 1 + a 2 x 2 + a 3 x2 2 + a 4x2 3 = b 2 a 1 + a 2 x 3 + a 3 x3 2 + a 4 x 3 3 = b 3 The unknowns we want to find are a 0, a 1, a 2 and a 3.
9 Numerical solution: Write the system of equations as the sum of unknown coefficients multiply by the independent variable. Cubic Polynomial Interpolation (governing equation) y " $ $ $ $ # x 1 0 x 2 0 x 1 1 x 2 1 x 1 2 x 2 2 x 1 3 x x n 0 x n 1 x n 2 x n 3 " b % " a1% 1 % $ ' ' $ ' ' a2 $ b 2 ' $ ' = $...' ' $ a3' $ ' ' $ '... & # a4& $ ' # $ &' b n A X = B How to solve? Let s start with a simpler inverse problem: find intercept and slope of a linear trend. a + bx = y (governing equation) x " 1 x 1 % " y 1 % $ ' $ ' $ 1 x 2 ' " $ 1 x 3 ' a % $ y 2 ' $ ' = $ y $ ' # b 3 ' & $ ' $ ' $... ' # $ 1 x n &' # $ y n &' 9
10 Redundancy y Perfect line fit If perfectly aligned, any two points can be used to solve for slope+intercept x Determinedness: If there are more linearly independent equations than model coefficients, then this problem is called Over-determined. In this case, if we could show the independence of the 5 data points, the system is over-determined due to only 2 unknowns (a and b). over-determined under-determined y y No single line can go through all points x Infinite solutions x 10
11 Solving Matrix equations --- Gaussian Elimination Can use determinant methods such as Cramer s rule, but the most useful approach is Gaussian Elim. Most matrix decomposition methods is based upon this method. First, let use a simple example: Step 1: Forward Elim. Get rid of x1 in second Eq. by subtracting first Eq x 2 from second Upper triangular matrix form Start at the bottom Step 2: Back substitution Note: determinant does not change (and nonzero!). 0th step 1st step 11
12 Utopian Case: a direct (perfect, no noise) solution exists, one can use linear algebra to solve C X = D C -1 C X = C -1 D X = C -1 D For a very simple 2 x 2 problem, Remarks: (1) If the determinant of the matrix is 0 (singular, imagine c=-2a and d=-2b), in computing the inverse, we have 1/0 which is infinite ---> no matrix inverse. (2) Unless C is a diagonal matrix, the inverse of the matrix is a matrix containing the reciprocal of each element. (3) Special case Comment: If any of the diagonal =0, the matrix is singular again because 1. that row doesn t count, and 2. 1/0 is infinite. 12
13 Python implementation Write in matrix form: 2 1 C = [ 4 1] D = [ 4 2] X = [ x 1 x 2 ] direct_inversion_2by2.py # This code solves a direct solution for a 2x2 import numpy as np C = np.array([[2, 1], [4, -1]]) D = np.array([4, 2]) print('c is:\n', C) print('d is:\n', D) Cinv = np.array([[-1, -1], [-4, 2]])/np.linalg.det(C) print('\nc inverse is:\n', Cinv) print('\ncinv * C = \n, \ np.dot(cinv, C)) X = np.dot(cinv, D) Identity print('\nfinally, X = \n', X) # built-in function print('built-in function solution =\n', np.linalg.solve(c, D)) Output C is: [[ 2 1] [ 4-1]] D is: [4 2] C inverse is: [[ ] [ ] Cinv * C = [[1. 0.] [0. 1.]] Finally, X = [1. 2.] Built-in function solution = [1. 2.] 13
14 Matrix properties vs. Solution Types: (1) Ranks: The maximum number of linearly independent rows of a matrix is called the Row Rank of a matrix. The number of columns is called the Column Rank of a matrix. Sometimes, people use the word Rank to represent Row Rank. (2) Linear independence: Set of vectors x i are considered linearly independent if and only if solution to a i * x i =0 is a i =0 (in other words, no vector can be expressed as a linear combination of other vectors.). (3) Singularity: a matrix is singular if Rank< # rows. (4) When a set of linear equations is described by a singular matrix, two things may happen: 1. No solution 2. Solution is there but not unique (need some more constraints like adding a damping term to solve) Problem 1: Ill Conditioned Matrix Suppose we have the following set x 1 - x 2 = 1-2x 1 + 2x 2 = -2 This looks like we could solve for the two unknowns from 2 equations, issue: The second equation is just the first multiplied by a linear factor 2. So in reality, the rank (row rank) is 1 and not 2 (maximum number of rows). Solution is x 1 = 1 + x 2 (infinite solutions). Example 2: x 1 - x 2 = 1-2x 1 + 2x 2 = 5 14 NO SOLUTION
15 Problem 2: Small elements on the diagonal Eventually turn the matrix into an upper triangular form so that the last row has only 1 non-zero element (diagonal). Solve that equation for the last element of the unknown vector, substitute into second last row, solve for second last variable, and so on Issue: Method will fail for small or large diagonal element. Example: Forward Back Sub Examine the accuracy (single precision) of (2-1/e) Suppose =0.1 x = 0.2 x 10 = x x x 10 9 = x 10 9 = x
16 Due to the same type of round-off error, 16 So equation 2 becomes In fact, we can do better by hand, (1, 1) does satisfy the original equations, becomes In other words, my hand calculation is better than computers.
17 Fix the computer problem: F. El. Permute elements. B. Sub Why does it work? In this example, by switching the two rows, we have effectively moved the near-zero diagonal element to the side so diagonal is no longer too large or too small. This operation (switching row or column) is called pivoting. Scaled Partial Pivoting Method: (1) Start with row vector index i (2) Find scale factor = largest absolute element of each row S i = max a ij (1 <= j <= n, 1 <=i <= n) (3) Use equation for which is the largest, where p is the pivoting row number 17
18 Lets use the 2 x 2 equation to demonstrate So start with row 1, the scaling factor (absolute max) is S 1 =1 For Row 2, the absolute maximum S 2 = 1 a 11 = e/1 = e a 21 = 1/1 = 1 Since a 11 is very small and a 21 > a 11, switch. Now go to row 2 (new pivoting row), is the diagonal too small, if so switch with rows below (don t exist in this 2x2 problem). Implementation of scaled partial pivoting loop over i, find S i = max a ij (0 <= j <= n-1, 0 <=i <=n-1) end loop loop over i, if fabs(a ii ) < threshold loop over remaining index j > i compute Find row k=j that has the max value end loop Replace current pivot row by row k endif end loop
Numerical Analysis Fall. Gauss Elimination
Numerical Analysis 2015 Fall Gauss Elimination Solving systems m g g m m g x x x k k k k k k k k k 3 2 1 3 2 1 3 3 3 2 3 2 2 2 1 0 0 Graphical Method For small sets of simultaneous equations, graphing
More informationCS227-Scientific Computing. Lecture 4: A Crash Course in Linear Algebra
CS227-Scientific Computing Lecture 4: A Crash Course in Linear Algebra Linear Transformation of Variables A common phenomenon: Two sets of quantities linearly related: y = 3x + x 2 4x 3 y 2 = 2.7x 2 x
More informationChapter 9: Gaussian Elimination
Uchechukwu Ofoegbu Temple University Chapter 9: Gaussian Elimination Graphical Method The solution of a small set of simultaneous equations, can be obtained by graphing them and determining the location
More information[Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty.]
Math 43 Review Notes [Disclaimer: This is not a complete list of everything you need to know, just some of the topics that gave people difficulty Dot Product If v (v, v, v 3 and w (w, w, w 3, then the
More informationNumerical Linear Algebra
Numerical Linear Algebra Direct Methods Philippe B. Laval KSU Fall 2017 Philippe B. Laval (KSU) Linear Systems: Direct Solution Methods Fall 2017 1 / 14 Introduction The solution of linear systems is one
More informationConceptual Questions for Review
Conceptual Questions for Review Chapter 1 1.1 Which vectors are linear combinations of v = (3, 1) and w = (4, 3)? 1.2 Compare the dot product of v = (3, 1) and w = (4, 3) to the product of their lengths.
More informationLinear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4
Linear Algebra Section. : LU Decomposition Section. : Permutations and transposes Wednesday, February 1th Math 01 Week # 1 The LU Decomposition We learned last time that we can factor a invertible matrix
More informationLinear Algebra V = T = ( 4 3 ).
Linear Algebra Vectors A column vector is a list of numbers stored vertically The dimension of a column vector is the number of values in the vector W is a -dimensional column vector and V is a 5-dimensional
More informationPOLI270 - Linear Algebra
POLI7 - Linear Algebra Septemer 8th Basics a x + a x +... + a n x n b () is the linear form where a, b are parameters and x n are variables. For a given equation such as x +x you only need a variable and
More informationAMS 209, Fall 2015 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems
AMS 209, Fall 205 Final Project Type A Numerical Linear Algebra: Gaussian Elimination with Pivoting for Solving Linear Systems. Overview We are interested in solving a well-defined linear system given
More informationMODELS USING MATRICES WITH PYTHON
MODELS USING MATRICES WITH PYTHON José M. Garrido Department of Computer Science May 2016 College of Computing and Software Engineering Kennesaw State University c 2015, J. M. Garrido Models Using Matrices
More informationLECTURES 14/15: LINEAR INDEPENDENCE AND BASES
LECTURES 14/15: LINEAR INDEPENDENCE AND BASES MA1111: LINEAR ALGEBRA I, MICHAELMAS 2016 1. Linear Independence We have seen in examples of span sets of vectors that sometimes adding additional vectors
More informationHani Mehrpouyan, California State University, Bakersfield. Signals and Systems
Hani Mehrpouyan, Department of Electrical and Computer Engineering, Lecture 26 (LU Factorization) May 30 th, 2013 The material in these lectures is partly taken from the books: Elementary Numerical Analysis,
More informationANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3
ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3 ISSUED 24 FEBRUARY 2018 1 Gaussian elimination Let A be an (m n)-matrix Consider the following row operations on A (1) Swap the positions any
More informationGetting Started with Communications Engineering
1 Linear algebra is the algebra of linear equations: the term linear being used in the same sense as in linear functions, such as: which is the equation of a straight line. y ax c (0.1) Of course, if we
More informationAn Introduction To Linear Algebra. Kuttler
An Introduction To Linear Algebra Kuttler April, 7 Contents Introduction 7 F n 9 Outcomes 9 Algebra in F n Systems Of Equations Outcomes Systems Of Equations, Geometric Interpretations Systems Of Equations,
More information3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions
A. LINEAR ALGEBRA. CONVEX SETS 1. Matrices and vectors 1.1 Matrix operations 1.2 The rank of a matrix 2. Systems of linear equations 2.1 Basic solutions 3. Vector spaces 3.1 Linear dependence and independence
More informationLinear Algebraic Equations
Linear Algebraic Equations Linear Equations: a + a + a + a +... + a = c 11 1 12 2 13 3 14 4 1n n 1 a + a + a + a +... + a = c 21 2 2 23 3 24 4 2n n 2 a + a + a + a +... + a = c 31 1 32 2 33 3 34 4 3n n
More informationReview Questions REVIEW QUESTIONS 71
REVIEW QUESTIONS 71 MATLAB, is [42]. For a comprehensive treatment of error analysis and perturbation theory for linear systems and many other problems in linear algebra, see [126, 241]. An overview of
More informationMATH 310, REVIEW SHEET 2
MATH 310, REVIEW SHEET 2 These notes are a very short summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive,
More information1 GSW Sets of Systems
1 Often, we have to solve a whole series of sets of simultaneous equations of the form y Ax, all of which have the same matrix A, but each of which has a different known vector y, and a different unknown
More informationDesigning Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way
EECS 16A Designing Information Devices and Systems I Fall 018 Lecture Notes Note 1 1.1 Introduction to Linear Algebra the EECS Way In this note, we will teach the basics of linear algebra and relate it
More informationMatrices and systems of linear equations
Matrices and systems of linear equations Samy Tindel Purdue University Differential equations and linear algebra - MA 262 Taken from Differential equations and linear algebra by Goode and Annin Samy T.
More informationGAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)
GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511) D. ARAPURA Gaussian elimination is the go to method for all basic linear classes including this one. We go summarize the main ideas. 1.
More informationDesigning Information Devices and Systems I Spring 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way
EECS 16A Designing Information Devices and Systems I Spring 018 Lecture Notes Note 1 1.1 Introduction to Linear Algebra the EECS Way In this note, we will teach the basics of linear algebra and relate
More information1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )
Direct Methods for Linear Systems Chapter Direct Methods for Solving Linear Systems Per-Olof Persson persson@berkeleyedu Department of Mathematics University of California, Berkeley Math 18A Numerical
More informationNumerical Methods Lecture 2 Simultaneous Equations
CGN 42 - Computer Methods Numerical Methods Lecture 2 Simultaneous Equations Topics: matrix operations solving systems of equations Matrix operations: Adding / subtracting Transpose Multiplication Adding
More informationLinear Least-Squares Data Fitting
CHAPTER 6 Linear Least-Squares Data Fitting 61 Introduction Recall that in chapter 3 we were discussing linear systems of equations, written in shorthand in the form Ax = b In chapter 3, we just considered
More informationLinear Algebra and Matrix Inversion
Jim Lambers MAT 46/56 Spring Semester 29- Lecture 2 Notes These notes correspond to Section 63 in the text Linear Algebra and Matrix Inversion Vector Spaces and Linear Transformations Matrices are much
More information2 Systems of Linear Equations
2 Systems of Linear Equations A system of equations of the form or is called a system of linear equations. x + 2y = 7 2x y = 4 5p 6q + r = 4 2p + 3q 5r = 7 6p q + 4r = 2 Definition. An equation involving
More informationLinear Equations and Matrix
1/60 Chia-Ping Chen Professor Department of Computer Science and Engineering National Sun Yat-sen University Linear Algebra Gaussian Elimination 2/60 Alpha Go Linear algebra begins with a system of linear
More informationB553 Lecture 5: Matrix Algebra Review
B553 Lecture 5: Matrix Algebra Review Kris Hauser January 19, 2012 We have seen in prior lectures how vectors represent points in R n and gradients of functions. Matrices represent linear transformations
More informationY = ax + b. Numerical Applications Least-squares. Start with Self-test 10-1/459. Linear equation. Error function: E = D 2 = (Y - (ax+b)) 2
Ch.10 Numerical Applications 10-1 Least-squares Start with Self-test 10-1/459. Linear equation Y = ax + b Error function: E = D 2 = (Y - (ax+b)) 2 Regression Formula: Slope a = (N ΣXY - (ΣX)(ΣY)) / (N
More informationChapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form
Chapter 5. Linear Algebra A linear (algebraic) 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 and b are real numbers. 1
More informationMath 308 Midterm Answers and Comments July 18, Part A. Short answer questions
Math 308 Midterm Answers and Comments July 18, 2011 Part A. Short answer questions (1) Compute the determinant of the matrix a 3 3 1 1 2. 1 a 3 The determinant is 2a 2 12. Comments: Everyone seemed to
More information1 GSW Gaussian Elimination
Gaussian elimination is probabl the simplest technique for solving a set of simultaneous linear equations, such as: = A x + A x + A x +... + A x,,,, n n = A x + A x + A x +... + A x,,,, n n... m = Am,x
More informationNumerical Methods Lecture 2 Simultaneous Equations
Numerical Methods Lecture 2 Simultaneous Equations Topics: matrix operations solving systems of equations pages 58-62 are a repeat of matrix notes. New material begins on page 63. Matrix operations: Mathcad
More informationL2-7 Some very stylish matrix decompositions for solving Ax = b 10 Oct 2015
L-7 Some very stylish matrix decompositions for solving Ax = b 10 Oct 015 Marty McFly: Wait a minute, Doc. Ah... Are you telling me you built a time machine... out of a DeLorean? Doc Brown: The way I see
More informationFinal Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2
Final Review Sheet The final will cover Sections Chapters 1,2,3 and 4, as well as sections 5.1-5.4, 6.1-6.2 and 7.1-7.3 from chapters 5,6 and 7. This is essentially all material covered this term. Watch
More informationMATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2
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 informationMATH 3511 Lecture 1. Solving Linear Systems 1
MATH 3511 Lecture 1 Solving Linear Systems 1 Dmitriy Leykekhman Spring 2012 Goals Review of basic linear algebra Solution of simple linear systems Gaussian elimination D Leykekhman - MATH 3511 Introduction
More informationSOLVING LINEAR SYSTEMS
SOLVING LINEAR SYSTEMS We want to solve the linear system a, x + + a,n x n = b a n, x + + a n,n x n = b n This will be done by the method used in beginning algebra, by successively eliminating unknowns
More informationA Review of Matrix Analysis
Matrix Notation Part Matrix Operations Matrices are simply rectangular arrays of quantities Each quantity in the array is called an element of the matrix and an element can be either a numerical value
More information4 Linear Algebra Review
4 Linear Algebra Review For this topic we quickly review many key aspects of linear algebra that will be necessary for the remainder of the course 41 Vectors and Matrices For the context of data analysis,
More informationMatrix notation. A nm : n m : size of the matrix. m : no of columns, n: no of rows. Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1
Matrix notation A nm : n m : size of the matrix m : no of columns, n: no of rows Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1 n = m square matrix Symmetric matrix Upper triangular matrix: matrix
More information. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in
Vectors and Matrices Continued Remember that our goal is to write a system of algebraic equations as a matrix equation. Suppose we have the n linear algebraic equations a x + a 2 x 2 + a n x n = b a 2
More informationLinear Algebra, Summer 2011, pt. 2
Linear Algebra, Summer 2, pt. 2 June 8, 2 Contents Inverses. 2 Vector Spaces. 3 2. Examples of vector spaces..................... 3 2.2 The column space......................... 6 2.3 The null space...........................
More informationLinear Algebra. Solving Linear Systems. Copyright 2005, W.R. Winfrey
Copyright 2005, W.R. Winfrey Topics Preliminaries Echelon Form of a Matrix Elementary Matrices; Finding A -1 Equivalent Matrices LU-Factorization Topics Preliminaries Echelon Form of a Matrix Elementary
More information4 Elementary matrices, continued
4 Elementary matrices, continued We have identified 3 types of row operations and their corresponding elementary matrices. To repeat the recipe: These matrices are constructed by performing the given row
More informationMODULE 7. where A is an m n real (or complex) matrix. 2) Let K(t, s) be a function of two variables which is continuous on the square [0, 1] [0, 1].
Topics: Linear operators MODULE 7 We are going to discuss functions = mappings = transformations = operators from one vector space V 1 into another vector space V 2. However, we shall restrict our sights
More information1 Problem 1 Solution. 1.1 Common Mistakes. In order to show that the matrix L k is the inverse of the matrix M k, we need to show that
1 Problem 1 Solution In order to show that the matrix L k is the inverse of the matrix M k, we need to show that Since we need to show that Since L k M k = I (or M k L k = I). L k = I + m k e T k, M k
More information6: Introduction to Elimination. Lecture
Math 2270 - Lecture 6: Introduction to Elimination Dylan Zwick Fall 2012 This lecture covers section 2.2 of the textbook. 1 Elimination for Equations Involving Two Vari ables We re going to start our discussion
More informationLinear Systems of n equations for n unknowns
Linear Systems of n equations for n unknowns In many application problems we want to find n unknowns, and we have n linear equations Example: Find x,x,x such that the following three equations hold: x
More informationChapter 2 Notes, Linear Algebra 5e Lay
Contents.1 Operations with Matrices..................................1.1 Addition and Subtraction.............................1. Multiplication by a scalar............................ 3.1.3 Multiplication
More informationChapter 4. Solving Systems of Equations. Chapter 4
Solving Systems of Equations 3 Scenarios for Solutions There are three general situations we may find ourselves in when attempting to solve systems of equations: 1 The system could have one unique solution.
More informationLinear Algebra. Carleton DeTar February 27, 2017
Linear Algebra Carleton DeTar detar@physics.utah.edu February 27, 2017 This document provides some background for various course topics in linear algebra: solving linear systems, determinants, and finding
More informationLinear Algebraic Equations
Linear Algebraic Equations 1 Fundamentals Consider the set of linear algebraic equations n a ij x i b i represented by Ax b j with [A b ] [A b] and (1a) r(a) rank of A (1b) Then Axb has a solution iff
More informationMath 54 Homework 3 Solutions 9/
Math 54 Homework 3 Solutions 9/4.8.8.2 0 0 3 3 0 0 3 6 2 9 3 0 0 3 0 0 3 a a/3 0 0 3 b b/3. c c/3 0 0 3.8.8 The number of rows of a matrix is the size (dimension) of the space it maps to; the number of
More informationLinear Algebra Basics
Linear Algebra Basics For the next chapter, understanding matrices and how to do computations with them will be crucial. So, a good first place to start is perhaps What is a matrix? A matrix A is an array
More informationAM 205: lecture 8. Last time: Cholesky factorization, QR factorization Today: how to compute the QR factorization, the Singular Value Decomposition
AM 205: lecture 8 Last time: Cholesky factorization, QR factorization Today: how to compute the QR factorization, the Singular Value Decomposition QR Factorization A matrix A R m n, m n, can be factorized
More informationCOURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.
COURSE 9 4 Numerical methods for solving linear systems Practical solving of many problems eventually leads to solving linear systems Classification of the methods: - direct methods - with low number of
More informationVector Spaces. 9.1 Opening Remarks. Week Solvable or not solvable, that s the question. View at edx. Consider the picture
Week9 Vector Spaces 9. Opening Remarks 9.. Solvable or not solvable, that s the question Consider the picture (,) (,) p(χ) = γ + γ χ + γ χ (, ) depicting three points in R and a quadratic polynomial (polynomial
More information2.1 Gaussian Elimination
2. Gaussian Elimination A common problem encountered in numerical models is the one in which there are n equations and n unknowns. The following is a description of the Gaussian elimination method for
More informationLU Factorization. LU factorization is the most common way of solving linear systems! Ax = b LUx = b
AM 205: lecture 7 Last time: LU factorization Today s lecture: Cholesky factorization, timing, QR factorization Reminder: assignment 1 due at 5 PM on Friday September 22 LU Factorization LU factorization
More informationy b where U. matrix inverse A 1 ( L. 1 U 1. L 1 U 13 U 23 U 33 U 13 2 U 12 1
LU decomposition -- manual demonstration Instructor: Nam Sun Wang lu-manualmcd LU decomposition, where L is a lower-triangular matrix with as the diagonal elements and U is an upper-triangular matrix Just
More informationMaths for Signals and Systems Linear Algebra for Engineering Applications
Maths for Signals and Systems Linear Algebra for Engineering Applications Lectures 1-2, Tuesday 11 th October 2016 DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL PROCESSING IMPERIAL COLLEGE LONDON
More informationApplied Linear Algebra in Geoscience Using MATLAB
Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in
More informationFinite Math - J-term Section Systems of Linear Equations in Two Variables Example 1. Solve the system
Finite Math - J-term 07 Lecture Notes - //07 Homework Section 4. - 9, 0, 5, 6, 9, 0,, 4, 6, 0, 50, 5, 54, 55, 56, 6, 65 Section 4. - Systems of Linear Equations in Two Variables Example. Solve the system
More informationESCI 386 Scientific Programming, Analysis and Visualization with Python. Lesson 18 - Linear Algebra
ESCI 386 Scientific Programming, Analysis and Visualization with Python Lesson 18 - Linear Algebra 1 Matrix Operations In many instances, numpy arrays can be thought of as matrices. In the next slides
More informationLaboratory #3: Linear Algebra. Contents. Grace Yung
Laboratory #3: Linear Algebra Grace Yung Contents List of Problems. Introduction. Objectives.2 Prerequisites 2. Linear Systems 2. What is a Matrix 2.2 Quick Review 2.3 Gaussian Elimination 2.3. Decomposition
More informationIntroduction to Determinants
Introduction to Determinants For any square matrix of order 2, we have found a necessary and sufficient condition for invertibility. Indeed, consider the matrix The matrix A is invertible if and only if.
More informationDifferential Equations
This document was written and copyrighted by Paul Dawkins. Use of this document and its online version is governed by the Terms and Conditions of Use located at. The online version of this document is
More informationMATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018
Homework #1 Assigned: August 20, 2018 Review the following subjects involving systems of equations and matrices from Calculus II. Linear systems of equations Converting systems to matrix form Pivot entry
More informationMath Linear Algebra Final Exam Review Sheet
Math 15-1 Linear Algebra Final Exam Review Sheet Vector Operations Vector addition is a component-wise operation. Two vectors v and w may be added together as long as they contain the same number n of
More informationProcess Model Formulation and Solution, 3E4
Process Model Formulation and Solution, 3E4 Section B: Linear Algebraic Equations Instructor: Kevin Dunn dunnkg@mcmasterca Department of Chemical Engineering Course notes: Dr Benoît Chachuat 06 October
More informationMath 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008
Math 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008 Exam 2 will be held on Tuesday, April 8, 7-8pm in 117 MacMillan What will be covered The exam will cover material from the lectures
More informationMath 51, Homework-2. Section numbers are from the course textbook.
SSEA Summer 2017 Math 51, Homework-2 Section numbers are from the course textbook. 1. Write the parametric equation of the plane that contains the following point and line: 1 1 1 3 2, 4 2 + t 3 0 t R.
More informationLinear Algebra. Min Yan
Linear Algebra Min Yan January 2, 2018 2 Contents 1 Vector Space 7 1.1 Definition................................. 7 1.1.1 Axioms of Vector Space..................... 7 1.1.2 Consequence of Axiom......................
More informationNumerical Linear Algebra
Numerical Linear Algebra The two principal problems in linear algebra are: Linear system Given an n n matrix A and an n-vector b, determine x IR n such that A x = b Eigenvalue problem Given an n n matrix
More informationCPE 310: Numerical Analysis for Engineers
CPE 310: Numerical Analysis for Engineers Chapter 2: Solving Sets of Equations Ahmed Tamrawi Copyright notice: care has been taken to use only those web images deemed by the instructor to be in the public
More informationElementary Linear Algebra
Matrices J MUSCAT Elementary Linear Algebra Matrices Definition Dr J Muscat 2002 A matrix is a rectangular array of numbers, arranged in rows and columns a a 2 a 3 a n a 2 a 22 a 23 a 2n A = a m a mn We
More information1.Chapter Objectives
LU Factorization INDEX 1.Chapter objectives 2.Overview of LU factorization 2.1GAUSS ELIMINATION AS LU FACTORIZATION 2.2LU Factorization with Pivoting 2.3 MATLAB Function: lu 3. CHOLESKY FACTORIZATION 3.1
More informationCHAPTER 6. Direct Methods for Solving Linear Systems
CHAPTER 6 Direct Methods for Solving Linear Systems. Introduction A direct method for approximating the solution of a system of n linear equations in n unknowns is one that gives the exact solution to
More information6 EIGENVALUES AND EIGENVECTORS
6 EIGENVALUES AND EIGENVECTORS INTRODUCTION TO EIGENVALUES 61 Linear equations Ax = b come from steady state problems Eigenvalues have their greatest importance in dynamic problems The solution of du/dt
More informationCS412: Lecture #17. Mridul Aanjaneya. March 19, 2015
CS: Lecture #7 Mridul Aanjaneya March 9, 5 Solving linear systems of equations Consider a lower triangular matrix L: l l l L = l 3 l 3 l 33 l n l nn A procedure similar to that for upper triangular systems
More informationCSE 160 Lecture 13. Numerical Linear Algebra
CSE 16 Lecture 13 Numerical Linear Algebra Announcements Section will be held on Friday as announced on Moodle Midterm Return 213 Scott B Baden / CSE 16 / Fall 213 2 Today s lecture Gaussian Elimination
More information4 Elementary matrices, continued
4 Elementary matrices, continued We have identified 3 types of row operations and their corresponding elementary matrices. If you check the previous examples, you ll find that these matrices are constructed
More informationNumerical Methods I Solving Square Linear Systems: GEM and LU factorization
Numerical Methods I Solving Square Linear Systems: GEM and LU factorization Aleksandar Donev Courant Institute, NYU 1 donev@courant.nyu.edu 1 MATH-GA 2011.003 / CSCI-GA 2945.003, Fall 2014 September 18th,
More informationPractical Linear Algebra: A Geometry Toolbox
Practical Linear Algebra: A Geometry Toolbox Third edition Chapter 12: Gauss for Linear Systems Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/pla
More informationCS 143 Linear Algebra Review
CS 143 Linear Algebra Review Stefan Roth September 29, 2003 Introductory Remarks This review does not aim at mathematical rigor very much, but instead at ease of understanding and conciseness. Please see
More information(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB
Applied Linear Algebra in Geoscience Using MATLAB (Mathematical Operations with Arrays) Contents Getting Started Matrices Creating Arrays Linear equations Mathematical Operations with Arrays Using Script
More informationScientific Computing
Scientific Computing Direct solution methods Martin van Gijzen Delft University of Technology October 3, 2018 1 Program October 3 Matrix norms LU decomposition Basic algorithm Cost Stability Pivoting Pivoting
More informationLecture 1: Systems of linear equations and their solutions
Lecture 1: Systems of linear equations and their solutions Course overview Topics to be covered this semester: Systems of linear equations and Gaussian elimination: Solving linear equations and applications
More information22A-2 SUMMER 2014 LECTURE 5
A- SUMMER 0 LECTURE 5 NATHANIEL GALLUP Agenda Elimination to the identity matrix Inverse matrices LU factorization Elimination to the identity matrix Previously, we have used elimination to get a system
More informationComputational Methods CMSC/AMSC/MAPL 460. Eigenvalues and Eigenvectors. Ramani Duraiswami, Dept. of Computer Science
Computational Methods CMSC/AMSC/MAPL 460 Eigenvalues and Eigenvectors Ramani Duraiswami, Dept. of Computer Science Eigen Values of a Matrix Recap: A N N matrix A has an eigenvector x (non-zero) with corresponding
More informationAN ITERATION. In part as motivation, we consider an iteration method for solving a system of linear equations which has the form x Ax = b
AN ITERATION In part as motivation, we consider an iteration method for solving a system of linear equations which has the form x Ax = b In this, A is an n n matrix and b R n.systemsof this form arise
More informationElementary maths for GMT
Elementary maths for GMT Linear Algebra Part 2: Matrices, Elimination and Determinant m n matrices The system of m linear equations in n variables x 1, x 2,, x n a 11 x 1 + a 12 x 2 + + a 1n x n = b 1
More informationMTH 2032 Semester II
MTH 232 Semester II 2-2 Linear Algebra Reference Notes Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education December 28, 2 ii Contents Table of Contents
More information(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).
CMPSCI611: Verifying Polynomial Identities Lecture 13 Here is a problem that has a polynomial-time randomized solution, but so far no poly-time deterministic solution. Let F be any field and let Q(x 1,...,
More informationTopics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij
Topics Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij or a ij lives in row i and column j Definition of a matrix
More information