0% found this document useful (0 votes)
27 views41 pages

Linear Algebra and Optimization Week 1

Linear Algebra Class notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
27 views41 pages

Linear Algebra and Optimization Week 1

Linear Algebra Class notes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 41
LINEAR AL CeeR A AND WEEK 4 LINEAR EQUATIONS A linear equation is an algebraic equation wheve each m has an exponent of f and when this equation is graphed, it always vesults in a stvaight line. aA Arvo equation tn the Vatiqbles Xp % .« ae | Li pie be ete Rea ae ee eae b > enstant TR eke , Examples of linear equations ave: oe pore ieee A coefficient is an integer that is wwii along with a vaviable ov it is multiplied by the i _ = = — iN Created by Notein NON LINEAR EQUATIONS A pea uation is a equation that forms a carve when pl on a graph. In the equation, the highest degree of x is not one. Examples ave: avd+43x4+5=0 Biighest degree of x is 2 (yt 3x, =6 Bapre F variables is inside a aa : ¥ (voot) so its non lineav 3) 5=0 8 Two v bl EN ec rae it's non lineav Linear Equation: Application One Monday, Mr. Jones has $25 in his wallet. He wants to buy fruits. He went to the grocery store. He found that there were only three fruits available. Banana } Kiwi < Orange $2.25/kg $3.5/kg $0.75/kg iN Created by Notein How much weight of each of these fruits Mr. Jones should buy to spend exactly $25? Represent it as a linear equation. SYSTEM OF LINEAR EQUATIONS Also known i lineav systems, is a collection of one ov move lineay equa Fons involving the same set of vaviables. % kot pan should have either 1a sol uti jon ii solution ov Infinitely many solutions IW Created by Notein Types of solutions - System of linear equations ce Solution One Solution No Solution edueate MAtH Qy4X + Qy2%Q ++ + AynXp = dy 4X + G22Xz ++ + AanXy = bz m1 X1 + AmaXq + °° + AmnXn = bm There are m linear equations and n variables. Linear System: Example — << + Two variables and two equations 2x+3y=5 7x —3y=-7 iN Created by Notein Practical Application A museum has opened in the city. They charge $20 per adult and $10 per child. The museum sold in total 210 tickets on the first day, and they earned $2800. Pose this as a linear system of equations. Solution: * x = No. of adult tickets sold y = No. of child tickets sold * Total tickets sold = 210, then x+y=210 + Museum earned = $2800 20x + 10y = 2800 Slope of a Line iN Created by Notein Equation of a Straight Line * Line passing throug (2, ¥2) lh two points (x;,1) and Created by Notein IW Created by Notein System of Linear Equations + Consider the system of two linear equations Qy1X + yay = by Exists in 2 Qz1X + Ag2y = by imensional plane + Represents a system of two lines. hd Linear Equation of Three Variables * Consider a system of linear equation with three variables Qy1X + Ay2¥ + Ay2z = by * It represents a plane in three dimension. iN Created by Notein X-axis N + For a system of linear equation with three variables, there will be a corresponding plane. f Matrix Notation * Acompact way to record a system of linear equations * Arectangular array of real or complex numbers * Arranged in rows and columns 441 G2 ** Gn Goi G22 ee an Gm1 Gm2 ** mn de IW Created by Notein Elements/Entries of a Matrix * Entries of a matrix = Elements of a matrix ith column ———renbor numbeyt Dam COEFFICIENT MATRIX A coefficient matrix is a matvix consisting of the wefficients of the vaviables in a set of linear equations. That is the matvix with elements before the equal sign in the equation 0311 + 2% +--+ Ginn = by 24 %4 + @29%2 +--+ Gann = by Ayn %4 + OyaXz +2 + AaynXn = Bon * Corresponding coefficient matrix 41 M2 Ain Gz, 022 Aan Asli s a m1 Amz ** mn. iN Created by Notein Dimension of a Matrix * The number of rows and columns defines the dimension or size of a matrix. * Amatrix with mrows andncolumns has a size or dimension mxn (read asm by n). eee ai S22) a ale eg ar ~ Qm1 Am2 °° Amn d * m= Row and n =Column Square Matrix * The number of rows is equal to number of columns Aa ete cee at Q2 Gam Gm, Amz Amma xm) IW Created by Notein Example — * Consider the following system of linear equations 2x+3y=5 7x —3y=-7 * Coefficient matrix 2 3} F -3l * What is the size of this matrix? © 2x2 B the size. ae pd OA» rents'by* Augmented Matrix * Obtained by adding a column containing the constants from the right sides of the equations to the coefficient matrix Qyy 2 in by a b * Onn Bn Ait “\ \e \ 4 vith (O a AX: alo oth cot x iW Created by Notein Fey. ou Example * Consider the following system of linear equations 2x+3y=5 7x —3y=-7 8 cee m atrix 2 31 oie bf aicl [34 *4| peony matin ourgmanted Ynalyi¢ Vector Notation When one of the dimensions of a matrix is one, it is called a vector. Row vector: * The number of rows is 1. Column vector: * The number of columns is 1. iN Created by Notein Vector Notation —= << + Row vector: example Br [233 —4hixs 4 * Column vector: example B) Gums Matrix Notation of System of Linear Equations * Matrix notation: AX= B + A: coefficient matrix + X: column vector of variables + B: vector of the constants iN Created by Notein Example 2x + 3y 7x —3y = Matrix notation E 2-1, BAD Column Column vector of vector of variables constants Coefficient matrix Qy4Xq + Gy2QX2 +++ + AynXp = by Q21Xq + A22X2 +++ + anXn = bz IW Created by Notein MATRIX OPERATIONS Zero Matrix * Am xn matrix whose all entries are Zero is called a zero matrix and is written as 0. Equality of Matrices * Two matrices A and B are said to be equal if they satisfy the following conditions. 1. The two matrices are of the same size. Number of rows in A = Number of rows in B Number of columns in A = Number of columns in B 2. Corresponding entries are equal. ay = by Vij IW Created by Notein Addition of Two Matrices + If A and B are m x n matrices, then the sum C =A +Bis the mxn matrix whose entries are the sum of the corresponding entries in A and B. ij = ij + by Wij A esas Addition of Matrices: Example Consider the following matrices. Here, A and a a-[A ea cannot be — 17 tee) PAR ok ( 4 2 0 -7 and Cis 3x4 B= ls 2 =|-2 -2 1 2 an) 0 =3 Size of A and B © FindA+B. should be same ive 143 ore t is a" © A+B=|-1-2 1-2 0+0 So” -2+0 0+0 141 to add 1 -2 -1 a| a2 iN Created by Notein Scalar Multiple of a Matrix * If k isa scalar and A is a matrix, then kA is defined as a matrix obtained by multiplying every entry of A by the scalar k. 1-1 -~2 + ample: = [1 1 °| -2 0 1 Properties of Matrix Addition + Let A, B, and C be matrices of the same size, and let k and | be = Commutative + A+B=B+A ae 4 property . (A+B)+C=A4(8+c) ———_S, Associative vo + A+0=A —> Zero P Matvix + (A+B) =kA+k “(K+DASKASIA . Sealav property + K(IA) = KIA ed IW Created by Notein Viewing a Matrix as Column Vector * m Xn: can be viewed as a column Each vow heve in this wesentation can be a vow vector hence ix can be a column vectov of vow vectors Similavly, a matvix can also be seen as a vow v ot column vectors. Viewing a Matrix as Row Vector * m Xn: can be viewed as a row vector of column vectors. IW Created by Notein Multiplying a Row Vector and a Column Vector = ay by+ az batt On bm AE Multiplying a Row Vector and a Column Vector: Example + Multiply the following 2 es afi 8 =1:24+3-445°8 = 2412440 =54 iN Created by Notein Pre Multiply a Column Vector with a Matrix — — + Let A be a matrix of size m x n. * Let V be a column vector of size n x 1. + Then, R = AV is a vector of size m x 1. ayn a a Q, a2 a - n | pvr 2 aN | V2 G1 Anz Gn br Pre Multiply a Column Vector with a Matrix: Example * Compute the following: cam fc (=z 1 d=3=2 1 De ere Ded ye So 22 “lel” Sxl IW Created by Notein JO©@ 3 C'X | + @ x2) 413x4 bo HV XDtO% 3 -3x\)42x2+( 4 _ asa 5 eat S443 Multiplication of Two Matrices Consider two matrices: * Aof size mx n ¢ Bofsizenxp Then, C=A‘B is a matric of size mx p Note: No. of columns (n) on left side matrix (A) = No. of rows (n) on right side matrix (B). Multiplication of Two Matrices: Example * Multiply the following two matrices 4-8 ghe-E 4] ‘Solution: Aste e alll eva) J _f32+CD1 3(-2)4(-13 3-14-14 mlc2 eed 5:(-2) +23 5 (-1) +24 oe | -6-3 -3-4_/5 -9 —-7 = [i042 -10+6 =s+al=le -4 31 p iN Created by Notein Row-Column Rule for Computing AB « Ifthe product 4B is defined, then the entry in row i and column j of AB is the sum of the products of the corresponding entries from row i of A and column j of B. © AB) y= ayibyy + a12bz) ++ dinbyy Row-Column Rule: Example * Find the entry in row 1 and column 3 of AB © (AB),3= 3-(-1) + (-1)-4 = -7 © Verification: w-B JIGS 3 = ie 7 Identity Matrix e Annxn matrix whose all diagonal entries are one and remaining elements are 0 is called an identity matrix and is written as I. Example: 00 Igx3 = ° | 0 0 iN Created by Notein Properties of Matrix Multiplication « Let A be an mx n matrix, and let B and C be matrices with sizes for which the indicated sums and products are defined. A(BC) = (AB)C Associative law A(B + C) = AB + AC Left distributive law (B+ C)A = BA+CA | Right distributive law (AB) = (kA)B = A(kKB) For any scalar k JA=A=Al Identity for matrix multiplication| A Warnings eee ¢ In general, matrix multiplication is not commutative, that is, AB + BA. ¢ The cancellation laws do not hold for matrix multiplication. If AB = AC, then it is not true in general that B = C. © If the product of AB is the zero matrix, then you cannot conclude that either A=0 or B=0. IW Created by Notein Transpose of a Matrix e Given a matrix A of size mx n, the transpose of A denoted as A’ is of size n x m, whose columns are formed from the corresponding rows of A. iy 277|| 423s Q2, 422 Gan} _ 9412] G22 ** Gm2 m1 Amz “~ nn. in| 22n ~" Omn Wa Make the fivst vow the, fivst column, 2nd vow the 2nd column etc...for tvanspose Example e Find the transpose of Solution; r 1)-1 What will be the transpose of a row vector? A =\2 (-2 It will be a column vector. Se — IW Created by Notein Properties of Transpose of a Matrix * Let A and B denote matrices whose sizes are appropriate for the following sums and products. (A =A (A+B)"= AT + BT 2 INTRODUCTION TO DETERMINANTS Determinants — * Recall a square matrix. * Associated with every square matrix Ais anumber called its determinant denoted by |A|. * This number will help find the solution of a system of linear equation or characterize the solution. ka, IW Created by Notein Determinant of 1x1 Matrix and 2x2 Matrix — + Determinant of 1x1 matrix is defined as layil = a1 + The determinant of a 2x2 matrix is defined as [etete [ic aos sie anacien 11422 12421 Example * Find the determinant of the matrix i fe @ —cosé cos@ siné Solution: _ [sin@~ --cos 0) Nel ee @°Ssina I = (sin 0)* + (cos 0)?= 1 Pythagerean Identities tt sin? 6 +cos? 6 =1 xk TH Created by Notein Minor and Cofactor of an Element —_—_ | + Let A be a square matrix, the minor M_ of the element a, is defined as the determinant of the matrix obtained from A by deleting the row i and column j. + The cofactor of a, is defined as Si Cy = (1) My ; SS: Example + Determine the minor and cofactor of the element @,, of the following matrix. 2 A=|0 1 2 0. C2 = Cyne. = iN Created by Notein IW Created by Notein A Broader Definition —_ * The determinant of a square matrix is the sum of the products of the elements of any row or column and their co-factors. ith row expansion IA] = ain Cin + Qi2Cjg + + GinCin jth column expansion IA] = aj Oj + agjCaj +--+ + AnjCny Example + Find the determinant of the following matrix 3) 0) 2 40 5 o 1 2 Find the determinant using 2nd column expansion. Solution: |A| = ai2lr2 +4 gale + ia =Oeeiear B iN Created by Notein ROW OPERATIONS ON DETERMINANTS Determinants and Its Properties — — + We know how to compute the determinant of any square matrix. Property-1: If the rows and columns of a determinant are interchanged, then the value of the determinant remains unchanged. l4|=|4"| Proof of Property -1 : Property-1 —i a, @z a3 sLetD= |b; bz bs Gia G2 Gai + Expanding based on the first row. D = ay (bz c3 ~ bz Cz) - @p(by C3 - bs Cy) + @3(by C2- bz C1) * Interchanging rows and columns of D. a, by ees a3 bg C3 + Expanding based on the first column. DT = ay (bz €3 - bs C2) - aa(by €3 - bs cy) + a3 (by C2 - be cy) = D. DT = IW Created by Notein Property-2 a bee + Let A be a square matrix. Property-2: If two rows (columns) of a matrix are interchanged to produce B, then \Bl=-14| Proof of Property -2 : Property-2 5 * Let |A| = a, a2 a3 by bz bg Cy Cz C3 + Expanding based on the first row. * IA| = ay (bz C3- bs €2)- aa(by C3~ bs 1) + A3(O C2" 02 * Interchanging first row and second row. _ b, be af a, a2 3 cl cz Cole + Expanding based on the second row. ee = —A;(b2 C3- bz Cz)+ A2(by C3- bz cy) - a3 (by C2- bz 1) = — Al. [Bl = IW Created by Notein Example + Verify property-2 by interchanging column-1 and column-3 for the determinant di ll = 2 0 Solution: * [A] = 2- (12) - 0-3 + (-2)-(2-4) = 2444 = 28. After interchanging columns 1 and 3, we have fA Bl=|2 4 0 3 0 -2 Expanding based on the column 3 of |B], we have |B|=2(—12)—0-(—3)+(—2)-(4-2)=-24—4= —28=-|A|. "4 Property-3 «Let A be a square matrix. Property-3:If any two rows (columns) of a determinant are identical, i.e., their corresponding elements are equal, then the value of the determinant is zero. IW Created by Notein Property-3 * This property holds because if we interchange the identical rows of |A|, the determinant remains unchanged. + According to property 2, the value of the determinant after the exchange will be of the same magnitude but a different sign. + Thus, |A| = -lAl. Example ae Sel + Verify property-3 Zn 2 -O +4 0 Oe a n |A| = Solution: If we expand using the second row, we get |A|=—0-(—8)+4-(—444)—0-(2)=04+.04+0=0. IW Created by Notein Property4 Property4: If each element of a row (column) of a determinant is multiplied by a constant k, then its value gets multiplied by k. Proof of Property - 4 : Property4 a, az a3 sLetD=|bi bz b3 Cy C2 C3 + Expanding based on the first row. + D = ay(bz C3 - bg C2) - a2(by C3 - bg Cy) + ag (by C2 - ba G1) ka, kar kas sLetD'=|b, b, bs eee + Expanding based on the first row. + D! = kay (bz €3 - bg Cg) - kaa (by C3 - bg Cy) + ka3(by C2 - bz 4) = kD iN Created by Notein Property5 Property5: If some or all elements of a row (column) of a determinant are expressed as sum of two (or more) terms, then the determinant can be expressed as sum of two (or more) determinants. Example — * Find the value of a a as la, tke, ap+kc, a3 +key G 2 3 [Al = * Solution: a a a3 lay +key ag+keg a3 +kcg| ra” ~ @ acs 4; az a3) |a, a2 ay aye azitas + fs keg Kes! ee 31 Iq a a, az ayy cy Cn 3 o aoe lA] = [By property 5] a, Az 3 a, az a3 i ce = +k [By property 4) = 0 + 0 = 0 [By property 3] iN Created by Notein Property6 — — » LetA be a square matrix. Property6: If a multiple of one row (column) of A is added to another row (column) to produce a matrix B then |B| = |A|. Proof of Property - © : Property6 a; G2 3 +Let|A|=]b: bz dsl Y Cy Cg Cg + Let's apply the operation R; — Ry + kR3 la, tke, agt+kc, a3 +kcz + We get |B| by by bs co & C3 a, az Az icy Ca Ce = ]b1 bz bs} +k |b: bz bs} (By properties 5 and 4) fer ty ez ce a, a2 a3 =]b, bz bs! + 0 [By property 3] = [A] Cy Co Cz fh-Greated by Notein Example * Prove that aja a+b at+b+c |A| = 3a+2b 4a+3b+2c 6a+3b 10a + 6b + 3c! =a Solution: Apply the operations Ry — Ro — 2Ryand R3 > R3 — 3R; ja a+b atb+c lA] 0 a 2a+b 0 Ga 7a+3b Apply R3 — R3 — 3R2 a a+b at+b+c |A| = |0 0 a 2a+b @~*"a =a Property7 Property7: If A and B are two n x n matrices, then |AB| = |Al|B| iN Created by Notein Property7 Gio = [lean = (2a . perty-7 for A = [5 Te] and 8 =[ 8 Solution: |Al = >= | ="75) 11 = |X| = 16 Let's compute AB = fms) fl dl =[G=3 onal Ls “tl” [4B] = | 7724] = (-280) - (120) = —400 = (— 25)(16) = |4||8] Warning * If A and B are two n x n matrices, then |A + B] = |A] + |B| Not true * Is that always true? . (DE _|2 Ce Let lal=|5 ~sl= 2siBi=|t 9|=16 Let's compute A + B = ia | + fi | 4 +l =|'><,)| =214+3=24% (— 25) + (16) = 14] + 181 iN Created by Notein IW Created by Notein

You might also like