?? ch5_3_1.htm
字號(hào):
<! Made by Html Translation Ver 1.0>
<HTML>
<HEAD>
<TITLE> 反矩陣、矩陣秩與行列式 </TITLE>
</HEAD>
<BODY BACKGROUND="bg0000.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/bg0000.gif">
<FONT COLOR="#0000FF">
<H1>5.3.1 反矩陣、矩陣秩與行列式</H1>
</FONT>
<HR>
<P>
一個(gè)正方矩陣<FONT FACE="Times New Roman">A</FONT>的反矩陣的定義是<IMG SRC="img00001-2.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img5/img00001.gif">,所以此二矩陣相乘不論是<IMG SRC="img00002-2.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img5/img00002.gif">或<IMG SRC="img00003-2.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img5/img00003.gif">,結(jié)果皆為單位矩陣。但是一
矩陣如果是奇異<FONT FACE="Times New Roman">(singular) </FONT>或是條件不足<FONT FACE="Times New Roman"> (ill-conditioned)</FONT>,其反矩陣并不存在。條件不足的矩陣與一組聯(lián)立方程
組其中的方程式并不獨(dú)立有關(guān),而一矩陣的秩<FONT FACE="Times New Roman">(rank) </FONT>即是代表矩陣中獨(dú)立方程式個(gè)數(shù)。如果一矩陣的秩數(shù)和
其矩陣的列數(shù)相等,則此矩陣為非奇異且其反矩陣存在。
<BR>
<P>
MATLAB的反矩陣函數(shù)和秩函數(shù)語(yǔ)法分別為<FONT COLOR=#FF0000 FACE="Times New Roman">inv(A)</FONT><TT><FONT FACE="Courier New">,
</FONT></TT><FONT COLOR=#FF0000 FACE="Times New Roman">rank(A)</FONT>,:例如:
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> A=[2 1; 4
3];</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> rank(A)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman"> 2 % </FONT><FONT COLOR=#FF0000>表示</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">A</FONT><FONT COLOR=#FF0000>秩數(shù)為</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">2</FONT><FONT COLOR=#FF0000>且等于矩陣的列數(shù)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> inv(A)
% </FONT><FONT COLOR=#FF0000>反矩陣</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans =</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman"> 1.5000 -0.5000</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman"> -2.0000 1.0000</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> B=[2 1; 3
2; 4 5]; % B</FONT><FONT COLOR=#FF0000>為奇異矩陣</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> rank(B)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans =</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman"> 2 % </FONT><FONT COLOR=#FF0000>表示</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">B</FONT><FONT COLOR=#FF0000>秩數(shù)為</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">2</FONT><FONT COLOR=#FF0000>,但是其列數(shù)為</FONT><FONT COLOR=#FF0000 FACE="Times New Roman">3</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> inv(B)</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">??? Error using ==>
inv</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">Matrix must be square.
<BR>
</FONT>
<P>
相信大家都會(huì)計(jì)算矩陣行列式的值,但是如一矩陣大小超過(guò)<FONT FACE="Times New Roman">4</FONT>以上,行列式值的計(jì)算就會(huì)繁復(fù)。<FONT FACE="Times New Roman">MATLAB</FONT>提供
計(jì)算行列式的函數(shù),其語(yǔ)法為<FONT COLOR=#FF0000 FACE="Times New Roman">det(A)</FONT>,例如:
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> A=[1 3 0;
-1 5 2; 1 2 1];</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> det(A)
% </FONT><FONT COLOR=#FF0000>矩陣之行列式值</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans =</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman"> 10<BR>
</FONT>滬p算就會(huì)繁復(fù)。<FONT FACE="Times New Roman">MATLAB</FONT>提供
計(jì)算行列式的函數(shù),其語(yǔ)法為<FONT COLOR=#FF0000 FACE="Times New Roman">det(A)</FONT>,例如:
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> A=[1 3 0;
-1 5 2; 1 2 1];</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">>> det(A)
% </FONT><FONT COLOR=#FF0000>矩陣之行列式值</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman">ans =</FONT>
<P>
<FONT COLOR=#FF0000 FACE="Times New Roman"> 10<BR>
</FONT><HR>
<A HREF="ch5_3.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch5_3.htm"><IMG SRC="lastpage.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/lastpage.gif" BORDER=0></A>
<A HREF="ch5_3_2.htm" tppabs="http://166.111.167.223/computer/cai/matlabjc/ch5_3_2.htm"><IMG SRC="nextpage-1.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/nextpage.gif" BORDER=0 HSPACE=10></A>
<A HREF="index.html" tppabs="http://166.111.167.223/computer/cai/matlabjc/index.html"><IMG SRC="outline-1.gif" tppabs="http://166.111.167.223/computer/cai/matlabjc/img/outline.gif" BORDER=0 HSPACE=6></A><BR>
<FONT SIZE=2 COLOR=#AA55FF> 上一頁(yè) 下一頁(yè) 講義大綱 </FONT>
</BODY>
</HTML>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -