6-1 ��������������������?

@ӯx} $A$ ϯx}iܦ $A^{-1}$AiUCG

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

Hint
  • ub $A$ }ɡA$A^{-1}$ ~sbC
  • Y $A^{-1}$ sbAh $A$ ٬ SingularC
  • `NGoA\huʥNƪMWCYLuHBBFv½ĶAhH^WDAHKFNC

MATLAB inv OiΩpϯx}AҦpڭ̥iHp@ 4x4 Pascal }ϯx}AöiApUG

Example 1: 06-uʥN/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 x}CȬ 1A]ϯx}ơC

ѩpǫצA] $I1 = A*B$ P $I2 = B*A$ |@ӳx}A~t۷pA~tqi maxDiff = max(max(abs(eye(4)-I1))) ӭpAp $10^{-14}$C

Yx} $A$ Singular ]Yϯx}sb^Ahbϥ inv OɡA|ĵiTAҦpG

Example 2: 06-uʥN/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-uʥN\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
  • x} A Singulardet(A)=0

px} $A$ CAi det OA|ҦpUG

Example 3: 06-uʥN/det01.mA = [1 3 4; -3 -4 -1; 2 2 5]; d = det(A)d = 29.0000

Crammer Rule ix} A CMϯx}UCYG

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

䤤 $|A|$ N CA$adj(A)$ N $A$ Adjoint MatrixAyܻAY $A$ Ưx}Ah $|A|$ W $A^{-1}$ Ưx}AipUG

Example 4: 06-uʥN/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
  • M Crammer Rule Φ۷²AäAΩƭȹBAMATLAB bpϯx}ɡAäϥ Crammer RuleAӬOϥΦUدx}ѪkC

YN inv(A) HzΦ]Rational FormatAYlMOƪơ^ӪܡAiıXMCYAҦpG

Example 5: 06-uʥN/det03.mA = [1 3 4; -3 -4 -1; 2 2 5]; format rat % HzΦܼƭ inv(A) format short % ^w]ƭȪܧΦans = -18/29 -7/29 13/29 13/29 -3/29 -11/29 2/29 4/29 5/29

qo̥iHܩ㪺ݥXAinv(A) CӤȡANO det(A)C


MATLAB{]pGig