CS 205A class_2 notes

Scientific Computing

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS205 – Class 2 Linear Systems Continued Covered in class: all sections 1. When constructing k M we needed to divide by k a which is the element on the diagonal. This could pose difficulties if the diagonal element was zero. For example, consider the matrix equation 04 2 2 49 3 8 23 7 1 0 x y z ⎡⎤ ⎢⎥ −= −− ⎣⎦ where forming 1 M would lead to a division by 11 0 a = . In general, LU factorization fails if a small number shows up on the diagonal at any stage. a. When small numbers occur on the diagonal, one can change rows. In general, one can switch the current row k with a row j below it with j > k in order to get a larger diagonal element. This is called pivoting. Partial pivoting is the process of switching rows to always get the largest diagonal element, and full pivoting consists of switching both rows and columns to always obtain the largest possible diagonal element. Note that when switching columns, the order of the elements in the unknown vector needs to be changed in the obvious way, i.e. there is a corresponding row switching in the vector of unknowns. b. A permutation matrix can be used to switch rows in a matrix. Permutation matrices can be constructed by performing the desired row switch on the identity matrix. For example, a permutation matrix that switches the first and third rows of a matrix is obtained by switching the first and third rows of the identity matrix. For a 3x3 matrix, 001 010 100 P = .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/29/2008 for the course CS 205A taught by Professor Fedkiw during the Fall '07 term at Stanford.

Page1 / 4

CS 205A class_2 notes - CS205 Class 2 Linear Systems...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online