Addition/Subtraction flops. ... k k + 1, n (n k)(n k) (n k)(n + 1 k) n 1 n, n (1)(1) (1)(2)

Size: px
Start display at page:

Download "Addition/Subtraction flops. ... k k + 1, n (n k)(n k) (n k)(n + 1 k) n 1 n, n (1)(1) (1)(2)"

Transcription

1 1 CHAPTER The flop counts for LU decomposition can be determined in a similar fashion as was done for Gauss elimination The major difference is that the elimination is only implemented for the left-hand side coefficients Thus, for every iteration of the inner loop, there are n multiplications/divisions and n 1 addition/subtractions The computations can be summarized as Outer Loop k Inner Loop i Addition/Subtraction flops Multiplication/Division flops 1, n (n 1)(n 1) (n 1)n, n (n )(n ) (n )(n 1) k k + 1, n (n k)(n k) (n k)(n + 1 k) n 1 n, n (1)(1) (1)() Therefore, the total addition/subtraction flops for elimination can be computed as n1 n1 ( nk)( nk) n nk k k1 k1 Applying some of the relationships from Eq (814) yields n1 k 1 n n n n nk k 6 A similar analysis for the multiplication/division flops yields n1 k 1 n n ( nk)( n1 k) 1 n n O( n ) n O( n) n O( n ) O( n ) Summing these results gives n n n 6 For forward substitution, the numbers of multiplications and subtractions are the same and equal to n1 ( n1) n n n i i1 Back substitution is the same as for Gauss elimination: n / n/ subtractions and n / + n/ multiplications/divisions The entire number of flops can be summarized as PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

2 Forward elimination Forward substitution Back substitution Total Mult/Div Add/Subtr Total n n n n n n n n 6 6 n n n n n n n n n n n n n n n 5n n n 7 n n 6 6 The total number of flops is identical to that obtained with standard Gauss elimination 10 Equation (106) is [ L][ U]{} x {} d [ A]{} x {} b (106) Matrix multiplication is distributive, so the left-hand side can be rewritten as [ L][ U]{} x [ L]{} d [ A]{} x {} b Equating the terms that are multiplied by {x} yields, [ L][ U]{} x [ A]{} x and, therefore, Eq (107) follows [ L][ U] [ A] (107) Equating the constant terms yields Eq (108) [ L]{ d} { b} (108) 10 (a) The coefficient a 1 is eliminated by multiplying row 1 by f 1 = /7 and subtracting the result from row a 1 is eliminated by multiplying row 1 by f 1 = 1/7 and subtracting the result from row The factors f 1 and f 1 can be stored in a 1 and a a is eliminated by multiplying row by f = 18571/ = 090 and subtracting the result from row The factor f can be stored in a Therefore, the LU decomposition is PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

3 [ L] [ U ] These two matrices can be multiplied to yield the original system For example, using MATLAB to perform the multiplication gives >> L=[1 0 0; ; ]; >> U=[7 -; ; ]; >> L*U (a) Forward substitution: [L]{D} = {B} d d d 6 Solving yields d 1 = 1, d = , and d = Back substitution: 7 x x x x ( 1486)( ) x ( ) (146875) x (b) Forward substitution: [L]{D} = {B} d d d 6 Solving yields d 1 = 1, d = , and d = 4887 Back substitution: 7 x x x 4887 x PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

4 ( 1486)(0565) x ( )(0565) (565) x The system can be written in matrix form as [ A] 1 6 { b} 4 [ P] Partial pivot: [ A] 1 7 [ P] Compute factors: f 1 = /(8) = 075 f 1 = /(8) = 05 Forward eliminate and store factors in zeros: 8 1 [ LU ] Pivot again [ LU ] [ P] Compute factors: f = 175/(575) = 091 Forward eliminate and store factor in zero: 8 1 [ LU ] Therefore, the LU decomposition is PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

5 [ L]{ U] Forward substitution First multiply right-hand side vector {b} by [P] to give [ P]{ b} Therefore, { d} d1 40 d 8 ( 05)( 40) 48 d 4 075( 40) 091( 48) Back substitution: 8 1 x x x x ( 15)( 10581) x (8685) ( )( 10581) x Here is an M-file to generate the LU decomposition without pivoting function [L, U] = LUNaive(A) % LUNaive(A): % LU decomposition without pivoting % input: % A = coefficient matrix % output: % L = lower triangular matrix % upper triangular matrix [m,n] = size(a); if m~=n, error('matrix A must be square'); end L = eye(n); A; % forward elimination for k = 1:n-1 PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

6 6 for i = k+1:n L(i,k) = U(i,k)/U(k,k); U(i,k) = 0; U(i,k+1:n) = U(i,k+1:n)-L(i,k)*U(k,k+1:n); end end Test with Prob 10 >> A = [10-1;- -6 ;1 1 5]; >> [L,U] = LUnaive(A) L = Verification that [L][U] = [A] >> L*U Check using the lu function, >> [L,U]=lu(A) L = The result of Example 105 can be substituted into Eq (1014) to give T [ A] [ U] [ U] The multiplication can be implemented as in a a a a a a a PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

7 7 a a (a) For the first row (i = 1), Eq (1015) is employed to compute u11 a Then, Eq (1016) can be used to determine u a u u a u For the second row (i = ), u a u u 1 80 ( ) a u u ( ) 1 1 u For the third row (i = ), u a u u 1 60 ( ) (18574) Thus, the Cholesky decomposition yields [ U ] The validity of this decomposition can be verified by substituting it and its transpose into Eq (1014) to see if their product yields the original matrix [A] >> [ ; ; ]; >> U *U (b) >> A = [8 0 16; ; ]; >> chol(a) (c) The solution can be obtained by hand or by MATLAB Using MATLAB: PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

8 8 >> b = [100;50;100]; >> d=u'\b d = >> x=u\d x = Here is an M-file to generate the Cholesky decomposition without pivoting function cholesky(a) % cholesky(a): % cholesky decomposition without pivoting % input: % A = coefficient matrix % output: % upper triangular matrix [m,n] = size(a); if m~=n, error('matrix A must be square'); end for i = 1:n s = 0; for k = 1:i-1 s = s + U(k, i) ^ ; end U(i, i) = sqrt(a(i, i) - s); for j = i + 1:n s = 0; for k = 1:i-1 s = s + U(k, i) * U(k, j); end U(i, j) = (A(i, j) - s) / U(i, i); end end Test with Prob 108 >> A = [8 0 16; ; ]; >> cholesky(a) Check with the chol function >> chol(a) The system can be written in matrix form as PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

9 [ A] 6 4 { b} 44 [ P] Partial pivot: [ A] 6 4 [ P] Compute factors: f 1 = /(8) = 05 f 1 = /(8) = 075 Forward eliminate and store factors in zeros: 8 5 [ LU ] Pivot again [ LU ] [ ] P Compute factors: f = 55/(75) = Forward eliminate and store factor in zero: 8 5 [ LU ] Therefore, the LU decomposition is [ L]{ U] Forward substitution First multiply right-hand side vector {b} by [P] to give [ P]{ b} PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

10 10 Therefore, { d} d1 6 d 10 ( 075)( 6) 1975 d 44 ( 05)( 6) ( )( 1975) Back substitution: 8 5 x x x x ( ) x ( ) ( ) x (a) Multiply first row by f 1 = /8 = 075 and subtract the result from the second row to give Multiply first row by f 1 = /8 = 05 and subtract the result from the third row to give Multiply second row by f = 175/515 = and subtract the result from the third row to give [ U ] As indicated, this is the U matrix The L matrix is simply constructed from the f s as PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

11 [ L] Merely multiply [L][U] to yield the original matrix (b) The determinant is equal to the product of the diagonal elements of [U]: D (c) Solution with MATLAB: >> A=[8 5 1; 7 4; 9]; >> [L,U]=lu(A) L = >> L*U >> det(a) (a) The determinant is equal to the product of the diagonal elements of [U]: D (b) Forward substitution: >> L=[1 0 0; ; ]; >> U=[ - 1; ; ]; >> b=[ ]'; >> d=l\b d = Back substitution: >> x=u\d x = PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

12 Using MATLAB: >> A=[ -1 0;-1-1;0-1 ]; >> U=chol(A) The result can be validated by >> U'*U Using MATLAB: >> A=[9 0 0;0 5 0;0 0 16]; >> U=chol(A) Thus, the factorization of this diagonal matrix consists of another diagonal matrix where the elements are the square root of the original This is consistent with Eqs (1015) and (1016), which for a diagonal matrix reduce to u ii a ii u 0 for i j ij PROPRIETARY MATERIAL The McGraw-Hill Companies, Inc All rights reserved No part of this Manual individual course preparation If you are a student using this Manual, you are using it without permission

0_PreCNotes17 18.notebook May 16, Chapter 12

0_PreCNotes17 18.notebook May 16, Chapter 12 Chapter 12 Notes BASIC MATRIX OPERATIONS Matrix (plural: Matrices) an n x m array of elements element a ij Example 1 a 21 = a 13 = Multiply Matrix by a Scalar Distribute scalar to all elements Addition

More information

A Study of Numerical Methods for Simultaneous Equations

A Study of Numerical Methods for Simultaneous Equations A Study of Numerical Methods for Simultaneous Equations Er. Chandan Krishna Mukherjee B.Sc.Engg., ME, MBA Asstt. Prof. ( Mechanical ), SSBT s College of Engg. & Tech., Jalgaon, Maharashtra Abstract: -

More information

Parallel Implementations of Gaussian Elimination

Parallel Implementations of Gaussian Elimination s of Western Michigan University vasilije.perovic@wmich.edu January 27, 2012 CS 6260: in Parallel Linear systems of equations General form of a linear system of equations is given by a 11 x 1 + + a 1n

More information

Matrix Inverse 2 ( 2) 1 = 2 1 2

Matrix Inverse 2 ( 2) 1 = 2 1 2 Name: Matrix Inverse For Scalars, we have what is called a multiplicative identity. This means that if we have a scalar number, call it r, then r multiplied by the multiplicative identity equals r. Without

More information

Assignment 2. with (a) (10 pts) naive Gauss elimination, (b) (10 pts) Gauss with partial pivoting

Assignment 2. with (a) (10 pts) naive Gauss elimination, (b) (10 pts) Gauss with partial pivoting Assignment (Be sure to observe the rules about handing in homework). Solve: with (a) ( pts) naive Gauss elimination, (b) ( pts) Gauss with partial pivoting *You need to show all of the steps manually.

More information

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Computational Methods CMSC/AMSC/MAPL 460 Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Zero elements of first column below 1 st row multiplying 1 st

More information

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Computational Methods CMSC/AMSC/MAPL 460 Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Some special matrices Matlab code How many operations and memory

More information

Chemical Engineering 541

Chemical Engineering 541 Chemical Engineering 541 Computer Aided Design Methods Direct Solution of Linear Systems 1 Outline 2 Gauss Elimination Pivoting Scaling Cost LU Decomposition Thomas Algorithm (Iterative Improvement) Overview

More information

10/26/ Solving Systems of Linear Equations Using Matrices. Objectives. Matrices

10/26/ Solving Systems of Linear Equations Using Matrices. Objectives. Matrices 6.1 Solving Systems of Linear Equations Using Matrices Objectives Write the augmented matrix for a linear system. Perform matrix row operations. Use matrices and Gaussian elimination to solve systems.

More information

Introduction to MATLAB 7 for Engineers

Introduction to MATLAB 7 for Engineers PowerPoint to accompany Introduction to MATLAB 7 for Engineers William J. Palm III Chapter 2 Numeric, Cell, and Structure Arrays Copyright 2005. The McGraw-Hill Companies, Inc. Permission required for

More information

CE 601: Numerical Methods Lecture 5. Course Coordinator: Dr. Suresh A. Kartha, Associate Professor, Department of Civil Engineering, IIT Guwahati.

CE 601: Numerical Methods Lecture 5. Course Coordinator: Dr. Suresh A. Kartha, Associate Professor, Department of Civil Engineering, IIT Guwahati. CE 601: Numerical Methods Lecture 5 Course Coordinator: Dr. Suresh A. Kartha, Associate Professor, Department of Civil Engineering, IIT Guwahati. Elimination Methods For a system [A]{x} = {b} where [A]

More information

Dense Matrix Algorithms

Dense Matrix Algorithms Dense Matrix Algorithms Ananth Grama, Anshul Gupta, George Karypis, and Vipin Kumar To accompany the text Introduction to Parallel Computing, Addison Wesley, 2003. Topic Overview Matrix-Vector Multiplication

More information

Vector: A series of scalars contained in a column or row. Dimensions: How many rows and columns a vector or matrix has.

Vector: A series of scalars contained in a column or row. Dimensions: How many rows and columns a vector or matrix has. ASSIGNMENT 0 Introduction to Linear Algebra (Basics of vectors and matrices) Due 3:30 PM, Tuesday, October 10 th. Assignments should be submitted via e-mail to: matlabfun.ucsd@gmail.com You can also submit

More information

EXTENSION. a 1 b 1 c 1 d 1. Rows l a 2 b 2 c 2 d 2. a 3 x b 3 y c 3 z d 3. This system can be written in an abbreviated form as

EXTENSION. a 1 b 1 c 1 d 1. Rows l a 2 b 2 c 2 d 2. a 3 x b 3 y c 3 z d 3. This system can be written in an abbreviated form as EXTENSION Using Matrix Row Operations to Solve Systems The elimination method used to solve systems introduced in the previous section can be streamlined into a systematic method by using matrices (singular:

More information

LAB 2 VECTORS AND MATRICES

LAB 2 VECTORS AND MATRICES EN001-4: Intro to Computational Design Tufts University, Department of Computer Science Prof. Soha Hassoun LAB 2 VECTORS AND MATRICES 1.1 Background Overview of data types Programming languages distinguish

More information

LARP / 2018 ACK : 1. Linear Algebra and Its Applications - Gilbert Strang 2. Autar Kaw, Transforming Numerical Methods Education for STEM Graduates

LARP / 2018 ACK : 1. Linear Algebra and Its Applications - Gilbert Strang 2. Autar Kaw, Transforming Numerical Methods Education for STEM Graduates Triangular Factors and Row Exchanges LARP / 28 ACK :. Linear Algebra and Its Applications - Gilbert Strang 2. Autar Kaw, Transforming Numerical Methods Education for STEM Graduates Then there were three

More information

Numerical Linear Algebra

Numerical Linear Algebra Numerical Linear Algebra Probably the simplest kind of problem. Occurs in many contexts, often as part of larger problem. Symbolic manipulation packages can do linear algebra "analytically" (e.g. Mathematica,

More information

Parallelizing LU Factorization

Parallelizing LU Factorization Parallelizing LU Factorization Scott Ricketts December 3, 2006 Abstract Systems of linear equations can be represented by matrix equations of the form A x = b LU Factorization is a method for solving systems

More information

TUTORIAL 1 Introduction to Matrix Calculation using MATLAB TUTORIAL 1 INTRODUCTION TO MATRIX CALCULATION USING MATLAB

TUTORIAL 1 Introduction to Matrix Calculation using MATLAB TUTORIAL 1 INTRODUCTION TO MATRIX CALCULATION USING MATLAB INTRODUCTION TO MATRIX CALCULATION USING MATLAB Learning objectives Getting started with MATLAB and it s user interface Learn some of MATLAB s commands and syntaxes Get a simple introduction to use of

More information

Section 3.1 Gaussian Elimination Method (GEM) Key terms

Section 3.1 Gaussian Elimination Method (GEM) Key terms Section 3.1 Gaussian Elimination Method (GEM) Key terms Rectangular systems Consistent system & Inconsistent systems Rank Types of solution sets RREF Upper triangular form & back substitution Nonsingular

More information

Numerical Methods 5633

Numerical Methods 5633 Numerical Methods 5633 Lecture 7 Marina Krstic Marinkovic mmarina@maths.tcd.ie School of Mathematics Trinity College Dublin Marina Krstic Marinkovic 1 / 10 5633-Numerical Methods Organisational To appear

More information

(Sparse) Linear Solvers

(Sparse) Linear Solvers (Sparse) Linear Solvers Ax = B Why? Many geometry processing applications boil down to: solve one or more linear systems Parameterization Editing Reconstruction Fairing Morphing 2 Don t you just invert

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 5: Sparse Linear Systems and Factorization Methods Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical Analysis I 1 / 18 Sparse

More information

Iterative Algorithms I: Elementary Iterative Methods and the Conjugate Gradient Algorithms

Iterative Algorithms I: Elementary Iterative Methods and the Conjugate Gradient Algorithms Iterative Algorithms I: Elementary Iterative Methods and the Conjugate Gradient Algorithms By:- Nitin Kamra Indian Institute of Technology, Delhi Advisor:- Prof. Ulrich Reude 1. Introduction to Linear

More information

3. Replace any row by the sum of that row and a constant multiple of any other row.

3. Replace any row by the sum of that row and a constant multiple of any other row. Math Section. Section.: Solving Systems of Linear Equations Using Matrices As you may recall from College Algebra or Section., you can solve a system of linear equations in two variables easily by applying

More information

COMPUTER OPTIMIZATION

COMPUTER OPTIMIZATION COMPUTER OPTIMIZATION Storage Optimization: Since Normal Matrix is a symmetric matrix, store only half of it in a vector matrix and develop a indexing scheme to map the upper or lower half to the vector.

More information

Matrices 4: use of MATLAB

Matrices 4: use of MATLAB Matrices 4: use of MATLAB Anthony Rossiter http://controleducation.group.shef.ac.uk/indexwebbook.html http://www.shef.ac.uk/acse Department of Automatic Control and Systems Engineering Introduction The

More information

A Poorly Conditioned System. Matrix Form

A Poorly Conditioned System. Matrix Form Possibilities for Linear Systems of Equations A Poorly Conditioned System A Poorly Conditioned System Results No solution (inconsistent) Unique solution (consistent) Infinite number of solutions (consistent)

More information

Computational Methods CMSC/AMSC/MAPL 460. Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science

Computational Methods CMSC/AMSC/MAPL 460. Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Computational Methods CMSC/AMSC/MAPL 460 Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Matrix norms Can be defined using corresponding vector norms Two norm One norm Infinity

More information

Introduction to MATLAB for Engineers, Third Edition

Introduction to MATLAB for Engineers, Third Edition PowerPoint to accompany Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 2 Numeric, Cell, and Structure Arrays Copyright 2010. The McGraw-Hill Companies, Inc. This work is

More information

(Sparse) Linear Solvers

(Sparse) Linear Solvers (Sparse) Linear Solvers Ax = B Why? Many geometry processing applications boil down to: solve one or more linear systems Parameterization Editing Reconstruction Fairing Morphing 1 Don t you just invert

More information

Identity Matrix: >> eye(3) ans = Matrix of Ones: >> ones(2,3) ans =

Identity Matrix: >> eye(3) ans = Matrix of Ones: >> ones(2,3) ans = Very Basic MATLAB Peter J. Olver January, 2009 Matrices: Type your matrix as follows: Use space or, to separate entries, and ; or return after each row. >> [;5 0-3 6;; - 5 ] or >> [,5,6,-9;5,0,-3,6;7,8,5,0;-,,5,]

More information

Chapter LU Decomposition More Examples Electrical Engineering

Chapter LU Decomposition More Examples Electrical Engineering Chapter 4.7 LU Decomposition More Examples Electrical Engineering Example Three-phase loads e common in AC systems. When the system is balanced the analysis can be simplified to a single equivalent rcuit

More information

(Creating Arrays & Matrices) Applied Linear Algebra in Geoscience Using MATLAB

(Creating Arrays & Matrices) Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB (Creating Arrays & Matrices) Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional

More information

x = 12 x = 12 1x = 16

x = 12 x = 12 1x = 16 2.2 - The Inverse of a Matrix We've seen how to add matrices, multiply them by scalars, subtract them, and multiply one matrix by another. The question naturally arises: Can we divide one matrix by another?

More information

Introduction to Parallel. Programming

Introduction to Parallel. Programming University of Nizhni Novgorod Faculty of Computational Mathematics & Cybernetics Introduction to Parallel Section 9. Programming Parallel Methods for Solving Linear Systems Gergel V.P., Professor, D.Sc.,

More information

Parallelizing The Matrix Multiplication. 6/10/2013 LONI Parallel Programming Workshop

Parallelizing The Matrix Multiplication. 6/10/2013 LONI Parallel Programming Workshop Parallelizing The Matrix Multiplication 6/10/2013 LONI Parallel Programming Workshop 2013 1 Serial version 6/10/2013 LONI Parallel Programming Workshop 2013 2 X = A md x B dn = C mn d c i,j = a i,k b k,j

More information

MATLAB for Experimental Research. Fall 2018 Vectors, Matrices, Matrix Operations

MATLAB for Experimental Research. Fall 2018 Vectors, Matrices, Matrix Operations MATLAB for Experimental Research Fall 2018 Vectors, Matrices, Matrix Operations Matlab is more than a calculator! The array is a fundamental form that MATLAB uses to store and manipulate data. An array

More information

Using the fprintf command to save output to a file.

Using the fprintf command to save output to a file. Using the fprintf command to save output to a file. In addition to displaying output in the Command Window, the fprintf command can be used for writing the output to a file when it is necessary to save

More information

Autar Kaw Benjamin Rigsby. Transforming Numerical Methods Education for STEM Undergraduates

Autar Kaw Benjamin Rigsby.   Transforming Numerical Methods Education for STEM Undergraduates Autar Kaw Benjamin Rigsy http://nmmathforcollegecom Transforming Numerical Methods Education for STEM Undergraduates http://nmmathforcollegecom LU Decomposition is another method to solve a set of simultaneous

More information

Introduction to MATLAB

Introduction to MATLAB CHEE MATLAB Tutorial Introduction to MATLAB Introduction In this tutorial, you will learn how to enter matrices and perform some matrix operations using MATLAB. MATLAB is an interactive program for numerical

More information

Numerical Algorithms

Numerical Algorithms Chapter 10 Slide 464 Numerical Algorithms Slide 465 Numerical Algorithms In textbook do: Matrix multiplication Solving a system of linear equations Slide 466 Matrices A Review An n m matrix Column a 0,0

More information

MATLAB Lecture 1. Introduction to MATLAB

MATLAB Lecture 1. Introduction to MATLAB MATLAB Lecture 1. Introduction to MATLAB 1.1 The MATLAB environment MATLAB is a software program that allows you to compute interactively with matrices. If you want to know for instance the product of

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Andreas C. Kapourani (Credit: Steve Renals & Iain Murray) 9 January 08 Introduction MATLAB is a programming language that grew out of the need to process matrices. It is used extensively

More information

For example, the system. 22 may be represented by the augmented matrix

For example, the system. 22 may be represented by the augmented matrix Matrix Solutions to Linear Systems A matrix is a rectangular array of elements. o An array is a systematic arrangement of numbers or symbols in rows and columns. Matrices (the plural of matrix) may be

More information

ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION /4:30-6:00

ECE 204 Numerical Methods for Computer Engineers MIDTERM EXAMINATION /4:30-6:00 ECE 4 Numerical Methods for Computer Engineers ECE 4 Numerical Methods for Computer Engineers MIDTERM EXAMINATION --7/4:-6: The eamination is out of marks. Instructions: No aides. Write your name and student

More information

Lecture 5: Matrices. Dheeraj Kumar Singh 07CS1004 Teacher: Prof. Niloy Ganguly Department of Computer Science and Engineering IIT Kharagpur

Lecture 5: Matrices. Dheeraj Kumar Singh 07CS1004 Teacher: Prof. Niloy Ganguly Department of Computer Science and Engineering IIT Kharagpur Lecture 5: Matrices Dheeraj Kumar Singh 07CS1004 Teacher: Prof. Niloy Ganguly Department of Computer Science and Engineering IIT Kharagpur 29 th July, 2008 Types of Matrices Matrix Addition and Multiplication

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 20: Sparse Linear Systems; Direct Methods vs. Iterative Methods Xiangmin Jiao SUNY Stony Brook Xiangmin Jiao Numerical Analysis I 1 / 26

More information

2.7 Numerical Linear Algebra Software

2.7 Numerical Linear Algebra Software 2.7 Numerical Linear Algebra Software In this section we will discuss three software packages for linear algebra operations: (i) (ii) (iii) Matlab, Basic Linear Algebra Subroutines (BLAS) and LAPACK. There

More information

A Study of the Perfect Cuboid Problem

A Study of the Perfect Cuboid Problem A Study of the Perfect Cuboid Problem Larry Wagner Abstract We develop a procedure to generate face-cuboids. A face-cuboid is a cuboid with only one noninteger face diagonal. We show that it impossible

More information

MATH 5520 Basics of MATLAB

MATH 5520 Basics of MATLAB MATH 5520 Basics of MATLAB Dmitriy Leykekhman Spring 2011 Topics Sources. Entering Matrices. Basic Operations with Matrices. Build in Matrices. Build in Scalar and Matrix Functions. if, while, for m-files

More information

MATH 3511 Basics of MATLAB

MATH 3511 Basics of MATLAB MATH 3511 Basics of MATLAB Dmitriy Leykekhman Spring 2012 Topics Sources. Entering Matrices. Basic Operations with Matrices. Build in Matrices. Build in Scalar and Matrix Functions. if, while, for m-files

More information

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment

What is MATLAB? What is MATLAB? Programming Environment MATLAB PROGRAMMING. Stands for MATrix LABoratory. A programming environment What is MATLAB? MATLAB PROGRAMMING Stands for MATrix LABoratory A software built around vectors and matrices A great tool for numerical computation of mathematical problems, such as Calculus Has powerful

More information

Linear Equation Systems Iterative Methods

Linear Equation Systems Iterative Methods Linear Equation Systems Iterative Methods Content Iterative Methods Jacobi Iterative Method Gauss Seidel Iterative Method Iterative Methods Iterative methods are those that produce a sequence of successive

More information

MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix.

MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix. MATH 423 Linear Algebra II Lecture 17: Reduced row echelon form (continued). Determinant of a matrix. Row echelon form A matrix is said to be in the row echelon form if the leading entries shift to the

More information

The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs

The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs The Matrix-Tree Theorem and Its Applications to Complete and Complete Bipartite Graphs Frankie Smith Nebraska Wesleyan University fsmith@nebrwesleyan.edu May 11, 2015 Abstract We will look at how to represent

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Introduction MATLAB is an interactive package for numerical analysis, matrix computation, control system design, and linear system analysis and design available on most CAEN platforms

More information

COMPUTER SCIENCE 314 Numerical Methods SPRING 2013 ASSIGNMENT # 2 (25 points) January 22

COMPUTER SCIENCE 314 Numerical Methods SPRING 2013 ASSIGNMENT # 2 (25 points) January 22 COMPUTER SCIENCE 314 Numerical Methods SPRING 2013 ASSIGNMENT # 2 (25 points) January 22 Announcements Office hours: Instructor Teaching Assistant Monday 4:00 5:00 Tuesday 2:30 3:00 4:00 5:00 Wednesday

More information

Chapter Introduction

Chapter Introduction Chapter 4.1 Introduction After reading this chapter, you should be able to 1. define what a matrix is. 2. identify special types of matrices, and 3. identify when two matrices are equal. What does a matrix

More information

MAT 343 Laboratory 2 Solving systems in MATLAB and simple programming

MAT 343 Laboratory 2 Solving systems in MATLAB and simple programming MAT 343 Laboratory 2 Solving systems in MATLAB and simple programming In this laboratory session we will learn how to 1. Solve linear systems with MATLAB 2. Create M-files with simple MATLAB codes Backslash

More information

5. Direct Methods for Solving Systems of Linear Equations. They are all over the place... and may have special needs

5. Direct Methods for Solving Systems of Linear Equations. They are all over the place... and may have special needs 5. Direct Methods for Solving Systems of Linear Equations They are all over the place... and may have special needs They are all over the place... and may have special needs, December 13, 2012 1 5.3. Cholesky

More information

Lecture 12 (Last): Parallel Algorithms for Solving a System of Linear Equations. Reference: Introduction to Parallel Computing Chapter 8.

Lecture 12 (Last): Parallel Algorithms for Solving a System of Linear Equations. Reference: Introduction to Parallel Computing Chapter 8. CZ4102 High Performance Computing Lecture 12 (Last): Parallel Algorithms for Solving a System of Linear Equations - Dr Tay Seng Chuan Reference: Introduction to Parallel Computing Chapter 8. 1 Topic Overview

More information

CS6015 / LARP ACK : Linear Algebra and Its Applications - Gilbert Strang

CS6015 / LARP ACK : Linear Algebra and Its Applications - Gilbert Strang Solving and CS6015 / LARP 2018 ACK : Linear Algebra and Its Applications - Gilbert Strang Introduction Chapter 1 concentrated on square invertible matrices. There was one solution to Ax = b and it was

More information

Curriculum Map: Mathematics

Curriculum Map: Mathematics Curriculum Map: Mathematics Course: Honors Advanced Precalculus and Trigonometry Grade(s): 11-12 Unit 1: Functions and Their Graphs This chapter will develop a more complete, thorough understanding of

More information

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini DM545 Linear and Integer Programming Lecture 2 The Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline 1. 2. 3. 4. Standard Form Basic Feasible Solutions

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #16 Loops: Matrix Using Nested for Loop

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #16 Loops: Matrix Using Nested for Loop Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #16 Loops: Matrix Using Nested for Loop In this section, we will use the, for loop to code of the matrix problem.

More information

Solving Systems Using Row Operations 1 Name

Solving Systems Using Row Operations 1 Name The three usual methods of solving a system of equations are graphing, elimination, and substitution. While these methods are excellent, they can be difficult to use when dealing with three or more variables.

More information

Matrices and Systems of Equations

Matrices and Systems of Equations 1 CA-Fall 2011-Jordan College Algebra, 4 th edition, Beecher/Penna/Bittinger, Pearson/Addison Wesley, 2012 Chapter 6: Systems of Equations and Matrices Section 6.3 Matrices and Systems of Equations Matrices

More information

Matrix Multiplication

Matrix Multiplication Matrix Multiplication CPS343 Parallel and High Performance Computing Spring 2013 CPS343 (Parallel and HPC) Matrix Multiplication Spring 2013 1 / 32 Outline 1 Matrix operations Importance Dense and sparse

More information

Maths for Signals and Systems Linear Algebra in Engineering. Some problems by Gilbert Strang

Maths for Signals and Systems Linear Algebra in Engineering. Some problems by Gilbert Strang Maths for Signals and Systems Linear Algebra in Engineering Some problems by Gilbert Strang Problems. Consider u, v, w to be non-zero vectors in R 7. These vectors span a vector space. What are the possible

More information

Modern GPUs (Graphics Processing Units)

Modern GPUs (Graphics Processing Units) Modern GPUs (Graphics Processing Units) Powerful data parallel computation platform. High computation density, high memory bandwidth. Relatively low cost. NVIDIA GTX 580 512 cores 1.6 Tera FLOPs 1.5 GB

More information

Lecture 2: Variables, Vectors and Matrices in MATLAB

Lecture 2: Variables, Vectors and Matrices in MATLAB Lecture 2: Variables, Vectors and Matrices in MATLAB Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE201: Computer Applications. See Textbook Chapter 1 and Chapter 2. Variables

More information

Sequential and Parallel Algorithms for Cholesky Factorization of Sparse Matrices

Sequential and Parallel Algorithms for Cholesky Factorization of Sparse Matrices Sequential and Parallel Algorithms for Cholesky Factorization of Sparse Matrices Nerma Baščelija Sarajevo School of Science and Technology Department of Computer Science Hrasnicka Cesta 3a, 71000 Sarajevo

More information

Pipelined Computations

Pipelined Computations Pipelined Computations In the pipeline technique, the problem is divided into a series of tasks that have to be completed one after the other. In fact, this is the basis of sequential programming. Each

More information

Matrix Multiplication

Matrix Multiplication Matrix Multiplication CPS343 Parallel and High Performance Computing Spring 2018 CPS343 (Parallel and HPC) Matrix Multiplication Spring 2018 1 / 32 Outline 1 Matrix operations Importance Dense and sparse

More information

Introduction to MATLAB

Introduction to MATLAB Introduction to MATLAB Econ 8305 Fall 2015 Hang Zhou The George Washington University Overview 1 Before Getting Started 2 Vector and Matrix Basic Scalar Calculation Matrix Arithmetic Operation Some Useful

More information

Arithmetic operations

Arithmetic operations Arithmetic operations Add/Subtract: Adds/subtracts vectors (=> the two vectors have to be the same length). >> x=[1 2]; >> y=[1 3]; >> whos Name Size Bytes Class Attributes x 1x2 16 double y 1x2 16 double

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra) AMS526: Numerical Analysis I (Numerical Linear Algebra) Lecture 1: Course Overview; Matrix Multiplication Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical Analysis I 1 / 21 Outline 1 Course

More information

ME305: Introduction to System Dynamics

ME305: Introduction to System Dynamics ME305: Introduction to System Dynamics Using MATLAB MATLAB stands for MATrix LABoratory and is a powerful tool for general scientific and engineering computations. Combining with user-friendly graphics

More information

3-8 Solving Systems of Equations Using Inverse Matrices. Determine whether each pair of matrices are inverses of each other. 13.

3-8 Solving Systems of Equations Using Inverse Matrices. Determine whether each pair of matrices are inverses of each other. 13. 13. Determine whether each pair of matrices are inverses of each other. If K and L are inverses, then. Since, they are not inverses. 15. If P and Q are inverses, then. Since, they are not inverses. esolutions

More information

Basic matrix math in R

Basic matrix math in R 1 Basic matrix math in R This chapter reviews the basic matrix math operations that you will need to understand the course material and how to do these operations in R. 1.1 Creating matrices in R Create

More information

Chapter 8 Dense Matrix Algorithms

Chapter 8 Dense Matrix Algorithms Chapter 8 Dense Matrix Algorithms (Selected slides & additional slides) A. Grama, A. Gupta, G. Karypis, and V. Kumar To accompany the text Introduction to arallel Computing, Addison Wesley, 23. Topic Overview

More information

Solutions to Programming Assignment Four Simultaneous Linear Equations

Solutions to Programming Assignment Four Simultaneous Linear Equations College of Engineering and Computer Science Mechanical Engineering Department Mechanical Engineering 309 Numerical Analysis of Engineering Systems Spring 2014 Number: 15237 Instructor: Larry Caretto Solutions

More information

Implementation Of Quadratic Rotation Decomposition Based Recursive Least Squares Algorithm

Implementation Of Quadratic Rotation Decomposition Based Recursive Least Squares Algorithm 157 Implementation Of Quadratic Rotation Decomposition Based Recursive Least Squares Algorithm Manpreet Singh 1, Sandeep Singh Gill 2 1 University College of Engineering, Punjabi University, Patiala-India

More information

A MATLAB Interface to the GPU

A MATLAB Interface to the GPU Introduction Results, conclusions and further work References Department of Informatics Faculty of Mathematics and Natural Sciences University of Oslo June 2007 Introduction Results, conclusions and further

More information

CS Elementary Graph Algorithms & Transform-and-Conquer

CS Elementary Graph Algorithms & Transform-and-Conquer CS483-10 Elementary Graph Algorithms & Transform-and-Conquer Outline Instructor: Fei Li Room 443 ST II Office hours: Tue. & Thur. 1:30pm - 2:30pm or by appointments Depth-first Search cont Topological

More information

Assignment 1 (concept): Solutions

Assignment 1 (concept): Solutions CS10b Data Structures and Algorithms Due: Thursday, January 0th Assignment 1 (concept): Solutions Note, throughout Exercises 1 to 4, n denotes the input size of a problem. 1. (10%) Rank the following functions

More information

Natural Quartic Spline

Natural Quartic Spline Natural Quartic Spline Rafael E Banchs INTRODUCTION This report describes the natural quartic spline algorithm developed for the enhanced solution of the Time Harmonic Field Electric Logging problem As

More information

The real voyage of discovery consists not in seeking new landscapes, but in having new eyes.

The real voyage of discovery consists not in seeking new landscapes, but in having new eyes. The real voyage of discovery consists not in seeking new landscapes, but in having new eyes. - Marcel Proust University of Texas at Arlington Camera Calibration (or Resectioning) CSE 4392-5369 Vision-based

More information

Math 355: Linear Algebra: Midterm 1 Colin Carroll June 25, 2011

Math 355: Linear Algebra: Midterm 1 Colin Carroll June 25, 2011 Rice University, Summer 20 Math 355: Linear Algebra: Midterm Colin Carroll June 25, 20 I have adhered to the Rice honor code in completing this test. Signature: Name: Date: Time: Please read the following

More information

Project Report. 1 Abstract. 2 Algorithms. 2.1 Gaussian elimination without partial pivoting. 2.2 Gaussian elimination with partial pivoting

Project Report. 1 Abstract. 2 Algorithms. 2.1 Gaussian elimination without partial pivoting. 2.2 Gaussian elimination with partial pivoting Project Report Bernardo A. Gonzalez Torres beaugonz@ucsc.edu Abstract The final term project consist of two parts: a Fortran implementation of a linear algebra solver and a Python implementation of a run

More information

Introduction to MatLab. Introduction to MatLab K. Craig 1

Introduction to MatLab. Introduction to MatLab K. Craig 1 Introduction to MatLab Introduction to MatLab K. Craig 1 MatLab Introduction MatLab and the MatLab Environment Numerical Calculations Basic Plotting and Graphics Matrix Computations and Solving Equations

More information

FreeMat Tutorial. 3x + 4y 2z = 5 2x 5y + z = 8 x x + 3y = -1 xx

FreeMat Tutorial. 3x + 4y 2z = 5 2x 5y + z = 8 x x + 3y = -1 xx 1 of 9 FreeMat Tutorial FreeMat is a general purpose matrix calculator. It allows you to enter matrices and then perform operations on them in the same way you would write the operations on paper. This

More information

Least-Squares Fitting of Data with B-Spline Curves

Least-Squares Fitting of Data with B-Spline Curves Least-Squares Fitting of Data with B-Spline Curves David Eberly, Geometric Tools, Redmond WA 98052 https://www.geometrictools.com/ This work is licensed under the Creative Commons Attribution 4.0 International

More information

Finite Math - J-term Homework. Section Inverse of a Square Matrix

Finite Math - J-term Homework. Section Inverse of a Square Matrix Section.5-77, 78, 79, 80 Finite Math - J-term 017 Lecture Notes - 1/19/017 Homework Section.6-9, 1, 1, 15, 17, 18, 1, 6, 9, 3, 37, 39, 1,, 5, 6, 55 Section 5.1-9, 11, 1, 13, 1, 17, 9, 30 Section.5 - Inverse

More information

CHAPTER 5 Pipelined Computations

CHAPTER 5 Pipelined Computations CHAPTER 5 Pipelined Computations In the pipeline technique, the problem is divided into a series of tasks that have to be completed one after the other. In fact, this is the basis of sequential programming.

More information

Lab #10 Multi-dimensional Arrays

Lab #10 Multi-dimensional Arrays Multi-dimensional Arrays Sheet s Owner Student ID Name Signature Group partner 1. Two-Dimensional Arrays Arrays that we have seen and used so far are one dimensional arrays, where each element is indexed

More information

The Efficient Extension of Globally Consistent Scan Matching to 6 DoF

The Efficient Extension of Globally Consistent Scan Matching to 6 DoF The Efficient Extension of Globally Consistent Scan Matching to 6 DoF Dorit Borrmann, Jan Elseberg, Kai Lingemann, Andreas Nüchter, Joachim Hertzberg 1 / 20 Outline 1 Introduction 2 Algorithm 3 Performance

More information

Matlab and Octave: Quick Introduction and Examples 1 Basics

Matlab and Octave: Quick Introduction and Examples 1 Basics Matlab and Octave: Quick Introduction and Examples 1 Basics 1.1 Syntax and m-files There is a shell where commands can be written in. All commands must either be built-in commands, functions, names of

More information

Put the following equations to slope-intercept form then use 2 points to graph

Put the following equations to slope-intercept form then use 2 points to graph Tuesday September 23, 2014 Warm-up: Put the following equations to slope-intercept form then use 2 points to graph 1. 4x - 3y = 8 8 x 6y = 16 2. 2x + y = 4 2x + y = 1 Tuesday September 23, 2014 Warm-up:

More information