首先引入維基上的解釋
In the field of numerical analysis, the condition number of a function with respect to an argument measures how much the output value of the function can change for a small change in the input argument
也就是說條件數是衡量輸入參數的微小變化對輸出值的影響。
A problem with a low condition number is said to be well-conditioned(良態的), while a problem with a high condition number is said to be ill-conditioned(病態的)
例如,對於線性方程Ax=b,如果條件數很大,那麼b的小誤差會導致x產生大誤差,相反,如果條件數很小,那麼x的誤差相對於b的誤差較小。
[條件數的計算]
設e爲b的誤差,A爲非奇異矩陣,則方程解x的相對誤差與b的相對誤差的比率爲
ratio=
= (1)
注意|| ||定義的是矩陣的2-範數,矩陣的範數確定了被該矩陣相乘向量長度的最大可能的放大倍數
matlab中計算範式的指令爲:norm(H),H爲一個矩陣
(1)式的最大值等於,即爲A的條件數,且有
matlab中計算條件數的指令爲:cond(H),H爲一個矩陣