Lec14-Solving systems of linear equations

# Lec14-Solving systems of linear equations - L e c t u r e 1...

This preview shows pages 1–7. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: L e c t u r e 1 4 S o l v i n g s y s t e m s o f l i n e a r e q u a t i o n s 1 1 / 6 / 6 S c o t t B . B a d e n / C S E 2 6 / F a l l 2 6 2 L i n e a r s y s t e m s o f e q u a t i o n s • A c o m m o n t a s k i n s c i e n t i f i c c o m p u t a t i o n i s t o s o l v e a s y s t e m o f l i n e a r e q u a t i o n s • O f t e n r e s u l t f r o m o f d i s c r e t i z i n g a d i f f e r e n t i a l e q u a t i o n • E x a m p l e : l i n e a r s y s t e m o f 2 e q u a t i o n s i n 2 u n k n o w n s ( 1 ) 2 x + 3 y = 8 ( 2 ) 3 x + 2 y = 7 • R e w r i t i n g e q u a t i o n ( 1 ) x = ( 8- 3 y ) / 2 • S u b s t i t u t i n g x i n t o t h e L H S o f e q u a t i o n ( 2 ) 3 ( 8- 3 y ) / 2 + 2 y = ( 2 4- 9 y ) / 2 + 2 y ¡ ( 2 4- 9 y ) + 4 y = 1 4 ¡ 1 = 5 y ¡ y = 2 • B a c k s u b s t i t u t i n g t h e v a l u e o f y i n t o e q u a t i o n ( 1 ) x = 1 1 1 / 6 / 6 S c o t t B . B a d e n / C S E 2 6 / F a l l 2 6 3 M a t r i x v e c t o r e q u a t i o n s • O u r l i n e a r s y s t e m o f 2 e q u a t i o n s i n 2 u n k n o w n s … 2 x 1 + 3 x 2 = 8 3 x 1 + 2 x 2 = 7 • m a y b e c o n v e n i e n t l y e x p r e s s e d i n m a t r i x n o t a t i o n : A x = b • W h e n w e s o l v e d f o r x 1 = ( 8- 3 x 2 ) / 2 a n d s u b s t i t u t e d i n t o t h e 2 n d e q u a t i o n , w e r e d u c e d t h e m a t r i x t o a n e q u i v a l e n t f o r m • W e m u l t i p l i e d r o w 1 o f A b y 3 / 2 a n d s u b t r a c t i n g t h e s c a l e d v e r s i o n f r o m r o w 2 o f A a n d b ¡¡ ¢ £ ¤¤ ¥ ¦ = ¡¡ ¢ £ ¤¤ ¥ ¦ = ¡¡ ¢ £ ¤¤ ¥ ¦ = 7 8 , , 2 3 3 2 2 1 b x x x A ¡¡ ¢ £ ¤¤ ¥ ¦ = ¡¡ ¢ £ ¤¤ ¥ ¦ = § § 5 8 , 5 . 2 3 2 b A 1 1 / 6 / 6 S c o t t B . B a d e n / C S E 2 6 / F a l l 2 6 4 R a n k 1 u p d a t e s • W e c a l l t h i s a r a n k- 1 u p d a t e • M u l t i p l y i n g r o w 1 b y 3 / 2 : [ 3 9 / 2 ] • S u b t r a c t i n g f r o m r o w 2 : • S i m i l a r l y f o r b • A n a p p l e t f o r l o o k i n g a t 2 x 2 s y s t e m s : w w w . f r e e b o u n d a r i e s . o r g / j a v a / l a _ a p p l e t s / G a u s s E l i m / ¡¡ ¢ £ ¤¤ ¥ ¦ = 2 3 3 2 A ¡¡ ¢ £ ¤¤ ¥ ¦ = § ¨ 5 . 2 3 2 A 1 1 / 6 / 6 S c o t t B . B a d e n / C S E 2 6 / F a l l 2 6 5 G a u s s i a n E l i m i n a t i o n • T h e p r o c e s s o f e l i m i n a t i n g t h e n o n- z e r o v a l u e s u n d e r t h e m a i n d i a g o n a l i s c a l l e d G a u s s i a n E l i m i n a t i o n , n a m e d a f t e r t h e m a t h e m a t i c i a n J o h a n n C a r l F r i e d r i c h G a u s s ( 1 7 7 7- 1 8 5 5 ) • I n p u t : a n n ¡ n m a t r i x c o r r e s p o n d i n g t o a l i n e a r s y s t e m o f n e q u a t i o n s i n n u n k n o w n s ( m u s t h a v e n o n- t r i v i a l s o l ’ n ) • E l i m i n a t e t h e n o n- z e r o v a l u e s u n d e r t h e m a i n d i a g o n a l t o p r o d u c e a n u p p e r t r i a n g u l a r m a t r i x U U 1 1...
View Full Document

## This note was uploaded on 02/20/2008 for the course CSE 260 taught by Professor Baden during the Fall '06 term at UCSD.

### Page1 / 38

Lec14-Solving systems of linear equations - L e c t u r e 1...

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

View Full Document
Ask a homework question - tutors are online