½u©Ê¥N¼Æ¤¤³Ì«nªº°ÝÃD¡A§Y¬O¸Ñ¨M½u©ÊÁp¥ß¤èµ{¦¡¡C¤@²Õ½u©ÊÁp¥ß¤èµ{¦¡¥i¥Î¯x°}ªí¥Ü¦p¤U¡G
$$Ax = b$$¨ä¤¤ $A$ ¬O¤wª¾¯x°}¡A$b$ ¬O¤wª¾¦æ¦V¶q¡A¦Ó $x$ «h¬O¥¼ª¾¦æ¦V¶q¡C¬°Â²¤Æ°_¨£¡A§ÚÌ¥i¥H°²³] $A$¡B$x$¡B$b$ ªººû«×¤À§O¬O m¡Ñn¡Bn¡Ñ1¡Bm¡Ñ1¡A ¨ä¤¤ m ¥Nªí¤èµ{¦¡ªº¼Æ¥Ø¡An «h¬O¥¼ª¾¼Æªº¼Æ¥Ø¡A¥i¥H¤À¦¨¤TºØ±¡ªp¨Ó°Q½×¡G
- Y m = n¡A¥Nªí¤èµ{¦¡ªºÓ¼Æ©M¥¼ª¾¼ÆªºÓ¼Æ¬Ûµ¥¡A¦¹®É³q±`·|¦³¤@²Õ¸Ñ $x$ º¡¨¬ $Ax=b$¡C
- Y m > n¡A¥Nªí¤èµ{¦¡ªºÓ¼Æ¤j©ó¥¼ª¾¼ÆªºÓ¼Æ¡A¦¹®É³q±`µL¤@¸Ñ¥iº¡¨¬ $Ax=b$¡A¦ý§ÚÌ¥iÂà¦Ó¨D¨ú³Ì¤p¥¤è¸Ñ¡]Least-Squares Solution¡^$\hat{x}$¡Aº¡¨¬ $\hat{x}=\arg \min_x |Ax-b|^2$¡C
- Y m < n¡A¥Nªí¤èµ{¦¡ªºÓ¼Æ¤p©ó¥¼ª¾¼ÆªºÓ¼Æ¡A¦¹®É³q±`¦³µL¦h²Õ¸Ñ $x$ ¥iº¡¨¬ $Ax=b$¡A§ÚÌ¥i´M¨D¤@°ò¥»¸Ñ¡]Basic Solution¡^$x$¡A¨Ï±o $x$ ³Ì¤Ö¥]§t m-n Ó¹s¤¸¯À¡C
MATLAB ´£¨Ñ¤@Ӥϱ׽u¹Bºâ¡]Back Slash Operator¡A§Y¡u\¡v¡^¨Ï±o x=A\b ¯àº¡¨¬¤Wz¤TºØ±¡ªp¡A¦¹¤Ï±×½u¹Bºâ¤SºÙ¡u¥ª°£¡v¡]Left Division¡^¡C ¦P²z¡AMATLAB ¤]´£¨Ñ¤F±×½u¹Bºâ¡]Slash Operator¡A§Y¡u/¡v¡^©Î¡u¥k°£¡v¡]Right Division¡^¡A¥H¹ï¥I $xA=b$ ªº¤èµ{²Õ¡]$x$¡B$A$¡B$b$ ªººû«×¤À§O¬O 1¡Ñm¡Bm¡Ñn¡B1¡Ñn¡^¡C
¾ã²z¡GMATLAB ªº¥ª°£©M¥k°£ Áp¥ß¤èµ{¦¡§Î¦¡ MATLAB ¸Ñªk $Ax=b$ ¥ª°£¡Gx = A\b $xA=b$ ¥k°£¡Gx = b/A ¦b¤Wªí¤¤¡A±ý¸Ñ $Ax=b$ ©Î $xA=b$¡A§ÚÌ¥i¥H·Q¹³¦bµ¥¸¹¨âÃä¦U°£¥H $A$¡A¨Ã¨Ì $A$ ªº¦ì¸m¤À§O¨ú¥Î¡u¥ª°£¡v©Î¡u¥k°£¡v¡C
¥Ñ©ó $xA=b$ ©M $A^Tx^t=b^T$ ¬Oµ¥®Äªº¡A¦]¦¹ b/A = (A'\b')'¡A©Ò¥H¦b¤U±ªº°Q½×¡A§Ú̧¡¥H¡u¥ª°£¡v¨Ó¥Nªí MATLAB ¸Ñ½u©Ê¤èµ{¦¡ªº¤èªk¡C¥H¤U¬O´XӨϥΡu¥ª°£¡vªº¨Ò¤l¡C
¦b¤W¨Ò¤¤¡AA ¬O¤@Ó 3¡Ñ3 ªº¸U±o¹Ú¯x°}¡]Vandermende Matrix¡^¡A¦]¦¹ x = A\b ±o¨ì¤@²Õ°ß¤@¸Ñ¡C ¡]¸U±o¹Ú¯x°}ªº¤@¯ë§Î¦¡¬° $V= \begin{bmatrix} 1 & \alpha_1 & \alpha_1^2 & \dots & \alpha_1^{n-1} \\ 1 & \alpha_2 & \alpha_2^2 & \dots & \alpha_2^{n-1} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 1 & \alpha_m & \alpha_m^2 & \dots & \alpha_m^{n-1} \\ \end{bmatrix}$¡A·í $m=n$ ®É¡A¨ä¦æ¦C¦¡¥i¥Hªí¥Ü¦¨ $det(V)=\prod_{\substack{1 \le i < j \le n}} (\alpha_j - \alpha_i)$¡A¦]¦¹¦pªG $\alpha_i \neq \alpha_j, \forall i \neq j$¡A¨ä¦æ¦C¦¡±N¤£·|µ¥©ó¹s¡C¡^
·í m > n ®É¡A¡u¥ª°£¡v¥i¥H§ä¨ì³Ì¤p¥¤è¸Ñ¡CÁ|¨Ò¦p¤U¡G
¦b¤W¨Ò¤¤¡A§Ú̦³ 3 Ó¤èµ{¦¡¡A¦ý«o¥u¦³ 2 Ó¥¼ª¾¼Æ¡A¦¹ 3 Ó¤èµ{¦¡¦b X-Y ¥±¨Ã¥¼¥æ©ó¤@ÂI¡A¬GÄY®æ¦a»¡¡A¦¹¤èµ{²ÕµL¸Ñ¡A¦Ó MATLABªº¡u¥ª°£¡v§ä¨ìªº $x$ ¬°³Ì¤p¥¤è¸Ñ¡A¥i¥H¨Ï±o $|Ax-b|^2$ ¬°³Ì¤pÈ¡C
·í m < n ®É¡A¡u¥ª°£¡v¥i¥H§ä¨ì°ò¥»¸Ñ¡AÁ|¨Ò¦p¤U¡G
MATLAB ¦b¶i¦æ¡u¥ª°£¡v®É¡A¹ê»Ú¤W¥Î¨ì¤F«Ü¦h¯x°}ªº¹Bºâ¤ÎÅܧΡA¨Ò¦p¡GLU Decomposition¡AQR Factorization¡ACholesky Factorization¡A ¥H¤Î¤@¯ëªº°ª´µ®ø¥hªk¡]Gaussian Elimination¡^µ¥¡C¥Ñ©ó¦¹³¡¥÷²o¯A¸û²`ªº½u©Ê¥N¼Æ¤Î¼ÆȤèªk¡A¦b¦¹¤£²`¤J¤¶²Ð¡C ¬ÛÃöªº MATLAB «ü¥O¦³ lu¡Bqr ¤Î chol µ¥¡AŪªÌ¥i¥Ñ MATLAB ½u¤W¤ä´©±o¨ì§ó¦hªº¸ê°T¡C
MATLABµ{¦¡³]p¡G¶i¶¥½g