2.4E: Matrix Multiplication Exercises
( \newcommand{\kernel}{\mathrm{null}\,}\)
Exercises for 1
solutions
2
Compute the following matrix products.
[130−2][2−101] [1−12204][231197−102] [50−7159][31−1] [13−3][30−2106] [100010001][3−25−797] [1−13][21−8] [21−7][1−13] [3152][2−1−53] [231574][a000b000c] [a000b000c][a′000b′000c′]
- [−1−6−20610]
- [−3−15]
- [−23]
- [1001]
- [aa′000bb′000cc′]
In each of the following cases, find all possible products A2, AB, AC, and so on.
-
A=[123−100], B=[1−2123],
C=[−102503] -
A=[12401−1], B=[−1610],
C=[20−1112]
-
BA=[−14−10124], B2=[7−6−16], CB=[−2122−616]
AC=[410−2−1], CA=[248−1−1−5142]
Find a, b, a1, and b1 if:
- [aba1b1][3−5−12]=[1−120]
- [21−12][aba1b1]=[72−14]
- (a,b,a1,b1)=(3,0,1,2)
Verify that A2−A−6I=0 if:
[3−10−2] [222−1]
- A2−A−6I=[8225]−[222−1]−[6006]=[0000]
[ex:ex2_3_5]
Given A=[1−101], B=[10−2310],
C=[102158], and D=[3−12105], verify the following facts from Theorem [thm:003469].
A(B−D)=AB−AD A(BC)=(AB)C (CD)T=DTCT
- A(BC)=[1−101][−9−1651]=[−14−1751]=[−2−1−2310][102158]=(AB)C
Let A be a 2×2 matrix.
-
If A commutes with [0100], show that
A=[ab0a] for some a and b. -
If A commutes with [0010], show that
A=[a0ca] for some a and c. - Show that A commutes with every 2×2 matrix if and only if A=[a00a] for some a.
- If A=[abcd] and E=[0010], compare entries an AE and EA.
- If A2 can be formed, what can be said about the size of A?
- If AB and BA can both be formed, describe the sizes of A and B.
- If ABC can be formed, A is 3×3, and C is 5×5, what size is B?
- m×n and n×m for some m and n
- Find two 2×2 matrices A such that A2=0.
- Find three 2×2 matrices A such that (i) A2=I; (ii) A2=A.
- Find 2×2 matrices A and B such that AB=0 but BA≠0.
-
- [1001], [100−1], [110−1]
- [1000], [1001], [1100]
Write P=[100001010], and let A be 3×n and B be m×3.
- Describe PA in terms of the rows of A.
- Describe BP in terms of the columns of B.
Let A, B, and C be as in Exercise [ex:ex2_3_5]. Find the (3,1)-entry of CAB using exactly six numerical multiplications.
Compute AB, using the indicated block partitioning.
A=[2−131101200100001]B=[120−1000511−10]
In each case give formulas for all powers A,A2,A3,… of A using the block decomposition indicated.
- A=[10011−11−11]
- A=[1−12−1010000−110001]
-
A2k=[1−2k00010000100001] for k=0,1,2,…,
A2k+1=A2kA=[1−(2k+1)2−1010000−110001] for k=0,1,2,…
Compute the following using block multiplication (all blocks are k×k).
[IX−YI][I0YI] [IX0I][I−X0I] [IX][IX]T [IXT][−XI]T [IX0−I]n any n≥1 [0XI0]n any n≥1
- [I00I]=I2k
- 0k
- [Xm00Xm] if n=2m; [0Xm+1Xm0] if n=2m+1
Let A denote an m×n matrix.
- If AX=0 for every n×1 matrix X, show that A=0.
- If YA=0 for every 1×m matrix Y, show that A=0.
- If Y is row i of the identity matrix I, then YA is row i of IA=A.
- If U=[120−1], and AU=0, show that A=0.
- Let U be such that AU=0 implies that A=0. If PU=QU, show that P=Q.
Simplify the following expressions where A, B, and C represent matrices.
- A(3B−C)+(A−2B)C+2B(C+2A)
- A(B+C−D)+B(C−A+D)−(A+B)C+(A−B)D
- AB(BC−CB)+(CA−AB)BC+CA(A−B)C
- (A−B)(C−A)+(C−B)(A−C)+(C−A)2
- AB−BA
- 0
If A=[abcd] where a≠0, show that A factors in the form A=[10x1][yz0w].
If A and B commute with C, show that the same is true of:
A+B kA, k any scalar
- (kA)C=k(AC)=k(CA)=C(kA)
If A is any matrix, show that both AAT and ATA are symmetric.
If A and B are symmetric, show that AB is symmetric if and only if AB=BA.
We have AT=A and BT=B, so (AB)T=BTAT=BA. Hence AB is symmetric if and only if AB=BA.
If A is a 2×2 matrix, show that ATA=AAT if and only if A is symmetric or A=[ab−ba] for some a and b.
- Find all symmetric 2×2 matrices A such that A2=0.
- Repeat (a) if A is 3×3.
- Repeat (a) if A is n×n.
- A=0
Show that there exist no 2×2 matrices A and B such that AB−BA=I. [Hint: Examine the (1,1)- and (2,2)-entries.]
Let B be an n×n matrix. Suppose AB=0 for some nonzero m×n matrix A. Show that no n×n matrix C exists such that BC=I.
If BC=I, then AB=0 gives 0=0C=(AB)C=A(BC)=AI=A, contrary to the assumption that A≠0.
An autoparts manufacturer makes fenders, doors, and hoods. Each requires assembly and packaging carried out at factories: Plant 1, Plant 2, and Plant 3. Matrix A below gives the number of hours for assembly and packaging, and matrix B gives the hourly rates at the three plants. Explain the meaning of the (3,2)-entry in the matrix AB. Which plant is the most economical to operate? Give reasons.
lccll & Assembly & Packaging & &
FendersDoorsHoods & & = & A
For the directed graph below, find the adjacency matrix A, compute A3, and determine the number of paths of length 3 from v1 to v4 and from v2 to v3.
3 paths v1→v4, 0 paths v2→v3
In each case either show the statement is true, or give an example showing that it is false.
- If A2=I, then A=I.
- If AJ=A, then J=I.
- If A is square, then (AT)3=(A3)T.
- If A is symmetric, then I+A is symmetric.
- If AB=AC and A≠0, then B=C.
- If A≠0, then A2≠0.
- If A has a row of zeros, so also does BA for all B.
- If A commutes with A+B, then A commutes with B.
- If B has a column of zeros, so also does AB.
- If AB has a column of zeros, so also does B.
- If A has a row of zeros, so also does AB.
- If AB has a row of zeros, so also does A.
- False. If A=[1000]=J, then AJ=A but J≠I.
- True. Since AT=A, we have (I+AT=IT+AT=I+A.
- False. If A=[0100], then A≠0 but A2=0.
- True. We have A(A+B)=(A+B)A; that is, A2+AB=A2+BA. Subtracting A2 gives AB=BA.
- False. A=[1−224], B=[2412]
- False. See (j).
- If A and B are 2×2 matrices whose rows sum to 1, show that the rows of AB also sum to 1.
- Repeat part (a) for the case where A and B are n×n.
- If A=[aij] and B=[bij] and ∑jaij=1=∑jbij, then the (i,j)-entry of AB is cij=∑kaikbkj, whence ∑jcij=∑j∑kaikbkj=∑kaik(∑jbkj)=∑kaik=1. Alternatively: If e=(1,1,…,1), then the rows of A sum to 1 if and only if Ae=e. If also Be=e then (AB)e=A(Be)=Ae=e.
Let A and B be n×n matrices for which the systems of equations Ax=0 and Bx=0 each have only the trivial solution x=0. Show that the system (AB)x=0 has only the trivial solution.
The trace of a square matrix A, denoted trA, is the sum of the elements on the main diagonal of A. Show that, if A and B are n×n matrices:
\functr(A+B)=trA+trB. \functr(kA)=k\functr(A) for any number k. \functr(AT)=\functr(A). \functr(AB)=\functr(BA). \functr(AAT) is the sum of the squares of all entries of A.
- If A=[aij], then \functr(kA)=\functr[kaij]=∑ni=1kaii=k∑ni=1aii=k\functr(A).
- Write AT=[a′ij], where a′ij=aji. Then AAT=(∑nk=1aika′kj), so \functr(AAT)=∑ni=1[∑nk=1aika′ki]=∑ni=1∑nk=1a2ik.
Show that AB−BA=I is impossible.
[Hint: See the preceding exercise.]
A square matrix P is called an idempotent if P2=P. Show that:
- 0 and I are idempotents.
- [1100], [1010], and 12[1111], are idempotents.
- If P is an idempotent, so is I−P. Show further that P(I−P)=0.
- If P is an idempotent, so is PT.
- If P is an idempotent, so is Q=P+AP−PAP for any square matrix A (of the same size as P).
- If A is n×m and B is m×n, and if AB=In, then BA is an idempotent.
- Observe that PQ=P2+PAP−P2AP=P, so Q2=PQ+APQ−PAPQ=P+AP−PAP=Q.
Let A and B be n×n diagonal matrices (all entries off the main diagonal are zero).
- Show that AB is diagonal and AB=BA.
- Formulate a rule for calculating XA if X is m×n.
- Formulate a rule for calculating AY if Y is n×k.
If A and B are n×n matrices, show that:
- AB=BA if and only if
(A+B)2=A2+2AB+B2
- AB=BA if and only if
(A+B)(A−B)=(A−B)(A+B)
- (A+B)(A−B)=A2−AB+BA−B2, and (A−B)(A+B)=A2+AB−BA−B2. These are equal if and only if −AB+BA=AB−BA; that is, 2BA=2AB; that is, BA=AB.
In Theorem [thm:003584], prove
part 3; part 5.
- (A+B)(A−B)=A2−AB+BA−B2 and (A−B)(A+B)=A2−BA+AB−B2. These are equal if and only if −AB+BA=−BA+AB, that is 2AB=2BA, that is AB=BA.