6-1 ?嶇煩???琛屽?寮?

痻皚 $A$ は痻皚ボΘ $A^{-1}$ウ骸ì单Α

$$ \left\{ \begin{matrix} AA^{-1}=I\\ A^{-1}A=I \end{matrix} \right. $$

Hint
  • Τ $A$ よ皚$A^{-1}$ 
  • 璝 $A^{-1}$ ぃ玥 $A$ 嘿 Singular
  • 猔種セ彻瞣疉砛絬┦计盡Τ迭璝礚獺懂笷ぇいゅ陆亩玥ご璣ゅ迭迭ぃ笷種

MATLAB  inv ノ璸衡は痻皚ㄒи璸衡 4x4  Pascal よ皚は痻皚秈︽喷衡

Example 1: 06-絬┦计/inv01.mA = pascal(4); % 玻ネ 4x4  Pascal よ皚 B = inv(A) I1 = A*B I2 = B*A maxDiff=max(max(abs(eye(4)-I1)))B = 4.0000 -6.0000 4.0000 -1.0000 -6.0000 14.0000 -11.0000 3.0000 4.0000 -11.0000 10.0000 -3.0000 -1.0000 3.0000 -3.0000 1.0000 I1 = 1.0000 0 0 0 0 1.0000 0 0 0 0 1.0000 0 -0.0000 -0.0000 0.0000 1.0000 I2 = 1.0000 0 0 -0.0000 0 1.0000 0 -0.0000 0 0 1.0000 0.0000 0 0 0 1.0000 maxDiff = 7.1054e-015

Hint
パ Pascal 痻皚︽Α 1ㄤは痻皚ぇじА俱计

パ璸衡诀ず场弘非Τ $I1 = A*B$ 籔 $I2 = B*A$ 常ぃ穦Ч单虫痻皚ㄤ粇畉讽粇畉秖パ maxDiff = max(max(abs(eye(4)-I1))) ㄓ璸衡 $10^{-14}$

璝痻皚 $A$  Singular ㄤは痻皚ぃ玥ㄏノ inv 穦玻ネ牡癟ㄒ

Example 2: 06-絬┦计/inv02.mA = [1 2 3; 4 5 6; 7 8 9]; B = inv(A){Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.541976e-018.} > In <a href="matlab: opentoline('d:\users\jang\books\matlabProgramming4guru\example\06-絬┦计\inv02.m',2,1)">inv02 at 2</a> In <a href="matlab: opentoline('d:\users\jang\books\goWriteOutputFile.m',75,1)">goWriteOutputFile>dummyFunction at 75</a> In <a href="matlab: opentoline('d:\users\jang\books\goWriteOutputFile.m',52,1)">goWriteOutputFile at 52</a> B = 1.0e+016 * -0.4504 0.9007 -0.4504 0.9007 -1.8014 0.9007 -0.4504 0.9007 -0.4504

Hint
  • 痻皚 A  Singulardet(A)=0

饼璸衡痻皚 $A$ ︽Αノ det 羭ㄒ

Example 3: 06-絬┦计/det01.mA = [1 3 4; -3 -4 -1; 2 2 5]; d = det(A)d = 29.0000

パ Crammer Rule 痻皚 A ︽Α㎝は痻皚Τ闽玒Α

$$A^{-1}=\frac{adj(A)}{|A|}$$

ㄤい $|A|$  ⑾ ︽Α$adj(A)$  $A$  Adjoint Matrix传杠弧璝 $A$ 俱计痻皚玥 $|A|$  $A^{-1}$ ゲ俱计痻皚喷谍

Example 4: 06-絬┦计/det02.mA = [1 3 4; -3 -4 -1; 2 2 5]; det(A)*inv(A)ans = -18.0000 -7.0000 13.0000 13.0000 -3.0000 -11.0000 2.0000 4.0000 5.0000

Hint
  • 瘤礛 Crammer Rule Α讽弘虏ぃ続ノ计笲衡MATLAB 璸衡は痻皚ぃㄏノ Crammer Ruleτ琌ㄏノ贺痻皚だ秆よ猭

璝盢 inv(A) Τ瞶ΑRational Formatだ㎝だダ常琌俱计だ计ㄓボョ诡谋ウ㎝︽Α闽玒ㄒ

Example 5: 06-絬┦计/det03.mA = [1 3 4; -3 -4 -1; 2 2 5]; format rat % Τ瞶Αボ计 inv(A) format short % э箇砞计ボΑans = -18/29 -7/29 13/29 13/29 -3/29 -11/29 2/29 4/29 5/29

眖硂柑陪inv(A) い–じだダ碞琌 det(A)


MATLAB祘Α砞璸秈顶絞