1.5 Matrix Multiplication

矩阵可以理解为线性变换在一组基下的表示,故矩阵乘法就是两个线性变换结合后的表示。Hoffman把矩阵更一般地作为函数,故其给矩阵乘法的引入是:矩阵乘法是对矩阵的行进行线性组合时产生的东西。在定义和后面的例子(Example 10)中,都体现了矩阵乘法的这一个思想:A某一行的每一个数与B的行向量进行线性组合,得到AB的这一行的结果。特别提到了矩阵乘法是not commutative的。
列矩阵(column matrix)引致一个有用的notation(可以从定义证得):如果有矩阵 B n × p B_{n\times p} ,其中列向量为 B 1 , , B p B_1,\dots,B_p ,则 B = [ B 1 , , B p ] B=\begin{bmatrix}B_1,\dots,B_p\end{bmatrix} 并且 A B = [ A B 1 , , A B p ] AB=\begin{bmatrix}AB_1,\dots,AB_p\end{bmatrix}
Theorem 8 给出了矩阵乘法满足结合律的证明。其后说明了矩阵的幂是什么,以及 A ( B C ) = ( A B ) C A(BC)=(AB)C 说明linear combinations of linear combinations of the rows of C are again linear combinations of the rows of C,我认为这个诠释很有意思,Hoffman时刻在提示运算背后的思想。
最后就是要引入elementary matrix,与1.3节介绍的elementary row operations密切相关,elementary matrix的定义是从 I I 进行一次elementary row operations得到的矩阵,故其必是和 I I 同阶的方阵。Theorem 9 说明,如果用 e e 表示一个elementary row operation,则 e ( A ) = e ( I ) A e(A)=e(I)A ,即行变换等于左乘对应初等矩阵。其推论显示: A , B A,B 两矩阵row equivalent的充要条件是 B = P A B=PA ,其中 P P 是一堆初等矩阵乘积。

Exercises

1. Let

A = [ 2 1 1 1 2 1 ] , B = [ 3 1 1 ] , C = [ 1 1 ] A=\begin{bmatrix}2&-1&1\\1&2&1\end{bmatrix},\quad B=\begin{bmatrix}3\\1\\-1\end{bmatrix},\quad C=\begin{bmatrix}1&-1\end{bmatrix}

Compute A B C ABC and C A B CAB .

Solution:
A B C = [ 2 1 1 1 2 1 ] [ 3 1 1 ] [ 1 1 ] = [ 4 4 ] [ 1 1 ] = [ 4 4 4 4 ] C A B = [ 1 1 ] [ 2 1 1 1 2 1 ] [ 3 1 1 ] = [ 1 3 0 ] [ 3 1 1 ] = 0 ABC=\begin{bmatrix}2&-1&1\\1&2&1\end{bmatrix} \begin{bmatrix}3\\1\\-1\end{bmatrix} \begin{bmatrix}1&-1\end{bmatrix} =\begin{bmatrix}4\\4\end{bmatrix} \begin{bmatrix}1&-1\end{bmatrix}=\begin{bmatrix}4&-4\\4&-4\end{bmatrix} \\ CAB=\begin{bmatrix}1&-1\end{bmatrix}\begin{bmatrix}2&-1&1\\1&2&1\end{bmatrix}\begin{bmatrix}3\\1\\-1\end{bmatrix}=\begin{bmatrix}1&-3&0\end{bmatrix}\begin{bmatrix}3\\1\\-1\end{bmatrix}=0

2. Let

A = [ 1 1 1 2 0 1 3 0 1 ] , B = [ 2 2 1 3 4 4 ] A=\begin{bmatrix}1&-1&1\\2&0&1\\3&0&1\end{bmatrix},\quad B=\begin{bmatrix}2&-2\\1&3\\4&4\end{bmatrix}
Verify directly that A ( A B ) = A 2 B A(AB)=A^2B
Solution:
A ( A B ) = [ 1 1 1 2 0 1 3 0 1 ] ( [ 1 1 1 2 0 1 3 0 1 ] [ 2 2 1 3 4 4 ] ) = [ 1 1 1 2 0 1 3 0 1 ] [ 5 1 8 0 10 2 ] = [ 7 3 20 4 25 5 ] A 2 B = ( [ 1 1 1 2 0 1 3 0 1 ] [ 1 1 1 2 0 1 3 0 1 ] ) [ 2 2 1 3 4 4 ] = [ 2 1 1 5 2 3 6 3 4 ] [ 2 2 1 3 4 4 ] = [ 7 3 20 4 25 5 ] A(AB)=\begin{bmatrix}1&-1&1\\2&0&1\\3&0&1\end{bmatrix}\left(\begin{bmatrix}1&-1&1\\2&0&1\\3&0&1\end{bmatrix}\begin{bmatrix}2&-2\\1&3\\4&4\end{bmatrix}\right)=\begin{bmatrix}1&-1&1\\2&0&1\\3&0&1\end{bmatrix}\begin{bmatrix}5&-1\\8&0\\10&-2\end{bmatrix}=\begin{bmatrix}7&-3\\20&-4\\25&-5\end{bmatrix} \\ A^2 B=\left(\begin{bmatrix}1&-1&1\\2&0&1\\3&0&1\end{bmatrix}\begin{bmatrix}1&-1&1\\2&0&1\\3&0&1\end{bmatrix}\right)\begin{bmatrix}2&-2\\1&3\\4&4\end{bmatrix}=\begin{bmatrix}2&-1&1\\5&-2&3\\6&-3&4\end{bmatrix}\begin{bmatrix}2&-2\\1&3\\4&4\end{bmatrix}=\begin{bmatrix}7&-3\\20&-4\\25&-5\end{bmatrix}
thus A ( A B ) = A 2 B A(AB)=A^2 B .

3.Find two different 2 × 2 2\times 2 matrices A A such that A 2 = 0 A^2=0 but A 0 A\neq 0 .

Solution: A 1 = [ 0 1 0 0 ] , A 2 = [ 0 0 1 0 ] A_1=\begin{bmatrix}0&1\\0&0\end{bmatrix}\quad,A_2=\begin{bmatrix}0&0\\1&0\end{bmatrix}

4.For the matrix A A of Exercise 2, find elementary matrices E 1 , E 2 , , E k E_1,E_2,\dots,E_k such that

E k E 2 E 1 A = I E_k\dots E_2E_1A=I
Solution:
[ 1 1 1 2 0 1 3 0 1 ] add -2 × (1) to (2), add -3 × (1) to (3) [ 1 1 1 0 2 1 0 3 2 ] ( 2 ) × ( 1 / 2 ) [ 1 1 1 0 1 1 / 2 0 3 2 ] add  3 × ( 2 )  to  ( 3 ) [ 1 1 1 0 1 1 / 2 0 0 1 / 2 ] ( 3 ) × 2 [ 1 1 1 0 1 1 / 2 0 0 1 ] add  1 / 2 × ( 3 )  to  ( 2 ) ,  add  1 × ( 3 )  to  ( 1 ) [ 1 1 0 0 1 0 0 0 1 ] add  ( 2 )  to  ( 1 ) [ 1 0 0 0 1 0 0 0 1 ] \begin{aligned}\begin{bmatrix}1&-1&1\\2&0&1\\3&0&1\end{bmatrix}\xrightarrow{\text{add -2$\times$(1) to (2), add -3$\times$(1) to (3)}}&\begin{bmatrix}1&-1&1\\0&2&-1\\0&3&-2\end{bmatrix}\\ \xrightarrow{(2)\times(1/2)} &\begin{bmatrix}1&-1&1\\0&1&-1/2\\0&3&-2\end{bmatrix}\\ \xrightarrow{\text{add } -3\times(2) \text{ to }(3)}&\begin{bmatrix}1&-1&1\\0&1&-1/2\\0&0&-1/2\end{bmatrix}\\ \xrightarrow{(3)\times-2} &\begin{bmatrix}1&-1&1\\0&1&-1/2\\0&0&1\end{bmatrix}\\ \xrightarrow{\text{add } 1/2\times(3) \text{ to }(2),\text{ add } -1\times(3) \text{ to }(1)}&\begin{bmatrix}1&-1&0\\0&1&0\\0&0&1\end{bmatrix}\\\xrightarrow{\text{add } (2) \text{ to }(1)}&\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}\end{aligned}
so the corresponding elementary matrices are
E 1 = [ 1 0 0 2 1 0 0 0 1 ] , E 2 = [ 1 0 0 0 1 0 3 0 1 ] , E 3 = [ 1 0 0 0 1 / 2 0 0 0 1 ] , E 4 = [ 1 0 0 0 1 0 0 3 1 ] E 5 = [ 1 0 0 0 1 0 0 0 2 ] , E 6 = [ 1 0 0 0 1 1 / 2 0 0 1 ] , E 7 = [ 1 0 1 0 1 0 0 0 1 ] , E 8 = [ 1 1 0 0 1 0 0 0 1 ] E_1=\begin{bmatrix}1&0&0\\-2&1&0\\0&0&1\end{bmatrix},E_2=\begin{bmatrix}1&0&0\\0&1&0\\-3&0&1\end{bmatrix},E_3=\begin{bmatrix}1&0&0\\0&1/2&0\\0&0&1\end{bmatrix},E_4=\begin{bmatrix}1&0&0\\0&1&0\\0&-3&1\end{bmatrix}\\E_5=\begin{bmatrix}1&0&0\\0&1&0\\0&0&-2\end{bmatrix},E_6=\begin{bmatrix}1&0&0\\0&1&1/2\\0&0&1\end{bmatrix},E_7=\begin{bmatrix}1&0&-1\\0&1&0\\0&0&1\end{bmatrix},E_8=\begin{bmatrix}1&1&0\\0&1&0\\0&0&1\end{bmatrix}

5. Let

A = [ 1 1 2 2 1 0 ] , B = [ 3 1 4 4 ] A=\begin{bmatrix}1&-1\\2&2\\1&0\end{bmatrix},\quad B=\begin{bmatrix}3&1\\-4&4\end{bmatrix}

Is there a matrix C C such that C A = B CA=B ?

Solution: One possible choice of C C is C = [ 1 1 0 2 3 12 ] C=\begin{bmatrix}1&1&0\\2&3&-12\end{bmatrix}

6. Let A A be an m × n m\times n matrix and B B and n × k n\times k matrix. Show that the columns of C = A B C=AB are linear combinations of the columns of A A . If α 1 , , α n \alpha_1,\dots,\alpha_n are the columns of A A and γ 1 , , γ k \gamma_1,\dots,\gamma_k are the columns of C C , then

γ j = r = 1 n B r j α r \gamma_j=\sum_{r=1}^nB_{rj}\alpha_r
Solution: We write A = [ α 1 , , α n ] A=[\alpha_1,\dots,\alpha_n ] , and C = [ γ 1 , , γ k ] C=[\gamma_1,\dots,\gamma_k ] , then as C = A B C=AB , for 1 i m 1\leq i\leq m , we have
C i j = r = 1 n A i r B r j = r = 1 n B r j A i r , 1 i m C_{ij}=\sum_{r=1}^nA_{ir} B_{rj}=\sum_{r=1}^nB_{rj} A_{ir},\quad 1\leq i\leq m
thus
γ j = [ C 1 j C m j ] = [ r = 1 n B r j A 1 r r = 1 n B r j A m r ] = B 1 j [ A 11 A m 1 ] + + B n j [ A 1 n A m n ] = B 1 j α 1 + + B n j α n \gamma_j=\begin{bmatrix}C_{1j}\\\vdots\\C_{mj}\end{bmatrix}=\begin{bmatrix}\sum_{r=1}^nB_{rj} A_{1r}\\\vdots\\\sum_{r=1}^nB_{rj} A_{mr}\end{bmatrix}=B_1j \begin{bmatrix}A_{11}\\\vdots\\A_{m1}\end{bmatrix}+\cdots+B_nj \begin{bmatrix}A_{1n}\\\vdots\\A_{mn}\end{bmatrix}=B_{1j}\alpha_1+\cdots+B_{nj} \alpha_n

7.Let A A and B B be 2 × 2 2\times 2 matrices such that A B = I AB=I . Prove that B A = I BA=I .

Solution: We have A B A = I A = A ABA=IA=A , thus A ( B A I ) = 0 A(BA-I)=0 , assume B A I BA\neq I , then the system A X = 0 AX=0 has non-trivial solutions, thus A A is row-equivalent to a row-reduced echelon matrix which is not I I , so there’s P P which is product of elementary matrices such that
P A = [ 1 0 0 0 ] PA=\begin{bmatrix}1&0\\0&0\end{bmatrix}
this means the second row of P = P A B P=PAB is 0 0 , a contradiction.

8. Let

C = [ C 11 C 12 C 21 C 22 ] C=\begin{bmatrix}C_{11}&C_{12}\\C_{21}&C_{22}\end{bmatrix}

be a 2 × 2 2\times 2 matrix. We inquire when it is possible to find 2 × 2 2\times 2 matrices A A and B B such that C = A B B A C=AB-BA . Prove that such matrices can be found if and only if C 11 + C 22 = 0 C_{11}+C_{22}=0 .

Solution: Let A = [ a b c d ] , B = [ e f g h ] A=\begin{bmatrix}a&b\\c&d\end{bmatrix},B=\begin{bmatrix}e&f\\g&h\end{bmatrix} , then A B = [ a e + b g a f + b h c e + d g c f + d h ] , B A = [ e a + f c e b + d f a g + h c g b + d h ] AB=\begin{bmatrix}ae+bg&af+bh\\ce+dg&cf+dh\end{bmatrix},BA=\begin{bmatrix}ea+fc&eb+df\\ag+hc&gb+dh\end{bmatrix} , thus
A B B A = [ b g c f a f + b h e b d f c e + d g a g h c c f b g ] AB-BA=\begin{bmatrix}bg-cf&af+bh-eb-df\\ce+dg-ag-hc&cf-bg\end{bmatrix}
if C = A B B A C=AB-BA , then C 11 + C 22 = b g c f + c f b g = 0 C_{11}+C_{22}=bg-cf+cf-bg=0 .
Conversely, if C 11 + C 22 = 0 C_{11}+C_{22}=0 , then C 11 = C 22 C_{11}=-C_{22} , thus solve the equation
b g c f = C 11 a f + b h e b d f = ( a d ) f + b ( h e ) = C 12 c e + d g a g h c = ( d a ) g + c ( e h ) = C 21 \begin{aligned}bg-cf&=C_{11}\\ af+bh-eb-df=(a-d)f+b(h-e)&=C_{12}\\ ce+dg-ag-hc=(d-a)g+c(e-h)&=C_{21}\end{aligned}
It’s a system of 3 equations with 8 unknowns, fix a = 1 , d = 0 , h = 0 , e = 1 a=1,d=0,h=0,e=1 , the system becomes
b g c f = C 11 f b = C 12 g c = C 21 \begin{aligned}bg-cf&=C_{11}\\ f-b&=C_{12}\\ g-c&=C_{21}\end{aligned}
thus b ( C 21 + c ) c ( C 12 + b ) = C 11 b(C_{21}+c)-c(C_{12}+b)=C_{11} , or b C 21 = C 11 + c C 12 bC_{21}=C_{11}+cC_{12} , if C 2 1 0 C_21\neq 0 , let c = 1 c=1 ; if C 21 = 0 C_{21}=0 , let c = C 11 / C 12 c=-C_{11}/C_{12} and b = 1 b=1 , all other unkowns can be solved.

发布了77 篇原创文章 · 获赞 14 · 访问量 2804

猜你喜欢

转载自blog.csdn.net/christangdt/article/details/103225060
今日推荐