You are on page 1of 8
14 Gaussian Elimination & 15 Matrices 3x + 2y 3 rewrite in 32 af \x} \3 matrix notation 1-1) Jyf=h ——— 21 -1} (2) fo Ne eT note & I. INTRODUCTION © matrix: a rectangular array of numbers/symbols/expr ions © order of a matrix = (no. of rows)x(no. of columns) 3.2 -1 for example: isa 2x 3 matrix, 1-11 # special matrix: (read the lecture notes for other special matrices) 1. row vector is a 1 x n matrix. example: [a 6 | a 2. column vector is an x 1 matrix example: | 6 c ab 3, square matrix: no, of row = no, of column, example: ed 4. Identity (unit) matrix is a square matrix 100 with ones on the diagonal and zeros elsewhere. example: | 0 1 0 001 « Notation: use capital letters to represent matrices, ail a2 3 entries within a matrix by A= | al @2 3 are denoted by subscripted B= | by as] a32 033 lowercase letters & In general: A = [aij] , a,; = entry in row é and column j of A. I OPERATIONS ON MATRICES Equality: A = B only when all entries in A equal those in B 10 10 example: A and B , then A = B. 2-3 2 Addition: only possible between matrices of the same order. ab ef ate b+f example: + = cd gh ct+gdth order; 2x2 2x2 2x2 Multiplication by scalar: multiply each entry of a matrix by a scalar ab da Ab example: = ed de Ad Multiplication of matrices: only possible when the number of column in A equals the number of row in B. Ast Bis = ABixy ps abe ap +bg+er as+bt+su example: atl= def dp +eq+ fr ds+et+ fu ru order 2x3 3x2 2x2 Transpose: Flip rows and columns, denoted by [ T 12 13 example: = 34 24 II. PROPERTIES OF MATRICES 1. AB 4 BA (not commutative) A(B+C) = AB+ AC } (distributive) (B+ 0)A=BA+CA 3. (AB)C = A(BC) (associative) 4, MAB) = (AA)B = A(AB), 2 is any scalar, Note: read the lecture note for more properties of matrices Example for property (i) abeLa] Let A = B= 35 24 AB 2a}]} 3-1 (2)(3) + @)(-2), 2(-1) + (1)(4) 42 -35][-24 (-3)(8) +5(-2) (-3)(-1) +5(4) | | -19 28 wf] [23]-[2.3] AB ZBA Example for [A = Al = A, where A is any square matrix, [: A : H Let A = ,B= cd 01 A : Hl [: Al [meron yore] [: Al A orffed] [Mm a+Moow+ug] [ed le el- IA=AI=A AL IV. GAUSSIAN ELIMINATION Q: How to solve a system of lincar equations? A: We can use Gaussian elimination (also known as row reduction). There are two types 1, Gaussian elimination with back substitution (or just called back substitution) xz (i) reduce to upper triangle DE or lower triangle Ng using ERO. (ii) solve by back substitution. 2. Gaussian elimination without back substitution (or just called Gaussian elimina- tion) xa Sak (i) reduce to upper triangle 2 or lower wvianslel by using ERO. oo (ii) eliminate all element above diagonal es 00x (ii) if possible, make the coefficients of all elements on the diagonal to 1 10 —— > 0} 00 (iv) solutions are on the right-hand-side of the equations Elementary Row Operation (ERO) Both types of Gaussian elimination involve ERO. ‘There are three types of ERO 1. interchanging two rows ge g, 38, 2, multiply a row by a non-zero constant R= 3. adding to one row a multiple of another row 23° Rar 32, Example 15.4: Solve the system of equations using matrix notation Typical layout Matrix notation -| Bir + 2y — 1 3 a- 4 _ noyte raN =)4 Qn ey ai 4 2 ' cotfficent mate 72 7 c = B 1. Write into the augmented matrix form ord = 345 “ayy x1 i} 3x + 2y ™.. 2 2 -\ic (2) a-ytes > boy 4 (3): de ty—z eyo A nination with back substitution Q) -1 Rat BRD -R 3 2 Ht) (2): 3(2)-Q) 0 = 5y +42 = 13 _ PJ) oS 4! 3 Ra: 7 2Ry 0 3 73 1-4 (3): (8)-22) 0+ 3y—32=-9 : a4 (a) 324 2y—2=-1 a 8 (2) 0-Sy-442 = 13 “| 33 (By {GY OF y z= -3 “*K je (3): 5@)"+Q) 0 + 0% 2; O- by +42 Solve by back subs.: -2 = -2> 2=2 > 22 a Hee2 DE acta) by +42 = 13 > y = A =] =$ye42 =13 a =-| 30-4 2y— z= -1 > 2 = 142-2 Solution is 2 = 1, y= 1, 2=2 Seldion is x21, ed, 222 Ke 3. OR Let's solve by Gaussian Elimination without back substitution: ~*~ (Continue from *) 9 Q) 3x+2y-2=-1 (2) O-5y+42=13 (3): 5@)"+(2) 0 + 0-2-2 (ya)+3(2y’ 324043252 5 (2)":2) 44)" 0 -5y +0=5 (ay: -(3)" O+ 0 42=2 (yay3@yr 3x +0 +0=3 (2)":—3(2)” O+y+0=-1 (3) O+042=2 qq) r+04+0=1 (2) O+y+0=-1 (3) O+04+2=2 Solution is ¢ = 1, y=—1,2=2 XKX x oe x 0x on* 3 2 -| oct 0 5 4 13 \-*K 0 0 4 ng 3 21 ec Rt ER 3° eS 5] 9 5 os Ry Rt 4Rs soo Rs: ~ 8; .p -3 a 0 3 RP % }oe Ra “Pa > 0 | 2 :t @©e ? \ RiP SV @e HI o 9 oO 2 Solution 1S X= yet ,tra \-7 Vv. DETERMINANT How to evaluate determinants: 1. Choose 2, For each position in the selected row/column, calculate the corr any row/column ponding cofactor. 3. Form the product of each cofactor with the corresponding entry. The determinant is the sum Example: Find det(A) = using row 1 of A. dek (A) = +2\2 of these products 201 201 -1 2-1) where A=] -1 2-1 1300 130 det (A) (A) = Ayo aye 3 | sign matrix = For 3x3 matrix In general! A=(ay] Ifi+j = oda, then sign Ifi+j = even, then sign =+ fee Bag 2HESy ato" AoC) FO +1072) = 640-5 . = cofactor of D ee +3 using column 2 of A: det(A) = x a Sah) = 0 t2(0-1) 22-6) = 0-2 +3 = \ Properties of determinant (with video) 1, Transpose property: det(A) = det(A™) Vr example: Given A = : ‘ det(A) = = 1(4) — 2(3) = -2 13 ATS | } +. det(A) 14) — 2(3) = -2 = det(A) 24 2. Scaling property: det(kA) = k"det(A), if A is an n x n matrix k Isa 2 =/)2] -- ny A=Chi) , dt =lod] =-2 teal ann ber _ Ris @ 2X2 madex ap 510 aes OG) = Pie Yo] det (5A) = °. P| = 82) - 152) =-S0 5* det (A) = 25(-2) =-50 = det (aye ve det (SA) = 5? det cA) 3. Interchanging: swapping any 2 rows/columns change the sign of the determinant. p= [be] det) = 2 734 8) =/? #]=3Q)-1(G)= 2 B= (FS) det 08) IF 4 - een) 4, Elimination: C2) nz2 let R = adding a multiple of a row to another row does not alter the value of a determinant, a a2 ay a a ay by by bs | =| b: + key by + kep bs + kes |, where k is any real number. ere ey a oe cp 12 det (AD = example: det(A) = and let k= 2, 4 1 2 12 then Re: 2Ri+Re = 1(8) - 25) = det(A) 3+2() 4+22)) [58 TO 4 5. Matrix multiplication: det(AB) = det(A)det(B), provided A and B be square matrix of the same size. 12 56 det (AY = 2 example: Given A = and C = det ©) = 968) -7(6) = - 14 AC= 34 1 ‘ : ‘ _ eee 1(6) +28 _ [; z| 34] jos 3(5) + 4(9) 366) +4(8) | | 51.50 det(AC) = 23(50) — 51(22) = 28 = 2) ) = det(A)det(C)

You might also like