HW, Mth 7. CSUF. Spring 7. Nsser M. Abbsi Spring 7 Compiled on November 5, 8 t 8:8m public Contents Section.6, problem Section.6, problem Section.6, problem 5 Section.6, problem 7 6 5 Section.6, problem 5 8 6 Section.6, Problem 8 7 Section.6, Problem 9 8 Section.6, Problem 5 9 Section.6 problem 56 Section.7, Problem Section.7, Problem 6 Section.7, Problem 8 Section.6, problem Problem: Find the inverse of A, A, A Answer: Using the formul c b d d bc d c b cos θ sin θ sin θ cos θ Hence
A A A 6 cos θ sin θ sin θ cos θ cos θ + sin θ cos θ sin θ sin θ cos θ cos θ sin θ sin θ cos θ
Section.6, problem Problem: () Find the inverses of the permuttion mtrices P nd P (b) Explin for permuttion why P is lwys the sme s P T. Show tht the s re in the right plce to give PP T I Solution: () When P is pplied to mtrix A its effect on A is to replce the first row of by the rd X Z P row of, nd to replce the rd row by the first row t the sme time. As n exmple Y Y. Hence Z X to reverse this effect, we need to perform the sme opertion gin, i.e. replce the first row by the rd Z X P row nd replce the rd row by the first, but this is P itself. Hence Y Y X Z Therefor P P P sys to replce first row by the rd row, nd to replce the second row by the first nd X Z P to replce the rd row by the second. For exmple Y X, Hence to reverse it, we need to replce Z Y the first row by the second, nd to replce the second row by the rd nd to replce the rd row by the first t the sme time. Hence P (b) In permuttion mtrix P, ech row will hve t most one non-zero entry with vlue of. Consider the entry P i,j. This entry will cuse row i to be replced by row j. Hence to reverse the effect, we need to replce row j by row i, or in other words, we need to hve the entry (j, i) in the inverse mtrix be. But this is the sme s trnsposing P, since in trnsposed mtrix the entry (i, j) goes to (j, i) Hence P P T Now Let PP T C, where P, P T, re permuttion mtrices (in other words, ech row of P, P T is ll zeros, except for one entry with vlue of.) Hence the entry C (i, i) will be whenever A (i, j) B (j, i), This is from the definition of mtrix N multipliction, element by element view, since C (k, l) P (k, j) P T (j, l) but P (k, j) P T (j, l) for ll entries except when the entry P (k, j), nd t the sme time P T (j, l), but since P T is the trnspose of P, then whenever P (k, j) then P T (j, l) only when k l. Hence this leds to C (k, k) with ll other entries in C being zero. j
i.e. C PP T I
Section.6, problem Problem: Give exmples of A nd B such tht () A + B is not invertible lthough A nd B re invertible (b) A + B is invertible lthough A nd B re not invertible (c) All of A, B nd A + B re invertible In the lst cse use A (A + B) B B + A to show tht C B + A is lso invertible nd find formul for C Answer: ()A, B Here A, B re both invertible (Det (A), Det (B), while Det (A + B) Det ) i.e. (A + B) not invertible. (b)a, B,Here A, B re both non-invertible (Det (A), Det (B), while Det (A + B) Det ) i.e. (A + B) invertible. (c)a, B Here A, B re both invertible (Det (A), Det (B), nd Det (A + B) Det ) i.e. (A + B) invertible lso. Now need to find formul for C. Since C B + A, then C ( B + A ) (A (A + B) B ) ( B ) ( A (A + B) ) B ((A + B) ( A ) ) B (A + B) A btw, reding round, found pper clled On the inverse of the sum of Mtrices by Kenneth Meler, gives this formul (But this is vlid when Y hs rnk?) (X + Y ) X + trce(yx ) X YX 5
Section.6, problem 7 Problem: If A L D U nd A L D U prove tht L L, D D nd U U. If A is invertible, the fctoriztion is unique. () Derive the eqution L L D D U U nd explin why one side is lower tringulr nd the other side is upper tringulr. (b) Compre the min digonls nd then compre the off-digonls. Solution: This question is sking to show tht the LDV decomposition is unique. Proof by contrdiction: Assume the decomposition is not unique. Hence there exist L D V nd ˆL ˆD ˆV decompositions of A. Hence we write A L D V ˆL ˆD ˆV D V ˆD ˆV L D ˆL ˆD D D V ˆD ˆD ˆV L D ˆL ˆD D D V ˆD ˆD ˆV L D L D V + D ˆL ˆD ˆL ˆD ˆV + ˆD Since both of the bove mtrix re equl to the sme mtrix A, compre elements to elements from the bove. Then we see tht D, nd ˆD, hence D ˆD Similrly, D V, nd ˆD ˆV, therefor D V ˆD ˆV. But from bove we showed tht D ˆD, hence V ˆV Similrly, L D nd ˆL ˆD hence L D ˆL ˆD, but from bove we showed tht D ˆD, hence L ˆL Finlly, L D V + D, nd ˆL ˆD ˆV + ˆD, hence L D V + D ˆL ˆD ˆV + ˆD, but since from bove we showed tht D ˆD nd V ˆV nd L ˆL, hence this mens tht D ˆD Hence we showed tht ll the elements of L re equl to ll the elements of ˆL, i.e. L ˆL, similrly V ˆV nd D ˆD, But this is contrdiction tht the decomposition is not unique. Hence the decomposition is unique. () Strt with 6
right multiply both sides by U L D U L D U L D U U L D U U L D U U L D left multiply both sides by L Hence L L D U U L L D D U U L L D Since U is n upper tringle mtrix, then its inverse is lso n upper tringle mtrix. When upper tringle mtrices re multiplied with ech others, the result is digonl mtrix ( mtrix with non-zero elements only on the digonl). Hence U U is digonl mtrix. But D is digonl mtrix, nd the product of digonl mtrices is digonl mtrix. Hence D U U is digonl mtrix. Now looking t the RHS. L is lower tringle mtrix. Hence its inverse is lower tringle mtrix. The product of lower tringle mtrices is digonl mtrix. But D is digonl mtrix, nd the product of digonl mtrices is digonl mtrix. Hence L L D is digonl mtrix. But digonl mtrix is both n upper nd lower digonl mtrices. Hence one cn lbel one side s lower digonl mtrix nd the other side s upper digonl mtrix. (b) The min digonls contin the pivots. The off digonls re the sme, ll zeros. 7
5 Section.6, problem 5 Problem: If A hs row +rowrow, show tht A is not invertible. () Explin why Ax (,, ) cnnot hve solution (b) Which right-hnd sides (b,b,b ) might llow solution for Ax b? (c) Wht hppens to row in elimintion? Answer: One nswer is to use the row view. This leds to geometricl resoning. A row represents n eqution of some hyperplne in n dimensionl spce. For n, this represents plne. Since we re told plnes dd to third, hence we only need to consider plnes to obtin solution. The solution (if one exist) of plnes is line ( plnes if they interest mke line). Hence we cn not hve single point s solution. Hence (,, ) cn not be solution. This is the sme s sying tht mtrix whose rows (or columns) re not ll linerly independent to ech others is not invertible. Another wy to show this is by construction. If row+rowrow, then A is not invertible since when using Gussin elimintion the method will fil. To show how nd why, nd W.L.O.G., consider the following mtrix where row+rowrow Elimintion using l d gives A b c d e f + d b + e c + f Elimintion using l +d gives b c ( ) e b d f c + d b + e c + f ( d ) b c ( ) e b d f c ( ) (b + e) b +d (c + f ) c ( d ) ( +d ) b c e bd (b + e) b+db f cd (c + f ) c+cd b c e bd b+e b+db c+f b c e bd (b+e) (b+db) b c e bd f cd e bd f cd f cd c+cd f cd (c+f ) (c+cd) we see tht we re unble to eliminte this ny more. row now is the sme s row. Trying to zero out entry (,) will cuse entry (,) to become zero s well since l in this cse. Hence we will get the third row to be ll zeros. nd hence no unique solution cn result. 8
() To nswer this prt, consider the row view of Ax b. The solution is where the plnes intersects, which is point. Since first row+second rowthird row, then we only hve plnes here to consider nd not. which re row nd row only. Hence the solution is line nd not point ( plnes cn hve only hve line s solution). Hence it is not possible to hve the solution be point when we hve only plnes in dimensionl spce. (b) The right hnd side of,, would llow solution of x,, (c) In elimintion, s shown bove, row will be the sme s row. Hence it is not possible to zero out entry (,) nd finish elimintion. 9
6 Section.6, Problem 8 Problem: If the product M ABC of the three squre mtrices is invertible, then A, B,C, re invertible. Find formul for B tht involves M, A nd C solution: Since M is invertible, then Left multiply both sides by C M (ABC) (BC) A C B A right multiply both sides by A CM CC B A CM B A Hence CM A B A A B B CM A
7 Section.6, Problem 9 Problem: Find A T nd A nd ( A ) T ( nd A T ) for c A, B 9 c Solution: A T 9 A 9 ( A ) T ( ) A T ( A ) T B T c c B c c c ( B ) T c c c c c c ( ) B T ( B ) T c c c
8 Section.6, Problem 5 Problem: Verify tht (AB) T equls B T A T but these re different from A T B T A, B, AB 7 in cse AB BA (not generlly true!) how do you prove tht B T A T A T B T? Solution: ( ) T T (AB) T 7 7 T T B T A T 7 Hence (AB) T B T A T but A T B T T T 7 B T A T Now to show tht if AB BA then A T B T B T A T Since we re given tht AB BA, then tke the trnspose of ech side (AB) T (BA) T But (XY ) T Y T X T, hence pplying this rule to ech side of the bove, we obtin the result needed B T A T A T B T
9 Section.6 problem 56 Problem: If A A T nd B B T, which of these mtrices re certinly symmetric? ()A B (b)(a + B) (A B) (c)aba (d)abab Solution: If A nd B re symmetric mtrices, then A B nd A + B re symmetric. Cll this rule (). To show this, WLOG, we cn use mtrices nd write b e f + e b + f A, B A + B which is symmetric. b c f д b + f c + д e b f nd A B which is symmetric. b f c д () WLOG, we cn check on generl symmetric mtrix A : A b b + b b + bc b c b c b + cb b + c which is symmetric. Hence if A is symmetric, then A is symmetric. Similrly, if B is symmetric, then B. Hence using rule () bove, it follows tht A B is symmetric (b) Using rule (), (A + B) is symmetric nd so is (A B), hence we need to see if the product of two symmetric mtrices is lwys symmetric or not. WLOG, we cn check on symmetric mtrices. b e f b e f e + b f f + bд X, Y XY which is b c f д b c f д be + c f b f + cд NOT certinly symmetric in generl (unless f + bд be + c f ) which is not true in generl. (c)to check on ABA, from prt(b) we showed tht the product of symmetric mtrices is not necessrily symmetric, hence AB is not necessrily symmetric, Let AB X, then the bove is the sme s sking if XA is lwys symmetric when X is not necessrily symmetric nd A is symmetric. The nswer is NO. To show, WLOG, try to generl mtrices. Let X c b e where c b, nd A d f f XA д c b d e which is NOT symmetric in generl (unless f + bд ce + d f ) f f д e + b f ce + d f f + bд c f + dд (d) To check on ABAB, From (b) we showed tht the product of symmetric mtrices is NOT necessrily symmetric, hence AB is NOT necessrily symmetric. Hence this is sking if the product of mtrices, both not necessrily symmetric is certinly symmetric or not. Hence the nswer is NOT symmetric. (if the product of symmetric mtrices is not necessrily symmetric, then the product of mtrices who re not symmetric is lso not necessrily symmetric).
Section.7, Problem Problem: Write out the LDU LDL T fctors of A in eqution (6) when n. Find the determinnt s the product of the pivots in D. Solution: for n, A To strt LU decomposition, write the ugmented mtrix l l l,hence 5 U 5 nd L nd now we need to mke the digonl elements of U be ll s, hence the D mtrix is nd the V mtrix is D 5 Hence V
LDV 5 which is equl to LDL T Now the determinnt of A cn be found s the products of the pivots, which re long the digonl of the D mtrix 5 5 5
Section.7, Problem Problem: Find the 5 5 mtrix A o (h 6 ) tht pproximtes d u dx f (x) with boundry conditions u () u () replce these boundry conditions by u u nd u 6 u 5. Check tht your A o times the constnt vector C,C,C,C,C yields zero. A o is singulr. Anlogously, if u (x) is solution of the continuos problem, then so is u (x) + C Solution: Using the pproximtion d u dx shown in this digrm u(x+h) u(x)+u(x h) h we write the bove ODE for ech internl point s Hence we hve the following 5 equtions (one eqution generted per one internl node) u + u u h f (h) u + u u h f (h) u + u u h f (h) u 5 + u u h f (h) u 6 + u 5 u h f (5h) Since the boundry condition given is u (), this mens tht the rte of chnge of u t the boundry is zero (insultion). Hence the vlue of the dependent vrible does not chnge t the boundry. This is nother wy of sy tht u u. The sme on the other side, where u 6 u 5. Doing these replcement into the bove equtions we obtin the following 6
u + u h f (h) u + u u h f (h) u + u u h f (h) u 5 + u u h f (h) u 5 u h f (5h) Written in Mtrix form, nd given h 6 u u u u u 5 6 f (h) f (h) f (h) f (h) f (5h) Now Check tht A B where B is some constnt vector C,C,C,C,C C C C C C 7
Section.7, Problem. Problem: Compre the pivots in direct elimintion to those with prtil pivoting for A (this is ctully n exmple tht needs rescling before elimintion) Solution:. l. Direct elimintion Prtil pivoting. Switch rows first, now pply elimintion. l.. The pivots in direct elimintion re {., }, while when using prtil pivoting {, } 8