Chper 4 Inrouion Thi hper i ou generlizing he onep you lerne in hper o pe oher n hn R Mny opi in hi hper re heoreil n MATLAB will no e le o help you ou You will ee where MATLAB i ueful in hper 4 n how o ue i in hoe ple You will lo lern how o ue MATLAB o ifferenie n inegre There i one i ie floing hrough mo hi l: Mny queion in Liner Alger n e nwere y olving e of equion MATLAB n e ue o e up he equion n n hen e ue o olve hem Liner Cominion [4] In he previou hper you lerne h given e of veor (uully i) you n uil more veor wih liner ominion of he originl veor The key ie o unern hper 4 i h hi ie n e pplie o oher ype of mhemil oje For emple liner ominion of mrie re mrie liner ominion of polynomil re polynomil liner ominion of oninuou funion re oninuou funion e We n ue MATLAB o eermine he orre oeffiien o ue when uiling he liner ominion Here i 4 emple #9: Le A Show h A i liner ominion of A n I A epline in he e we nee o fin lr n uh h To ue MATLAB i i eier o hnge he equion o h one ie i We will ue MATLAB o olve >> ym >> *[ ; ] *[ ; ] - [ ; ]
[ - -] [ *- *-] Thi give u he following equion: In your he you n ee h n o If he yem of equion w more omplie you know from previou hper how o ue MATLAB o olve yem of equion Prolem 5 8 Epre liner ominion of 7 8 Epre liner ominion of 8 4 Be [4] To fin i for given pe o he following: 4 n n 7 4 8 ) Mke generi oje ) Wrie own he relion() he generi oje mu ify ) Ue MATLAB o eermine e of equion he prmeer nee o ify 4) Ue MATLAB o olve he e of equion (if neery) 5) Prmeerize your oluion n plug i k ino he generi oje ) For ou he prmeer o eermine your i elemen Here i 4 emple #7: Fin i of he pe V of ll mrie B h ommue wih A Following your uhor fir we uil generi oje ()In hi e he generi oje i Then we wrie own he relion h i nee o ify
() Here To ue MATLAB i i eier o wrie hi () Now ue MATLAB o ge he equion >> ym >> [ ; ]*[ ; ] - [ ; ]*[ ; ] [ *- *-] [ *-*-* -*] The equion re (4) Ue MATLAB o olve he yem Here we look he row reue ehelon form of he ugmene mri >> r(rref([ - ; -; - - ; - ])) / - -/ The nonrivil equion re
(5) The free vrile re n o we ge he generl oluion Plugging k ino our generi oje we ge () So i i If you prefer your e o no hve frion you n muliply he fir elemen y o ge your i Noe h hi i ifferen i hn he one oine y your eook Le o one more Here i 4 #: Fin i for he upe of P where { p ( ) : p () p()} () p ( ) () p ( ) p() We will wrie hi p ( ) p() () MATLAB rik: MATLAB give ll of he vrile in he me weigh If you ju ol MATLAB o plug in i woul no know wheher he w uppoe o reple he or Ue he u ommn o plug vlue for vrile ino funion MATLAB rik: Ue iff o fin he erivive of funion >> ym >> p *^ * ; >> p_prime iff(p); >> u(p_prime) - u(p) % Thi i p ()-p() -*-- 4
(5) The equion i n re he free vrile The prmeerize oluion i n he generi oje i ( ) ( ) ( ) ( ) ( ) () A i i ( ) eer looking i ( ) Muliplying eh polynomil y give u he Prolem: 4 #4 MATLAB rik: Ue he in ommn o inegre (Hin: >> ym >> p *^ * ; >>in(p) ) A mgi qure i n n n mri where he n numer long ny row olumn n igonl up o he me onn um Try >> mgi() o ee n emple Try >> mgi() one() o ee noher Fir onvine yourelf h he e of ll mgi qure form liner pe Now fin i for hi pe (Hin: Your generi oje will hve 9 prmeer) 4 Iomorphim [4] An iomorphim i liner rnformion h how h wo liner pe hve he me ruure Given liner rnformion i i imporn o eermine wheher or no i i n iomorphim The op of pg 9 your eook h nie flow hr o help you eermine wheher given liner rnformion i n iomorphim Unforunely MATLAB n o ll of hi for u o we ele for ju pr We ue he following f Here i 4 # Given T liner rnformion from V o W T i n iomorphim iff im(v) im(w) n ker(t) { } 5
Deermine wheher ) ( M M T i n iomorphim where : T R R Fir of ll noie h V n W hve he me imenion (in f hey re he me pe) We nee o fin ker(t) In oher wor we nee o fin ll M uh h (M ) T >> ym >> M [ ; ]; >> M*[ ; ] [ * **] [ * **] Thi men i in ) ker(t iff We hve o ee if h ny oluion eie Ue MATLAB gin >> r(rref([ ; ; ; ])) So he nonrivil equion re
Sine n re he free vrile we n prmeerize he yem y By eing you n ee h he yem h nonrivil oluion So ker(t) { } n hene T ( M ) M i no n iomorphim Prolem: 4 4 #7 4 4 #5 5 The Mri of Liner Trnformion [4] The key ie for eion 4 i h every finie imenionl veor pe i iomorphi o n R for ome n Moreover given i for your finie imenionl veor pe hen he iomorphim i eremely ey o uil Before we go on le o n emple Suppoe we re uing he i ( ) for P Sine P i h imenion P i iomorphi or The iomorphim i he unique liner rnformion where Uing hi ie you n ee h every liner rnformion from finie imenionl n veor pe o ielf n e looke liner rnformion from R or n n n Beue liner rnformion from R o R n e repreene y mri we n lo ue mri o repreen ny liner rnformion from ny finie imenionl veor pe o ielf Here i ne emple h will en wih wy o lule e in( ) wihou uing inegrion y pr You on relly nee MATLAB for hi one u i i worh going hrough Le V pn( e o( ) e in( )) Le T : V V e efine y T ( f ) f We ienify V wih R y he oiion 7
e o() e in() We uil up he mri repreening T olumn y olumn MATLAB rik: e i repreene ep() >> ym >> iff(ep()*o()) ep()*o()-ep()*in() In oher wor T ( e o( )) e o( ) e in( ) Looking hi in erm of Thi ell u h he fir olumn of he mri repreening T i R >> iff(ep()*in()) ep()*in()ep()*o() In oher wor T ( e in( )) e o( ) e in( ) Looking hi in erm of R Thi ell u h he eon olumn of he mri repreening T i Puing i ll ogeher he mri repreening T i Sine T i he iffereniion funion T inegrion We ue MATLAB o fin he mri h repreen T >> T [ ; - ]; >> r(inv(t)) / -/ / / 8
Sine e in() we n fin e in( ) uing he ompuion Inerpreing we ee h e in( ) e o( ) e in( ) C Here one more emple: Fin mri o repreen he liner rnformion o P wih repe o he i ( ) T ( f ) f f f from P We mke he oiion n ompue he mri one olumn ime MATLAB rik: MATLAB oe no ifferenie onn funion in he oviou wy Noe he yn elow >> ym >> ; >> iff() iff(iff()) % Thi i he rnformion T pplie o he onn funion f() SineT () he fir olumn of he mri repreening T i >> ; 9
>> iff() iff(iff()) %MATLAB know wh o o when he funion h he vrile SineT ( ) he eon olumn of he mri repreening T i >> ^; >> iff() iff(iff()) ^* SineT ( ) he hir olumn of he mri repreening T i Thu he mri repreening T wih repe o he i ( ) i Wh if we wne he mri repreening T wih repe o more eoi i? You oul o i y hn like we i ove or you oul o like ( ) omehing o he nwer you oine for he i ( ) e eplore in he ne eion Prolem 5 4 #4 5 4 #49 Thi eon pproh will Chnge of Bi [4] The l eion ene wih n nwer o queion ou he i ( ) Now we wn o ue your mri o nwer he me queion wih repe o he i Lukily we n ue mri o rnform from one i o noher ( )
Then we n omine he hnge of i mri n he mri foun in he l eion wih mri mulipliion Fir we uil he hnge of i mri for hnging from i B ( ) o i S ( ) A uul we o i olumn y olumn The fir enry in B i The oorine mri of relive o S i o he fir olumn of he hnge of i mri i The eon enry in B i The oorine mri for relive o S i o he eon olumn of he hnge of i mri i The hir enry in B i o he hir olumn of he hnge of i mri i The hnge of i mri from B o S i The hnge of i mri in he oher ireion (from S o B) i he invere of Now we ll uil he mri for he rnformion relive o ( ) Before we go on le review wh we hve o fr:
Relive o he i ( ) he mri repreening he rnformion T ( f ) f f f i Cll hi mri A The hnge of i mri from he i ( ) o he i ( ) Cll hi mri S i The key ie for uing hee mrie o ompue he mri h repreen he rnformion T ( f ) f f f relive o he i ( ) i o hink ou how you woul ully o he ompuion yourelf given he oorine of n : elemen in P relive o ( ) ) Ue S o hnge o he i ( ) ) Ue A o ompue T ) Ue S o hnge your nwer k o oorine relive o ( ) In ymol given B ) S ) A S ) S A S So he mri h oe he jo i S A S >> A [ ; ; ];
>> S [ ; ; ]; >> inv(s)*a*s Wrpping i up: The mri repreening he rnformion o i P wih repe o he i ( ) T ( f ) f f f from P Prolem 4 #4 4 #4