Optimized LU-decomposition with Full Pivot for Small Batched Matrices S3069
|
|
- Harold Bridges
- 6 years ago
- Views:
Transcription
1 Optimized LU-decomposition with Full Pivot for Small Batched Matrices S369 Ian Wainwright High Performance Consulting Sweden
2 Based on work for GTC 212: 1x speed-up vs multi-threaded Intel MKL on an 4 core (8HT). Background -based_lu_factorization.pdf
3 Aim To investigate various techniques for batched matrix computations. The motivation behind this work is to use our previous work on LUdecomposition as a use case to investigate optimization techniques for Kepler.
4 1. LU-decomposition 2. Implementations 3. Performance gains 4. Conclusions Outline
5 1. LU-decomposition 2. Implementations 3. Performance gains 4. Conclusions LU-decomposition
6 LU-decomposition The idea is to transform A where Ax=b to an equivalent triangular system such that A=LU a a a a a a a a A L U a a a a a a a a l 21 1 = l31 l32 1 * l 41 l 42 l 43 1 u11 u12 u22 u13 u23 u33 u14 u24 u34 u44
7 Pivot element Eliminate values by subtracting pivot line A LU-decomposition Without Pivot /1 Multipliers /1 L
8 Pivot element Eliminate values by subtracting pivot line A LU-decomposition Without Pivot /12 Multipliers / L
9 LU-decomposition A Without Pivot L
10 Pivot element Eliminate values by subtracting pivot line A LU-decomposition Without Pivot Multiplier /1 3 L
11 Pivot element Eliminate values by subtracting pivot line A LU-decomposition Without Pivot Multiplier -2/12 The multiplier must be shared with all elements of a row Syncronization and sharing in inner loop. L
12 LU-decomposition A Without Pivot L
13 LU-decomposition A Without Pivot L
14 LU-decomposition U Without Pivot L
15 Pivot element A LU-decomposition Full Pivot
16 Pivot element A LU-decomposition / /1 Full Pivot Solution: Perform Pivot 1. Find largest value in bottom submatrix. 2. Swap rows and columns to make largest value the pivot element. 3. Keep track of row and column pivot in each step. 4. Then perform operations over rows as usual. LU-decomposition with full pivot is stable
17 Pivot element A LU-decomposition Full Pivot Find largest value /1 Synchronization and data-sharing 7 4-7/1 Solution: Perform Pivot 1. Find largest value in bottom submatrix. 2. Swap rows and columns to make largest value the pivot element. 3. Keep track of row and column pivot in each step. 4. Then perform operations over rows as usual. LU-decomposition with full pivot is stable Necessitates maxreduction in each column iteration.
18 Implementations Problem size: Matrices of at most 32 rows or columns of any shape, i.e. both rectangular and square. Batches of 1 matrices. Find L and U for matrix A such that PAQ=LU with full pivoting, where P and Q are the pivot vectors.
19 Implementations Mapping of problem: Map one matrix to a warp. Map a column to a thread. One or more matrices per block.
20 Implementations Mapping of problem: Map one matrix to a warp. Map a column to a thread. One or more matrices per block. Block Block 1 Warp Warp t.x t.x 1 t.x 2 t.x 3 One matrix per block t.x t.x 1 t.x 2 t.x
21 Implementations Mapping of problem: Map one matrix to a warp. Map a column to a thread. One or more matrices per block. Block Block Warp Warp 1 t.x t.x 1 t.x 2 t.x 3 Two matrix per block t.x 32 t.x 33 t.x 34 t.x
22 Implementations Mapping of problem: Map one matrix to a warp. Map a column to a thread. The number of matrices per One or more matrices per block. block affects the occupancy. Block Block Warp Warp 1 t.x t.x 1 t.x 2 t.x 3 Two matrix per block t.x 32 t.x 33 t.x 34 t.x
23 Implementations Aim To investigate various techniques for batched matrix computations. Multiple matrices per block: 1. 1 matrix per block matrices per block matrices per block. Occupancy Synchronization and data sharing: 1. Shared-mem with syncthreads(). 2. Shared-mem using warpsynchronous programming. 3. Warp shuffle. Synchronization and their interaction Cache-config: 1. Prefer shared. 2. Prefer L1. Cache configuration
24 Implementations Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
25 Performance gains All benchmarks were performed on a standard GTX 68. All numbers are based on execution time for a batch of 1 matrices for various sizes. Execution time is in ms. To save time, we will only be looking at performance numbers for square matrices.
26 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
27 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
28 1 matrix per block 2 matrices per block 4 matrices per block Performance gains 1. Syncthreads() 2. Warp-synchronous 3. Warp shuffle 5 Execution time, syncthreads() 5 Execution time, syncthreads() Matrix size Prefer shared Matrix size Prefer L1
29 1 matrix per block 2 matrices per block 4 matrices per block Performance gains 1. Syncthreads() 2. Warp-synchronous 3. Warp shuffle 5 Execution time, syncthreads() 5 Execution time, syncthreads() Matrix size Prefer shared Matrix size Prefer L1
30 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
31 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
32 1 matrix per block 2 matrices per block 4 matrices per block Performance gains 1. Execution time, warp-synchronous Matrix size Prefer shared Syncthreads() 2. Warp-synchronous 3. Warp shuffle Execution time, warp-synchronous Matrix size Prefer L1
33 1 matrix per block 2 matrices per block 4 matrices per block Performance gains 1. Execution time, warp-synchronous Matrix size Prefer shared Syncthreads() 2. Warp-synchronous 3. Warp shuffle Execution time, warp-synchronous Matrix size Prefer L1
34 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
35 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block No surprise: we use shared memory for all datasharing and reduction. More shared memory gives us higher occupancy Better performance. Synchronization Cache configuration
36 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
37 1 matrix per block 2 matrices per block 4 matrices per block Performance gains Execution time[ms], syncthreads() Matrix size syncthreads() Syncthreads() 2. Warp-synchronous 3. Warp shuffle Execution time[ms], warp-synchronous() Matrix size Warp-synchronous
38 Speed-up 1 matrix per block 2 matrices per block 4 matrices per block Performance gains syncthreads() 1. Syncthreads() 2. Warp-synchronous 3. Warp shuffle Execution time[ms], syncthreads() Warp-sync speed-up over Execution syncthreads() time[ms], warp-synchronous() 2, , Roughly 1 a speed-up of 1.7x,5 when using 5 warp-synchronous Matrix size Matrix size Matrix size Warp-synchronous
39 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
40 1 matrix per block 2 matrices per block 4 matrices per block 16 Performance gains 1. Execution time, warp shuffle 16 Syncthreads() 2. Warp-synchronous 3. Warp shuffle Execution time, warp shuffle Matrix size Prefer shared Matrix size Prefer L1
41 1 matrix per block 2 matrices per block 4 matrices per block 16 Performance gains 1. Execution time, warp shuffle 16 Syncthreads() 2. Warp-synchronous 3. Warp shuffle Execution time, warp shuffle Matrix size Prefer shared Matrix size Prefer L1
42 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
43 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
44 1 matrix per block 2 matrices per block 4 matrices per block 16 Execution time, warp-synchronous Performance gains Execution time, warp shuffle Syncthreads() 2. Warp-synchronous 3. Warp shuffle Matrix size Matrix size Prefer shared Prefer L1
45 Speed-up 1 matrix per block 2 matrices per block 4 matrices per block Prefer shared Performance gains 1. Execution time, warp-synchronous Warp shuffle speed-up over Execution warp-synch time, warp shuffle 2 16 Prefer L1 Syncthreads() 2. Warp-synchronous 3. Warp shuffle 1, ,5 Roughly a speed-up 4 of 1.2x when using warp shuffle over warp-sync Matrix size Matrix 32 size Matrix size
46 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
47 1 matrix per block 2 matrices per block 4 matrices per block Performance gains 1. Execution time, warp shuffle & Prefer L1 Syncthreads() 2. Warp-synchronous 3. Warp shuffle Matrix size
48 Speed-up 1 matrix per block 2 matrices per block 4 matrices per block Performance gains 1. Execution time, warp shuffle & Prefer L1 2 matrices per block is most consistent. We can gain 2x by mapping 2 or 4 matrices to each block. On average we gain 1.5x. 2,5 2 1,5 1 Speed-up vs 1 block per matrix Syncthreads() 2. Warp-synchronous 3. Warp shuffle, Matrix size Matrix size
49 Performance gains Occupancy 4 matrices per block 2 matrices per block 1 matrix per block Synchronization Cache configuration
50 Conclusions 1. Warp-synchronous is 1.7x faster than syncthreads(). 2. Warp shuffle is 1.2x faster than warp-synchronous matrices per block is 1.5x faster than 1 matrix per block. 4. Optimal cache config varies with implementation: Prefer shared if you use shared mem. Prefer L1 if you use warp shuffle.
51 Questions? Ian Wainwright High Performance Consulting Sweden
y 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 informationIntroduction to Parallel Programming in OpenMP Dr. Yogish Sabharwal Department of Computer Science & Engineering Indian Institute of Technology, Delhi
Introduction to Parallel Programming in OpenMP Dr. Yogish Sabharwal Department of Computer Science & Engineering Indian Institute of Technology, Delhi Lecture - 33 Parallel LU Factorization So, now, how
More informationReview. Example 1. Elementary matrices in action: (a) a b c. d e f = g h i. d e f = a b c. a b c. (b) d e f. d e f.
Review Example. Elementary matrices in action: (a) 0 0 0 0 a b c d e f = g h i d e f 0 0 g h i a b c (b) 0 0 0 0 a b c d e f = a b c d e f 0 0 7 g h i 7g 7h 7i (c) 0 0 0 0 a b c a b c d e f = d e f 0 g
More information30.3. LU Decomposition. Introduction. Prerequisites. Learning Outcomes
LU Decomposition 30.3 Introduction In this Section we consider another direct method for obtaining the solution of systems of equations in the form AX B. Prerequisites Before starting this Section you
More information1.5 Gaussian Elimination With Partial Pivoting.
Gaussian Elimination With Partial Pivoting In the previous section we discussed Gaussian elimination In that discussion we used equation to eliminate x from equations through n Then we used equation to
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 informationToday s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn
Today s class Linear Algebraic Equations LU Decomposition 1 Linear Algebraic Equations Gaussian Elimination works well for solving linear systems of the form: AX = B What if you have to solve the linear
More informationSolving Systems of Linear Equations
Motivation Solving Systems of Linear Equations The idea behind Googles pagerank An example from economics Gaussian elimination LU Decomposition Iterative Methods The Jacobi method Summary Motivation Systems
More informationSystems of Linear Equations
Systems of Linear Equations Last time, we found that solving equations such as Poisson s equation or Laplace s equation on a grid is equivalent to solving a system of linear equations. There are many other
More informationCS475: Linear Equations Gaussian Elimination LU Decomposition Wim Bohm Colorado State University
CS475: Linear Equations Gaussian Elimination LU Decomposition Wim Bohm Colorado State University Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution
More informationSolving Consistent Linear Systems
Solving Consistent Linear Systems Matrix Notation An augmented matrix of a system consists of the coefficient matrix with an added column containing the constants from the right sides of the equations.
More informationCS 323: Numerical Analysis and Computing
CS 323: Numerical Analysis and Computing MIDTERM #1 Instructions: This is an open notes exam, i.e., you are allowed to consult any textbook, your class notes, homeworks, or any of the handouts from us.
More informationReview of matrices. Let m, n IN. A rectangle of numbers written like A =
Review of matrices Let m, n IN. A rectangle of numbers written like a 11 a 12... a 1n a 21 a 22... a 2n A =...... a m1 a m2... a mn where each a ij IR is called a matrix with m rows and n columns or an
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 informationParallel Programming. Parallel algorithms Linear systems solvers
Parallel Programming Parallel algorithms Linear systems solvers Terminology System of linear equations Solve Ax = b for x Special matrices Upper triangular Lower triangular Diagonally dominant Symmetric
More informationMatrix Computations: Direct Methods II. May 5, 2014 Lecture 11
Matrix Computations: Direct Methods II May 5, 2014 ecture Summary You have seen an example of how a typical matrix operation (an important one) can be reduced to using lower level BS routines that would
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 informationLinear Equations in Linear Algebra
1 Linear Equations in Linear Algebra 1.1 SYSTEMS OF LINEAR EQUATIONS LINEAR EQUATION x 1,, x n A linear equation in the variables equation that can be written in the form a 1 x 1 + a 2 x 2 + + a n x n
More informationSolution of Linear Systems
Solution of Linear Systems Parallel and Distributed Computing Department of Computer Science and Engineering (DEI) Instituto Superior Técnico May 12, 2016 CPD (DEI / IST) Parallel and Distributed Computing
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 informationComputational Methods. Systems of Linear Equations
Computational Methods Systems of Linear Equations Manfred Huber 2010 1 Systems of Equations Often a system model contains multiple variables (parameters) and contains multiple equations Multiple equations
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 informationLinear Algebra Math 221
Linear Algebra Math Open Book Exam Open Notes 8 Oct, 004 Calculators Permitted Show all work (except #4). (0 pts) Let A = 3 a) (0 pts) Compute det(a) by Gaussian Elimination. 3 3 swap(i)&(ii) (iii) (iii)+(
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 informationNext topics: Solving systems of linear equations
Next topics: Solving systems of linear equations 1 Gaussian elimination (today) 2 Gaussian elimination with partial pivoting (Week 9) 3 The method of LU-decomposition (Week 10) 4 Iterative techniques:
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 informationSparse LU Factorization on GPUs for Accelerating SPICE Simulation
Nano-scale Integrated Circuit and System (NICS) Laboratory Sparse LU Factorization on GPUs for Accelerating SPICE Simulation Xiaoming Chen PhD Candidate Department of Electronic Engineering Tsinghua University,
More informationMATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year
1 MATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year 2013-14 OUTLINE OF WEEK 2 Linear Systems and solutions Systems of linear
More informationThe purpose of computing is insight, not numbers. Richard Wesley Hamming
Systems of Linear Equations The purpose of computing is insight, not numbers. Richard Wesley Hamming Fall 2010 1 Topics to Be Discussed This is a long unit and will include the following important topics:
More informationTMA4125 Matematikk 4N Spring 2017
Norwegian University of Science and Technology Institutt for matematiske fag TMA15 Matematikk N Spring 17 Solutions to exercise set 1 1 We begin by writing the system as the augmented matrix.139.38.3 6.
More informationAccelerating computation of eigenvectors in the nonsymmetric eigenvalue problem
Accelerating computation of eigenvectors in the nonsymmetric eigenvalue problem Mark Gates 1, Azzam Haidar 1, and Jack Dongarra 1,2,3 1 University of Tennessee, Knoxville, TN, USA 2 Oak Ridge National
More informationExample: Current in an Electrical Circuit. Solving Linear Systems:Direct Methods. Linear Systems of Equations. Solving Linear Systems: Direct Methods
Example: Current in an Electrical Circuit Solving Linear Systems:Direct Methods A number of engineering problems or models can be formulated in terms of systems of equations Examples: Electrical Circuit
More informationEE5120 Linear Algebra: Tutorial 1, July-Dec Solve the following sets of linear equations using Gaussian elimination (a)
EE5120 Linear Algebra: Tutorial 1, July-Dec 2017-18 1. Solve the following sets of linear equations using Gaussian elimination (a) 2x 1 2x 2 3x 3 = 2 3x 1 3x 2 2x 3 + 5x 4 = 7 x 1 x 2 2x 3 x 4 = 3 (b)
More informationLU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark
DM559 Linear and Integer Programming LU Factorization Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark [Based on slides by Lieven Vandenberghe, UCLA] Outline
More informationMatrix Factorization Reading: Lay 2.5
Matrix Factorization Reading: Lay 2.5 October, 20 You have seen that if we know the inverse A of a matrix A, we can easily solve the equation Ax = b. Solving a large number of equations Ax = b, Ax 2 =
More information1 Last time: linear systems and row operations
1 Last time: linear systems and row operations Here s what we did last time: a system of linear equations or linear system is a list of equations a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22
More informationExercise Sketch these lines and find their intersection.
These are brief notes for the lecture on Friday August 21, 2009: they are not complete, but they are a guide to what I want to say today. They are not guaranteed to be correct. 1. Solving systems of linear
More informationCS 598: Communication Cost Analysis of Algorithms Lecture 9: The Ideal Cache Model and the Discrete Fourier Transform
CS 598: Communication Cost Analysis of Algorithms Lecture 9: The Ideal Cache Model and the Discrete Fourier Transform Edgar Solomonik University of Illinois at Urbana-Champaign September 21, 2016 Fast
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 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 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 informationMatrices and Matrix Algebra.
Matrices and Matrix Algebra 3.1. Operations on Matrices Matrix Notation and Terminology Matrix: a rectangular array of numbers, called entries. A matrix with m rows and n columns m n A n n matrix : a square
More informationSolution Set 3, Fall '12
Solution Set 3, 86 Fall '2 Do Problem 5 from 32 [ 3 5 Solution (a) A = Only one elimination step is needed to produce the 2 6 echelon form The pivot is the in row, column, and the entry to eliminate is
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 informationThe Solution of Linear Systems AX = B
Chapter 2 The Solution of Linear Systems AX = B 21 Upper-triangular Linear Systems We will now develop the back-substitution algorithm, which is useful for solving a linear system of equations that has
More informationDylan Zwick. Fall Ax=b. EAx=Eb. UxrrrEb
Math 2270 - Lecture 0: LU Factorization Dylan Zwick Fall 202 This lecture covers section 2.6 of the textbook. The Matrices L and U In elimination what we do is we take a system of equations and convert
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 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 informationLU Factorization a 11 a 1 a 1n A = a 1 a a n (b) a n1 a n a nn L = l l 1 l ln1 ln 1 75 U = u 11 u 1 u 1n 0 u u n 0 u n...
.. Factorizations Reading: Trefethen and Bau (1997), Lecture 0 Solve the n n linear system by Gaussian elimination Ax = b (1) { Gaussian elimination is a direct method The solution is found after a nite
More informationI-v k e k. (I-e k h kt ) = Stability of Gauss-Huard Elimination for Solving Linear Systems. 1 x 1 x x x x
Technical Report CS-93-08 Department of Computer Systems Faculty of Mathematics and Computer Science University of Amsterdam Stability of Gauss-Huard Elimination for Solving Linear Systems T. J. Dekker
More informationAccelerating computation of eigenvectors in the dense nonsymmetric eigenvalue problem
Accelerating computation of eigenvectors in the dense nonsymmetric eigenvalue problem Mark Gates 1, Azzam Haidar 1, and Jack Dongarra 1,2,3 1 University of Tennessee, Knoxville, TN, USA 2 Oak Ridge National
More informationMatrix decompositions
Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers
More informationAck: 1. LD Garcia, MTH 199, Sam Houston State University 2. Linear Algebra and Its Applications - Gilbert Strang
Gaussian Elimination CS6015 : Linear Algebra Ack: 1. LD Garcia, MTH 199, Sam Houston State University 2. Linear Algebra and Its Applications - Gilbert Strang The Gaussian Elimination Method The Gaussian
More information6. Iterative Methods for Linear Systems. The stepwise approach to the solution...
6 Iterative Methods for Linear Systems The stepwise approach to the solution Miriam Mehl: 6 Iterative Methods for Linear Systems The stepwise approach to the solution, January 18, 2013 1 61 Large Sparse
More informationCommunication-avoiding LU and QR factorizations for multicore architectures
Communication-avoiding LU and QR factorizations for multicore architectures DONFACK Simplice INRIA Saclay Joint work with Laura Grigori INRIA Saclay Alok Kumar Gupta BCCS,Norway-5075 16th April 2010 Communication-avoiding
More informationEliminations and echelon forms in exact linear algebra
Eliminations and echelon forms in exact linear algebra Clément PERNET, INRIA-MOAIS, Grenoble Université, France East Coast Computer Algebra Day, University of Waterloo, ON, Canada, April 9, 2011 Clément
More informationLinear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math 365 Week #4
Linear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math Week # 1 Saturday, February 1, 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x
More informationLecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)
Math 59 Lecture 2 (Tue Mar 5) Gaussian elimination and LU factorization (II) 2 Gaussian elimination - LU factorization For a general n n matrix A the Gaussian elimination produces an LU factorization if
More informationNumerical 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 informationLinear Systems and LU
Linear Systems and LU CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Linear Systems and LU 1 / 48 Homework 1. Homework 0 due Monday CS 205A:
More informationExample: 2x y + 3z = 1 5y 6z = 0 x + 4z = 7. Definition: Elementary Row Operations. Example: Type I swap rows 1 and 3
Linear Algebra Row Reduced Echelon Form Techniques for solving systems of linear equations lie at the heart of linear algebra. In high school we learn to solve systems with or variables using elimination
More information5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns
5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns (1) possesses the solution and provided that.. The numerators and denominators are recognized
More informationMATRIX DETERMINANTS. 1 Reminder Definition and components of a matrix
MATRIX DETERMINANTS Summary Uses... 1 1 Reminder Definition and components of a matrix... 1 2 The matrix determinant... 2 3 Calculation of the determinant for a matrix... 2 4 Exercise... 3 5 Definition
More informationParallelization of Multilevel Preconditioners Constructed from Inverse-Based ILUs on Shared-Memory Multiprocessors
Parallelization of Multilevel Preconditioners Constructed from Inverse-Based ILUs on Shared-Memory Multiprocessors J.I. Aliaga 1 M. Bollhöfer 2 A.F. Martín 1 E.S. Quintana-Ortí 1 1 Deparment of Computer
More informationLecture 4: Linear Algebra 1
Lecture 4: Linear Algebra 1 Sourendu Gupta TIFR Graduate School Computational Physics 1 February 12, 2010 c : Sourendu Gupta (TIFR) Lecture 4: Linear Algebra 1 CP 1 1 / 26 Outline 1 Linear problems Motivation
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 informationComputational Linear Algebra
Computational Linear Algebra PD Dr. rer. nat. habil. Ralf Peter Mundani Computation in Engineering / BGU Scientific Computing in Computer Science / INF Winter Term 2017/18 Part 2: Direct Methods PD Dr.
More information6-3 Solving Systems by Elimination
Another method for solving systems of equations is elimination. Like substitution, the goal of elimination is to get one equation that has only one variable. To do this by elimination, you add the two
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 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 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 informationMatrix Basic Concepts
Matrix Basic Concepts Topics: What is a matrix? Matrix terminology Elements or entries Diagonal entries Address/location of entries Rows and columns Size of a matrix A column matrix; vectors Special types
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 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 informationEBG # 3 Using Gaussian Elimination (Echelon Form) Gaussian Elimination: 0s below the main diagonal
EBG # 3 Using Gaussian Elimination (Echelon Form) Gaussian Elimination: 0s below the main diagonal [ x y Augmented matrix: 1 1 17 4 2 48 (Replacement) Replace a row by the sum of itself and a multiple
More informationIntroduction to Mathematical Programming
Introduction to Mathematical Programming Ming Zhong Lecture 6 September 12, 2018 Ming Zhong (JHU) AMS Fall 2018 1 / 20 Table of Contents 1 Ming Zhong (JHU) AMS Fall 2018 2 / 20 Solving Linear Systems A
More informationOrigami: Folding Warps for Energy Efficient GPUs
Origami: Folding Warps for Energy Efficient GPUs Mohammad Abdel-Majeed*, Daniel Wong, Justin Huang and Murali Annavaram* * University of Southern alifornia University of alifornia, Riverside Stanford University
More informationMatrix decompositions
Matrix decompositions How can we solve Ax = b? 1 Linear algebra Typical linear system of equations : x 1 x +x = x 1 +x +9x = 0 x 1 +x x = The variables x 1, x, and x only appear as linear terms (no powers
More informationSystem of Linear Equations. Slide for MA1203 Business Mathematics II Week 1 & 2
System of Linear Equations Slide for MA1203 Business Mathematics II Week 1 & 2 Function A manufacturer would like to know how his company s profit is related to its production level. How does one quantity
More informationMatrices and Vectors
Matrices and Vectors James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 11, 2013 Outline 1 Matrices and Vectors 2 Vector Details 3 Matrix
More informationRelationships Between Planes
Relationships Between Planes Definition: consistent (system of equations) A system of equations is consistent if there exists one (or more than one) solution that satisfies the system. System 1: {, System
More informationMath 552 Scientific Computing II Spring SOLUTIONS: Homework Set 1
Math 552 Scientific Computing II Spring 21 SOLUTIONS: Homework Set 1 ( ) a b 1 Let A be the 2 2 matrix A = By hand, use Gaussian elimination with back c d substitution to obtain A 1 by solving the two
More informationLinear System of Equations
Linear System of Equations Linear systems are perhaps the most widely applied numerical procedures when real-world situation are to be simulated. Example: computing the forces in a TRUSS. F F 5. 77F F.
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 information4.3 Row operations. As we have seen in Section 4.1 we can simplify a system of equations by either:
4.3 Row operations As we have seen in Section 4.1 we can simplify a system of equations by either: 1. Swapping the order of the equations around. For example: can become 3x 1 + 7x 2 = 9 x 1 2x 1 = 2 x
More informationGaussian Elimination and Back Substitution
Jim Lambers MAT 610 Summer Session 2009-10 Lecture 4 Notes These notes correspond to Sections 31 and 32 in the text Gaussian Elimination and Back Substitution The basic idea behind methods for solving
More informationMODEL ANSWERS TO THE FIRST QUIZ. 1. (18pts) (i) Give the definition of a m n matrix. A m n matrix with entries in a field F is a function
MODEL ANSWERS TO THE FIRST QUIZ 1. (18pts) (i) Give the definition of a m n matrix. A m n matrix with entries in a field F is a function A: I J F, where I is the set of integers between 1 and m and J is
More informationShan Feng
Shan Feng fengs2@mcmaster.caca Shan Feng: 2pm~5pm, Monday, ITB A302; fengs2@univmail.cis.mcmaster.ca Yong Zhao: 1pm~4pm, Wednesday, ITB A103; zhaoy49@grads.ece.mcmaster.ca Heng Wang:2pm~5pm, Thursday,
More informationMTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~
MTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~ Question No: 1 (Marks: 1) If for a linear transformation the equation T(x) =0 has only the trivial solution then T is One-to-one Onto Question
More informationBinding Performance and Power of Dense Linear Algebra Operations
10th IEEE International Symposium on Parallel and Distributed Processing with Applications Binding Performance and Power of Dense Linear Algebra Operations Maria Barreda, Manuel F. Dolz, Rafael Mayo, Enrique
More informationSolving Linear Systems Using Gaussian Elimination
Solving Linear Systems Using Gaussian Elimination DEFINITION: A linear equation in the variables x 1,..., x n is an equation that can be written in the form a 1 x 1 +...+a n x n = b, where a 1,...,a n
More informationMath 471 (Numerical methods) Chapter 3 (second half). System of equations
Math 47 (Numerical methods) Chapter 3 (second half). System of equations Overlap 3.5 3.8 of Bradie 3.5 LU factorization w/o pivoting. Motivation: ( ) A I Gaussian Elimination (U L ) where U is upper triangular
More informationFundamentals Algorithms for Linear Equation Solution. Gaussian Elimination LU Factorization
Fundamentals Algorithms for Linear Equation Solution Gaussian Elimination LU Factorization J. Roychowdhury, University of alifornia at erkeley Slide Dense vs Sparse Matrices ircuit Jacobians: typically
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 information22.4. Numerical Determination of Eigenvalues and Eigenvectors. Introduction. Prerequisites. Learning Outcomes
Numerical Determination of Eigenvalues and Eigenvectors 22.4 Introduction In Section 22. it was shown how to obtain eigenvalues and eigenvectors for low order matrices, 2 2 and. This involved firstly solving
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 informationSolution of Linear systems
Solution of Linear systems Direct Methods Indirect Methods -Elimination Methods -Inverse of a matrix -Cramer s Rule -LU Decomposition Iterative Methods 2 A x = y Works better for coefficient matrices with
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 informationRevised Simplex Method
DM545 Linear and Integer Programming Lecture 7 Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline 1. 2. 2 Motivation Complexity of single pivot operation
More informationLecture 12. Linear systems of equations II. a 13. a 12. a 14. a a 22. a 23. a 34 a 41. a 32. a 33. a 42. a 43. a 44)
1 Introduction Lecture 12 Linear systems of equations II We have looked at Gauss-Jordan elimination and Gaussian elimination as ways to solve a linear system Ax=b. We now turn to the LU decomposition,
More information