建議所有讀者完成此練習。
建議所有讀者完成此練習。
建議所有讀者完成此練習。
問題 3
此表列出了每個工人完成的每種型別的工作的小時數以及相關的工資率。使用矩陣計算應付的工資。
正常工作
加班
艾倫 40 12
貝蒂 35 6
凱瑟琳 40 18
唐納德 28 0
(備註。 這與上一個問題一樣,說明在實踐中,我們經常希望在實際上並不關心任何相關的線性對映的情況下,計算行和列的線性組合。)
解答
應付給每個人的工資出現在兩個陣列的矩陣乘積中。
建議所有讀者完成此練習。
問題 5
證明對角矩陣構成 M n × n {\displaystyle {\mathcal {M}}_{n\!\times \!n}} 的子空間。它的維數是多少?
解答
對角矩陣的集合非空,因為零矩陣是對角矩陣。顯然它在標量倍數和和下封閉。因此,它是一個子空間。維數是 n {\displaystyle n} ;這裡有一個基。
{ ( 1 0 … 0 0 ⋱ 0 0 0 ) , … , ( 0 0 … 0 0 ⋱ 0 0 1 ) } {\displaystyle \{{\begin{pmatrix}1&0&\ldots \\0&0\\&&\ddots \\0&0&&0\end{pmatrix}},\ldots ,{\begin{pmatrix}0&0&\ldots \\0&0\\&&\ddots \\0&0&&1\end{pmatrix}}\}}
問題 8
證明或反駁:非奇異矩陣可交換。
解答
這是錯誤的;這兩個矩陣不可交換。
( 1 0 0 0 ) ( 0 0 1 0 ) {\displaystyle {\begin{pmatrix}1&0\\0&0\end{pmatrix}}\qquad {\begin{pmatrix}0&0\\1&0\end{pmatrix}}}
建議所有讀者完成此練習。
問題 12
寫
( 1 0 − 3 3 ) {\displaystyle {\begin{pmatrix}1&0\\-3&3\end{pmatrix}}}
作為兩個初等行變換矩陣的乘積。
解答
從單位矩陣生成這個矩陣的一種方法是使用列運算,首先將第二列乘以三,然後將結果的第二列的負值加到第一列。
( 1 0 0 1 ) → ( 1 0 0 3 ) → ( 1 0 − 3 3 ) {\displaystyle {\begin{pmatrix}1&0\\0&1\end{pmatrix}}\;{\xrightarrow[{}]{}}\;{\begin{pmatrix}1&0\\0&3\end{pmatrix}}\;{\xrightarrow[{}]{}}\;{\begin{pmatrix}1&0\\-3&3\end{pmatrix}}}
列運算(與行運算相反)是從左到右寫的,因此執行上述兩個運算用這個矩陣乘積表示。
( 1 0 0 3 ) ( 1 0 − 1 1 ) {\displaystyle {\begin{pmatrix}1&0\\0&3\end{pmatrix}}{\begin{pmatrix}1&0\\-1&1\end{pmatrix}}}
備註: 或者,我們可以透過行操作獲得所需的矩陣。從單位矩陣開始,首先將第一行的負數加到第二行,然後將第二行乘以3,即可。由於連續的行操作被寫成從右到左的矩陣乘積,因此進行這兩個行操作用以下表達式表示:相同的矩陣乘積。
建議所有讀者完成此練習。
問題 14
證明單位矩陣的集合構成 M n × m {\displaystyle {\mathcal {M}}_{n\!\times \!m}} 的基。
解答
也許最簡單的方法是證明每個 n × m {\displaystyle n\!\times \!m} 矩陣都是單位矩陣的線性組合,而且只有一種方式
c 1 ( 1 0 … 0 0 ⋮ ) + ⋯ + c n , m ( 0 0 … ⋮ 0 … 1 ) = ( a 1 , 1 a 1 , 2 … ⋮ a n , 1 … a n , m ) {\displaystyle c_{1}{\begin{pmatrix}1&0&\ldots \\0&0\\\vdots \end{pmatrix}}+\dots +c_{n,m}{\begin{pmatrix}0&0&\ldots \\\vdots \\0&\ldots &&1\end{pmatrix}}={\begin{pmatrix}a_{1,1}&a_{1,2}&\ldots \\\vdots \\a_{n,1}&\ldots &&a_{n,m}\end{pmatrix}}}
有唯一解 c 1 = a 1 , 1 {\displaystyle c_{1}=a_{1,1}} , c 2 = a 1 , 2 {\displaystyle c_{2}=a_{1,2}} ,等等。
建議所有讀者完成此練習。
問題 16
方陣的跡 是其對角線上元素的總和(其重要性將在第五章中出現)。證明 trace ( G H ) = trace ( H G ) {\displaystyle {\text{trace}}\,(GH)={\text{trace}}\,(HG)} .
解答
第五章給出了一個不太依賴計算的原因——矩陣的跡是其特徵多項式的第二項係數——但現在我們可以使用索引。 我們有
trace ( G H ) = ( g 1 , 1 h 1 , 1 + g 1 , 2 h 2 , 1 + ⋯ + g 1 , n h n , 1 ) + ( g 2 , 1 h 1 , 2 + g 2 , 2 h 2 , 2 + ⋯ + g 2 , n h n , 2 ) + ⋯ + ( g n , 1 h 1 , n + g n , 2 h 2 , n + ⋯ + g n , n h n , n ) {\displaystyle {\begin{array}{rl}{\text{trace}}\,(GH)&=(g_{1,1}h_{1,1}+g_{1,2}h_{2,1}+\dots +g_{1,n}h_{n,1})\\&\quad +(g_{2,1}h_{1,2}+g_{2,2}h_{2,2}+\dots +g_{2,n}h_{n,2})\\&\quad +\cdots +(g_{n,1}h_{1,n}+g_{n,2}h_{2,n}+\dots +g_{n,n}h_{n,n})\end{array}}}
而
trace ( H G ) = ( h 1 , 1 g 1 , 1 + h 1 , 2 g 2 , 1 + ⋯ + h 1 , n g n , 1 ) + ( h 2 , 1 g 1 , 2 + h 2 , 2 g 2 , 2 + ⋯ + h 2 , n g n , 2 ) + ⋯ + ( h n , 1 g 1 , n + h n , 2 g 2 , n + ⋯ + h n , n g n , n ) {\displaystyle {\begin{array}{rl}{\text{trace}}\,(HG)&=(h_{1,1}g_{1,1}+h_{1,2}g_{2,1}+\dots +h_{1,n}g_{n,1})\\&\quad +(h_{2,1}g_{1,2}+h_{2,2}g_{2,2}+\dots +h_{2,n}g_{n,2})\\&\quad +\cdots +(h_{n,1}g_{1,n}+h_{n,2}g_{2,n}+\dots +h_{n,n}g_{n,n})\end{array}}}
兩者相等。
建議所有讀者完成此練習。
問題 17
如果方陣中非零元素僅位於對角線上方或對角線上,則稱該方陣為上三角矩陣 。證明兩個上三角矩陣的乘積為上三角矩陣。這對於下三角矩陣是否也成立?
解答
如果且僅當矩陣的 i , j {\displaystyle i,j} 項在 i > j {\displaystyle i>j} 時為零時,矩陣為上三角矩陣。因此,如果 G , H {\displaystyle G,H} 為上三角矩陣,則 h i , j {\displaystyle h_{i,j}} 和 g i , j {\displaystyle g_{i,j}} 在 i > j {\displaystyle i>j} 時為零。乘積中的一項 p i , j = g i , 1 h 1 , j + ⋯ + g i , n h n , j {\displaystyle p_{i,j}=g_{i,1}h_{1,j}+\dots +g_{i,n}h_{n,j}} 為零,除非至少某些項非零,也就是說,除非對於至少某些求和項 g i , r h r , j {\displaystyle g_{i,r}h_{r,j}} , i ≤ r {\displaystyle i\leq r} 且 r ≤ j {\displaystyle r\leq j} 。當然,如果 i > j {\displaystyle i>j} ,這種情況不會發生,因此兩個上三角矩陣的乘積為上三角矩陣。(類似的論證適用於下三角矩陣。)
問題 18
如果方陣中每個元素都介於零和一之間,並且每行的總和為一,則該方陣為馬爾可夫矩陣 。證明馬爾可夫矩陣的乘積也是馬爾可夫矩陣。
解答
乘積中第 i {\displaystyle i} 行的總和為:
p i , 1 + ⋯ + p i , n = ( h i , 1 g 1 , 1 + h i , 2 g 2 , 1 + ⋯ + h i , n g n , 1 ) + ( h i , 1 g 1 , 2 + h i , 2 g 2 , 2 + ⋯ + h i , n g n , 2 ) + ⋯ + ( h i , 1 g 1 , n + h i , 2 g 2 , n + ⋯ + h i , n g n , n ) = h i , 1 ( g 1 , 1 + g 1 , 2 + ⋯ + g 1 , n ) + h i , 2 ( g 2 , 1 + g 2 , 2 + ⋯ + g 2 , n ) + ⋯ + h i , n ( g n , 1 + g n , 2 + ⋯ + g n , n ) = h i , 1 ⋅ 1 + ⋯ + h i , n ⋅ 1 = 1 {\displaystyle {\begin{array}{rl}p_{i,1}+\cdots +p_{i,n}&=(h_{i,1}g_{1,1}+h_{i,2}g_{2,1}+\dots +h_{i,n}g_{n,1})\\&\quad +(h_{i,1}g_{1,2}+h_{i,2}g_{2,2}+\dots +h_{i,n}g_{n,2})\\&\quad +\dots +(h_{i,1}g_{1,n}+h_{i,2}g_{2,n}+\dots +h_{i,n}g_{n,n})\\&=h_{i,1}(g_{1,1}+g_{1,2}+\dots +g_{1,n})\\&\quad +h_{i,2}(g_{2,1}+g_{2,2}+\dots +g_{2,n})\\&\quad +\dots +h_{i,n}(g_{n,1}+g_{n,2}+\dots +g_{n,n})\\&=h_{i,1}\cdot 1+\dots +h_{i,n}\cdot 1\\&=1\end{array}}}
建議所有讀者完成此練習。
問題 19
給出兩個秩相同的矩陣的例子,它們的平方具有不同的秩。
解答
表示(例如,關於 E 2 , E 2 ⊂ R 2 {\displaystyle {\mathcal {E}}_{2},{\mathcal {E}}_{2}\subset \mathbb {R} ^{2}} ) 的對映傳送
β → 1 ⟼ h β → 1 β → 2 ⟼ h 0 → {\displaystyle {\vec {\beta }}_{1}{\stackrel {h}{\longmapsto }}{\vec {\beta }}_{1}\quad {\vec {\beta }}_{2}{\stackrel {h}{\longmapsto }}{\vec {0}}}
和
β → 1 ⟼ g β → 2 β → 2 ⟼ g 0 → {\displaystyle {\vec {\beta }}_{1}{\stackrel {g}{\longmapsto }}{\vec {\beta }}_{2}\quad {\vec {\beta }}_{2}{\stackrel {g}{\longmapsto }}{\vec {0}}}
就可以了。
問題 20
將單位矩陣的兩個推廣結合起來,一個是允許條目不為 1,另一個是允許每行和每列中唯一的 1 偏離對角線。這種矩陣的作用是什麼?
解答
該組合是讓矩陣的所有條目都為零,除了每一行和每一列中可能有一個非零條目。這樣的矩陣可以寫成置換矩陣和對角矩陣的乘積,例如:
( 0 4 0 2 0 0 0 0 − 5 ) = ( 0 1 0 1 0 0 0 0 1 ) ( 4 0 0 0 2 0 0 0 − 5 ) {\displaystyle {\begin{pmatrix}0&4&0\\2&0&0\\0&0&-5\end{pmatrix}}={\begin{pmatrix}0&1&0\\1&0&0\\0&0&1\end{pmatrix}}{\begin{pmatrix}4&0&0\\0&2&0\\0&0&-5\end{pmatrix}}}
因此,它的作用是重新縮放行並排列它們。
問題 21
在計算機中,乘法運算比加法運算成本更高,因此人們對減少計算矩陣乘積所需的乘法次數很感興趣。
我們給出的 m × r {\displaystyle m\!\times \!r} 矩陣和 r × n {\displaystyle r\!\times \!n} 矩陣乘積公式需要多少次實數乘法? 矩陣乘法是結合的,因此所有結合方式都會產生相同的結果。然而,乘法次數的成本會有所不同。找到需要最少實數乘法來計算 5 × 10 {\displaystyle 5\!\times \!10} 矩陣、 10 × 20 {\displaystyle 10\!\times \!20} 矩陣、 20 × 5 {\displaystyle 20\!\times \!5} 矩陣和 5 × 1 {\displaystyle 5\!\times \!1} 矩陣的矩陣乘積的結合方式。 (非常難。) 找到一種方法,僅使用七次乘法而不是樸素方法建議的八次乘法來乘以兩個 2 × 2 {\displaystyle 2\!\times \!2} 矩陣。
解答
每個條目 p i , j = g i , 1 h 1 , j + ⋯ + g 1 , r h r , 1 {\displaystyle p_{i,j}=g_{i,1}h_{1,j}+\dots +g_{1,r}h_{r,1}} 需要 r {\displaystyle r} 次乘法,並且有 m ⋅ n {\displaystyle m\cdot n} 個條目。因此有 m ⋅ n ⋅ r {\displaystyle m\cdot n\cdot r} 次乘法。 令 H 1 {\displaystyle H_{1}} 為 5 × 10 {\displaystyle 5\!\times \!10} ,令 H 2 {\displaystyle H_{2}} 為 10 × 20 {\displaystyle 10\!\times \!20} ,令 H 3 {\displaystyle H_{3}} 為 20 × 5 {\displaystyle 20\!\times \!5} ,令 H 4 {\displaystyle H_{4}} 為 5 × 1 {\displaystyle 5\!\times \!1} 。然後,使用之前部分中的公式,
this\ association uses\ this\ many\ multiplications ( ( H 1 H 2 ) H 3 ) H 4 1000 + 500 + 25 = 1525 ( H 1 ( H 2 H 3 ) ) H 4 1000 + 250 + 25 = 1275 ( H 1 H 2 ) ( H 3 H 4 ) 1000 + 100 + 100 = 1200 H 1 ( H 2 ( H 3 H 4 ) ) 100 + 200 + 50 = 350 H 1 ( ( H 2 H 3 ) H 4 ) 1000 + 50 + 50 = 1100 {\displaystyle {\begin{array}{l|l}{\textit {this\ association}}&{\textit {uses\ this\ many\ multiplications}}\\\hline ((H_{1}H_{2})H_{3})H_{4}&1000+500+25=1525\\(H_{1}(H_{2}H_{3}))H_{4}&1000+250+25=1275\\(H_{1}H_{2})(H_{3}H_{4})&1000+100+100=1200\\H_{1}(H_{2}(H_{3}H_{4}))&100+200+50=350\\H_{1}((H_{2}H_{3})H_{4})&1000+50+50=1100\end{array}}}
顯示了哪種方式最便宜。
Knuth 將其歸功於 S. Winograd 對 V. Strassen 公式的改進:其中 w = a A − ( a − c − d ) ( A − C + D ) {\displaystyle w=aA-(a-c-d)(A-C+D)} , ( a b c d ) ( A B C D ) {\displaystyle {\begin{pmatrix}a&b\\c&d\end{pmatrix}}{\begin{pmatrix}A&B\\C&D\end{pmatrix}}}
= ( a A + b B w + ( c + d ) ( C − A ) + ( a + b − c − d ) D w + ( a − c ) ( D − C ) − d ( A − B − C + D ) w + ( a − c ) ( D − C ) + ( c + d ) ( C − A ) ) {\displaystyle ={\begin{pmatrix}aA+bB&w+(c+d)(C-A)+(a+b-c-d)D\\w+(a-c)(D-C)-d(A-B-C+D)&w+(a-c)(D-C)+(c+d)(C-A)\end{pmatrix}}} 需要七次乘法和十五次加法(儲存中間結果)。
問題 24
證明(其中 A {\displaystyle A} 是一個 n × n {\displaystyle n\!\times \!n} 矩陣,因此定義了任何 n {\displaystyle n} 維空間 V {\displaystyle V} 相對於 B , B {\displaystyle B,B} 的變換,其中 B {\displaystyle B} 是一個基底), dim ( R ( A ) ∩ N ( A ) ) = dim ( R ( A ) ) − dim ( R
N ( A ) ⊂ R ( A ) {\displaystyle {\mathcal {N}}(A)\subset {\mathcal {R}}(A)} 當且僅當 dim ( N ( A ) ) = dim ( R ( A ) ) − dim ( R ( A 2 ) ) {\displaystyle \dim({\mathcal {N}}(A))=\dim({\mathcal {R}}(A))-\dim({\mathcal {R}}(A^{2}))} ; R ( A ) ⊆ N ( A ) {\displaystyle {\mathcal {R}}(A)\subseteq {\mathcal {N}}(A)} 當且僅當 A 2 = 0 {\displaystyle A^{2}=0} ; R ( A ) = N ( A ) {\displaystyle {\mathcal {R}}(A)={\mathcal {N}}(A)} 當且僅當 A 2 = 0 {\displaystyle A^{2}=0} 且 dim ( N ( A ) ) = dim ( R ( A ) ) {\displaystyle \dim({\mathcal {N}}(A))=\dim({\mathcal {R}}(A))} ; dim ( R ( A ) ∩ N ( A ) ) = 0 {\displaystyle \dim({\mathcal {R}}(A)\cap {\mathcal {N}}(A))=0} 當且僅當 dim ( R ( A ) ) = dim ( R ( A 2 ) ) {\displaystyle \dim({\mathcal {R}}(A))=\dim({\mathcal {R}}(A^{2}))} ; (需要直接和部分,這是可選的。) V = R ( A ) ⊕ N ( A ) {\displaystyle V={\mathcal {R}}(A)\oplus {\mathcal {N}}(A)} 當且僅當 dim ( R ( A ) ) = dim ( R ( A 2 ) ) {\displaystyle \dim({\mathcal {R}}(A))=\dim({\mathcal {R}}(A^{2}))} . (
Ackerson 1955 )
解答
以下是引述來源中的答案。
令 ⟨ z → 1 , … , z → k ⟩ {\displaystyle \langle {\vec {z}}_{1},\dots ,{\vec {z}}_{k}\rangle } 為 R ( A ) ∩ N ( A ) {\displaystyle {\mathcal {R}}(A)\cap {\mathcal {N}}(A)} 的基底( k {\displaystyle k} 可能為 0 {\displaystyle 0} )。令 x → 1 , … , x → k ∈ V {\displaystyle {\vec {x}}_{1},\dots ,{\vec {x}}_{k}\in V} 使得 A x → i = z → i {\displaystyle A{\vec {x}}_{i}={\vec {z}}_{i}} 。注意 { A x → 1 , … , A x → k } {\displaystyle \{A{\vec {x}}_{1},\dots ,A{\vec {x}}_{k}\}} 線性無關,並將它擴充套件為 R ( A ) {\displaystyle {\mathcal {R}}(A)} 的基底: A x → 1 , … , A x → k , A x → k + 1 , … , A x → r 1 {\displaystyle A{\vec {x}}_{1},\ldots ,A{\vec {x}}_{k},A{\vec {x}}_{k+1},\dots ,A{\vec {x}}_{r_{1}}} 其中 r 1 = dim ( R ( A ) ) {\displaystyle r_{1}=\dim({\mathcal {R}}(A))} .
現在取 x → ∈ V {\displaystyle {\vec {x}}\in V} 。寫出
A x → = a 1 ( A x → 1 ) + ⋯ + a r 1 ( A x → r 1 ) {\displaystyle A{\vec {x}}=a_{1}(A{\vec {x}}_{1})+\dots +a_{r_{1}}(A{\vec {x}}_{r_{1}})}
因此
A 2 x → = a 1 ( A 2 x → 1 ) + ⋯ + a r 1 ( A 2 x → r 1 ) . {\displaystyle A^{2}{\vec {x}}=a_{1}(A^{2}{\vec {x}}_{1})+\dots +a_{r_{1}}(A^{2}{\vec {x}}_{r_{1}}).}
但 A x → 1 , … , A x → k ∈ N ( A ) {\displaystyle A{\vec {x}}_{1},\dots ,A{\vec {x}}_{k}\in {\mathcal {N}}(A)} ,因此 A 2 x → 1 = 0 → , … , A 2 x → k = 0 → {\displaystyle A^{2}{\vec {x}}_{1}={\vec {0}},\dots ,A^{2}{\vec {x}}_{k}={\vec {0}}} ,我們現在知道
A 2 x → k + 1 , … , A 2 x → r 1 {\displaystyle A^{2}{\vec {x}}_{k+1},\dots ,A^{2}{\vec {x}}_{r_{1}}}
生成 R ( A 2 ) {\displaystyle {\mathcal {R}}(A^{2})} 。
為了看到 { A 2 x → k + 1 , … , A 2 x → r 1 } {\displaystyle \{A^{2}{\vec {x}}_{k+1},\dots ,A^{2}{\vec {x}}_{r_{1}}\}} 是線性無關的,我們寫
b k + 1 A 2 x → k + 1 + ⋯ + b r 1 A 2 x → r 1 = 0 → A [ b k + 1 A x → k + 1 + ⋯ + b r 1 A x → r 1 ] = 0 → {\displaystyle {\begin{array}{rl}b_{k+1}A^{2}{\vec {x}}_{k+1}+\dots +b_{r_{1}}A^{2}{\vec {x}}_{r_{1}}&={\vec {0}}\\A[b_{k+1}A{\vec {x}}_{k+1}+\dots +b_{r_{1}}A{\vec {x}}_{r_{1}}]&={\vec {0}}\end{array}}}
並且,由於 b k + 1 A x → k + 1 + ⋯ + b r 1 A x → r 1 ∈ N ( A ) {\displaystyle b_{k+1}A{\vec {x}}_{k+1}+\dots +b_{r_{1}}A{\vec {x}}_{r_{1}}\in {\mathcal {N}}(A)} 我們得到一個矛盾,除非它是 0 → {\displaystyle {\vec {0}}} (很明顯它在 R ( A ) {\displaystyle {\mathcal {R}}(A)} 中,但是 A x → 1 , … , A x → k {\displaystyle A{\vec {x}}_{1},\ldots ,A{\vec {x}}_{k}} 是 R ( A ) ∩ N ( A ) {\displaystyle {\mathcal {R}}(A)\cap {\mathcal {N}}(A)} 的基底)。
因此 dim ( R ( A 2 ) ) = r 1 − k = dim ( R ( A ) ) − dim ( R ( A ) ∩ N ( A ) ) {\displaystyle \dim({\mathcal {R}}(A^{2}))=r_{1}-k=\dim({\mathcal {R}}(A))-\dim({\mathcal {R}}(A)\cap {\mathcal {N}}(A))} .
Ackerson, R. H. (1955), "A Note on Vector Spaces", American Mathematical Monthly , American Mathematical Society, 62 (10): 721 .
Liebeck, Hans. (1966), "A Proof of the Equality of Column Rank and Row Rank of a Matrix", American Mathematical Monthly , American Mathematical Society, 73 (10): 1114 .
威廉·洛厄爾·普特南數學競賽,問題 A-5,1990 年。