EE448/58 Vrsion. John Stnsby Chatr Function of a atrix t f(z) b a comlx-valud function of a comlx variabl z. t A b an n n comlxvalud matrix. In this chatr, w giv a dfinition for th n n matrix f(a). Also, w show how f(a) can b comutd. ur aroach rlis havily on th Jordan canonical form of A, an imortant toic in Chatr 9. W do not striv for maximum gnrality in our xosition; instad, w want to gt th job don as simly as ossibl, and w want to b abl to comut f(a) with a minimum of fuss. In th litratur, a numbr of quivalnt aroachs hav bn dscribd for dfining and comuting a function of a matrix. Th conct of a matrix function has many alications, scially in control thory and, mor gnrally, diffrntial quations (whr x(at) and ln(a) lay rominnt rols). Function of an n n atrix t f(z) b a function of th comlx variabl z. W rquir that f(z) b analytic in th disk z < R. Basically (and for our uross), this is quivalnt to saying that f(z) can b rrsntd as a convrgnt owr sris (Taylor s Sris) f( z) c + cz + cz + (-) for z < R, whr th c k, k, ar comlx-valud constants. Formal substitution of n n matrix A into th sris (-) yilds th symbolic rsult f( A) c + ca + ca +. (-) W say that this matrix sris is convrgnt (to an n n matrix f(a)) if all n scalar sris that mak u f(a) ar convrgnt. ow rcall Thorm 4- which says, in art, that vry lmnt of a matrix has an absolut valu that is boundd abov by th -norm of th matrix. Hnc, ach lmnt in f(a) is a sris that is boundd in magnitud by th norm f( A). But th norm of a CH.DC ag -
EE448/58 Vrsion. John Stnsby sum is lss than, or qual to, th sum of th norms. This lads to th conclusion that (-) convrgs if f( A) c + c A + c A + c I + c A + c A + c3 3 A + (-3) c I + c A + c A + c3 A 3 + convrgs. ow, th last sris on th right of (-3) is an "ordinary" owr sris; it convrgs for all n n matrics A with A < R. Hnc, w hav argud that f(a) can b rrsntd by a sris of matrics if A is in th rgion of convrgnc of th scalar sris (-). At th nd of this chatr, w will gt a littl mor sohisticatd. W will argu that th sris for f(a) convrgs (i.. f(a) xists) if all ignvalus of A li in th rgion of convrgnc of (-). That is, f(a) convrgs if λ k < R, whr λ k, k n, ar th ignvalus of A. In addition, th sris (-) divrgs if on, or mor, ignvalus of A li outsid th disk z < R. ur mthod of dfining f(a) rquirs that function f(z) b analytic (so that it has a Taylor's sris xansion) in som disk cntrd at th origin; hr, w limit ourslvs to working with "nic" functions This xcluds from our analysis a numbr of intrsting functions lik f(z) z /n, n >, and f(z) ln(z), both of which hav branch oints at z. Whil w do not covr it hr, a matrix-function thory for ths "mor comlicatd" functions is availabl. Somtims, f(a) is "xactly what you think it should b". Roughly saking, if th scalar function f(z) has a Taylor's sris that convrgs in th disk z < R containing th ignvalus of A, thn f(a) can b calculatd by "substituting" matrix A for variabl z in th formula for f(z). For xaml, if f(z) (+z)/(-z), thn f(a) (I + A)(I - A) -, at last for matrics that hav thir ignvalus insid a unit disk cntrd at th origin (actually, as can b shown by analytic continuation, this xaml is valid for all matrics A that do not hav a unit ignvalu). Whil this "dirct substitution" aroach works wll with rational (and othr siml) functions, it dos CH.DC ag -
EE448/58 Vrsion. John Stnsby not hl comut transcndntal functions lik sin(a) and cos(a). W ar familiar with many lmntary functions that hav Taylor s sris xansions that ar convrgnt on th ntir comlx lan. For xaml, for any n n matrix A, w can writ A k I + A / k! k k k cos( A) I + ( ) A / ( k)! k (-4) k k sin( A) I + ( ) A / ( k )!, k to cit just a fw. Also, as can b vrifid by th basic dfinition givn abov, many idntitis in th variabl z rmain valid for a matrix variabl. For xaml, th common Eulr s idntity ja cos( A ) + j sin( A ) (-5) is valid for any n n matrix A. Examl Th following atab xaml illustrats a Taylor s sris aroximation to x(a) whr A. 5. 6. Th atab rogram listd blow comuts a tn-trm aroximation and comars th rsult with xm(a), an accurat routin intrnal to atab. % Entr th matix A > A [.5 ;.6] CH.DC ag -3
EE448/58 Vrsion. John Stnsby.5. A.6 % St U Working atix B A > B A; % St atrix f to th Idntity atrix > f [ ; ]; % Sum Tn Trms of th Taylor s Sris > for i : > f f + B; > B A*B/(i+); > nd f % rint-ut th Tn-Trm Aroximation to EX[A].6487.734 f.8 % Us atab s Exonntial atix Function to Calculat EX(A) > xm(a).6487.734 ans.8 % ur Tn-Trm Taylor s Sris Aroximation is % Accurat to at ast 5 Dcimal Digits!!!! atab has svral mthods for comuting x[a]. For xaml, atab s xm(a) function uss a Taylor s sris to comut th xonntial. Th Taylor s sris rrsntation is good for introducing th conct of a matrix function. Also, many lmntary analytical rsults com from th Taylor s xansion of f(a). Howvr, dirct imlmntation of th Taylor s sris is a slow and inaccurat way for comuting f(a). Thorm - t b an n n nonsingular matrix, and dfin A - A A A -. Thn, function f(a) xists if, and only if, f(a ) xists. Furthrmor, w can writ - - f(a) f(a ) f(a ). (-6) roof This rsult is obvious onc th Taylor s sris of f(a - ) is writtn down. Thorm - t A b a block diagonal matrix CH.DC ag -4
EE448/58 Vrsion. John Stnsby A A A A, (-7) whr A k is an n k n k squar matrix (a block can b any siz, but it must b squar). Thn w hav f( A) f( A) f( A) f( A ). (-8) roof: bvious from xamining th Taylor s Sris of f(a). t A b th Jordan canonical form of n n matrix A. W can aly Thorms - and - to A A - to obtain f( A) f( J ) f( J ) f( J ), (-9) whr J k, k, ar th Jordan blocks of th Jordan form for A. Hnc, to comut f(a), all w nd to know is th Jordan form of A (i.., th blocks J k, k ) and how to comut f(j k ), whr J k is a Jordan block. Comuting f(j), th Function of a Jordan Block As suggstd by (-9), function f(a) can b comutd onc w know how to comut a function of a Jordan block. Sinc a function of a block can b xrssd as an infinit sris of owrs of a block (think of Taylor s sris), w rally nd to know a siml formula for intgr owrs of a block (i.., w nd to know a siml rrsntation for J, th th owr of block J). CH.DC ag -5
EE448/58 Vrsion. John Stnsby But first, considr comuting H, whr n n matrix H has th form H, (-) that is, n n matrix H has s on its first surdiagonal and zros vrywhr ls. To s th gnral trnd, lt s comut a fw intgr owrs H. Whn n 4, w can comut asily H, H, 3 H, H, 4. (-) otic that th all-on surdiagonal is on th th surdiagonal of H. For th 4 4 xaml illustratd by (-), th rsult bcoms zro for 4. Th gnral cas can b infrrd from this xaml. Considr raising n n matrix H (givn by (-)) to an intgr owr. For < n, th rsult would hav all s on th th surdiagonal and zro lswhr. For n, th rsult is th n n all zro matrix. For an intgr >, w can comut J, whr J is an n n Jordan block associatd with CH.DC ag -6
EE448/58 Vrsion. John Stnsby an ignvalu λ. First, not that J can b writtn as J λi + H, (-) whr I is an n n idntity matrix, and H is givn by (-). Aly th Binomial xansion F ( x y) ( ) k x k y k x x y! x + y k H G I K J + + + + y (-3) to (-) and writ J k k k k H I H λ λ λ ( ) λ H + H. (-4)! F ( ) H G I λι + Η K J + + + n th far right-hand sid of this xansion, th st trm is th diagonal, th nd trm is th first surdiagonal, th 3 rd trm is th scond surdiagonal, and so forth. If < n, th last trm is th th surdiagonal; on th othr hand, if n, th last trm is zro. Finally, not that (-4) can b writtn as J n λ λ [ ] λ ( ) ( ) ( [ n λ n ])! ( )! [ n λ λ ] ( ) ( [ n λ n 3]) ( )! [ n λ 3] ( ) ( [ n λ n 3 4]) ( )! λ λ.(-5) ot that λ is on th diagonal, λ on th st surdiagonal, ( ) λ on th scond! CH.DC ag -7
EE448/58 Vrsion. John Stnsby surdiagonal, 3 ( )( ) λ on th third surdiagonal, and so on until th sris 3! trminats or you run out of surdiagonals to ut trms on. Th matrix f(j) can b comutd asily with th aid of (-5). Exand f(j) in a Taylor s sris to obtain f( J) c + cj + cj + (-6) From (-5) and (-6) w can s that f( J) ( n ) ( n ) f( λ) f ( λ) f ( λ) /! f ( λ) / ( n )! f ( λ) / ( n )! ( n 3) ( n ) f( λ) f ( λ) f ( λ) / ( n 3)! f ( λ) / ( n )! ( n 4) ( n 3) f( λ) f ( λ) / ( n 4)! f ( λ) / ( n 3)!, (-7) f( λ) f ( λ) f( λ) an n n matrix that has f(λ) on it main diagonal, f ( λ ) on its first surdiagonal, f ( λ) /! on its scond surdiagonal, and so on (rims dnot drivativs, and f (k) dnots th k th drivativ). Examl Calculat f(j) for th function f(λ) λt. Dirct alication of (-7) roducs f( J) x[ Jt] λt λt λt n λt n λt t t /! t / ( n )! t / ( n )! λt λt n 3 λt n λt t t / ( n 3)! t / ( n )! λt n 4 λt n 3 λt t / ( n 4)! t / ( n 3)! λt λt t λt CH.DC ag -8
EE448/58 Vrsion. John Stnsby Examl Considr th matrix A λ λ λ λ λ If f(λ) λt, find f(a). ot that A contains two Jordan blocks. Hnc, th rvious xaml can b alid twic, onc to ach block. Th rsult is At f( A) λt λt t λt ½t λt λt t λt λt λt t λt Examl From th nd of Chatr 9, considr th xaml A 3 whr matrix, J, J and J 3 ar J J J, 3, J, J, J3 t's comut x(a) by using th information givn abov. Th answr is CH.DC ag -9
EE448/58 Vrsion. John Stnsby x( A) whr x( J) x( J ) ½ x( J ) x( J ) 3, x(j ), x(j ) 3. t's ut it all togthr by using atab to do th "havy lifting". % First ntr th 6x6 transformation matrix into atab > [ ; - ; ; - - ; ; -]; % Entr th 6x6 Jordan canonical form > x(); >EJ [ / ; ; ; ; ; ]; % Calculat x(a) 4.778-7.389 4.778 4.778 > EJ inv() 7.389 7.389 7.389 7.389 7.389-7.389-7.389 4.945 3.945 3.945 4.945 % Calculat x(a) by using atab's built-in function xm( ) > A [3 - ; - - ; ; - -; ; ]; 4.778-7.389 4.778 4.778 > xm(a) 7.389 7.389 7.389 7.389 7.389-7.389-7.389 4.945 3.945 3.945 4.945 % Th rsults using th Jordan form ar th sam as thos obtaind by using atab's xm % function! Examl For th A matrix considrd in th last xaml, w can calculat sin(a). In trms of th transformation matrix and Jordan form givn in th rvious xaml, th answr is sin(a) CH.DC ag -
EE448/58 Vrsion. John Stnsby sin(jordan Form of A) -. Th sin of th Jordan form is sin F HG J J J 3 I, KJ sin( ) cos( ) ½sin( ) sin( ) cos( ) sin( ) sin( ) cos( ) sin( ) sin( ) A final numrical rsult can b obtaind by using atab to do th mssy work. % Entr th 6x6 matrix into atab > [ ; - ; ; - - ; ; -]; % Entr th 6x6 matrix sin[jordan Form] (i.., sin of Jordan Canonical Form)into atab >s sin(); >c cos(); >SinJ [s c -s/ ; s c ; s ; s c ; s ; ]; % Calculat sin(a) >sina *SinJ*inv().493.46 -.354 -.354 SinA -.46.354 -.493 -.493.993 -.46 -.46.993.46.46.4546.4546.4546.4546 % To vrify this rsult, t's calculat sin(a) by using atab s built-in functions to comut SinA % imag(xm(i*a)) >SinA imag(xm(i*a)).493.46 -.354 -.354 SinA -.46.354 -.493 -.493.993 -.46 -.46.993.46.46.4546.4546.4546.4546 Th rsults ar th sam! CH.DC ag -
EE448/58 Vrsion. John Stnsby At th bginning of this chatr, w argud that f(a) can b rrsntd by a sris of matrics if A is in th rgion of convrgnc of (-). ow, w gt a littl mor sohisticatd. W argu that th sris for f(a) convrgs if th ignvalus of A li in th rgion of convrgnc of (-). Thorm -3 If f(z) has a owr sris rrsntation f( z) ckz k k (-8) in an on disk z < R containing th ignvalus of A, thn k f( A) c k A k (-9) roof: W rov this thorm for n n matrics that ar similar to a diagonal matrix (th mor gnral cas follows by adating this roof to th Jordan form of A). t transformation matrix diagonaliz A; that is, lt D diag(λ,..., λ n ) - A. By Thorm - it follows that f A diag f diag k k ( ) ( ( ), )) (, k k λ, f( λn c λ, c λn ) k k F HG I KJ k k k ckd ck( D ) cka. k k k (-) If (-8) divrgs whn valuatd at th ignvalu λ i (as would b th cas if λ i > R), thn sris (-9) divrgs. Hnc, if on (or mor) ignvalu falls outsid of z < R, thn (-9) divrgs. CH.DC ag -