Contents
Homework 5
True/False?
a. the matrix product AB is defined for any two matrices A and B.
b. if the matrix product AB is defined then the matrix product BA also is defined.
c. if A is an n×m matrix, and if Ax=0 for some x∈Rm then A=O. (O is the n×m zero matrix.)
d. if A and B are two n×n matrices then (A+B)2=A2+2AB+B2
a. False A and B have to have compatible sizes: if A is an
n×m matrix then B must be an m×k matrix.
b. False If
A is n×m and B is m×k, then AB is defined. But,
unless k=n, BA is not defined.
c. False Ax=0 only means that x∈N(A).
d. False This is only true if AB=BA. See problem 6 below.
If A:V→W and B:U→V are linear transformations of vector spaces, then show that the composition AB:U→W also is linear. The composition is defined by (AB)(x)=A(B(x)))
We have to show that (AB)(sx+ty)=s(AB)x+t(AB)y for all x,y∈V and all s,t∈F:
(AB)(sx+ty)=A(B(sx+ty))=A(sBx+tBy)=sA(Bx)+tA(By)=s(AB)(x)+t(AB)(y)(def of AB)(B is linear)(A is linear)(def of AB, twice)
Therefore AB is linear.
2. Reflection, projection, and their matrices
Let α∈(0,2π) be a given angle, and let ℓα be the line in R2 through the origin whose slope is tanα (its equation is y=xtanα).
Let Sα:R2→R2 be reflection in the line ℓα. You may assume that Sα is linear.
a. Find the matrix of Sα with respect to the standard basis {e1,e2}
b. Find the matrix of Sα with respect to the basis {v,w} where v=(sinαcosα), w=(cosα−sinα). Suggestion: first make a drawing of the line ℓα and the vectors v,w.
c. Verify in both cases a and b that the matrix M you get satisfies M2=I.
d. Let Pα:R2→R2 be perpendicular projection on the line ℓα. Find the matrix of Pα with respect to the standard basis {e1,e2}. Hint: use geometry to show that Pαx=21(Sαx+x) and conclude that Pα=21(Sα+I).
e. Find the matrix of the projection Pα with respect to the basis v=(sinαcosα), w=(cosα−sinα).
a. Use a drawing to compute the coordinates of Sαe1 and Sαe2.
Finding Sαe2 :

Sαe1=(sin2αcos2α), and Sαe2=(−sin(2π−2α)cos(2π−2α))=(−cos2αsin2α).
Hence the matrix of Sα with
respect to the standard basis is
[Sα]e1,e2=(cos2αsin2αsin2α−cos2α)
b. The vector v lies on the line of reflection, so Sαv=v. The
vector w is perpendicular to the line of reflection, so Sαw=−w.
Therefore the matrix of Sα with respect to the basis {v,w} is
[Sα]v,w=(100−1).
c. The first matrix we found was M=[Sα]e1,e2=(cos2αsin2αsin2α−cos2α), so we find
M2=(cos2αsin2αsin2α−cos2α)(cos2αsin2αsin2α−cos2α)=(cos22α+sin22αsin2αcos2α−cos2αsin2αcos2αsin2α−sin2αcos2αsin22α+cos22α)=(1001)=I
For the other matrix M=[Sα]v,w=(100−1) the computation is easier and also gives M2=I.
d. Pαx=21(x+Sαx), so we have Pαe1=(21sin2α21(1+cos2α)) and Pαe2=(21sin2α21(1−cos2α)). Thus
[Pα]e1,e2=(21(1+cos2α)21sin2α21sin2α21(1−cos2α))
e. [Pα]v,w=(1000)
3. Some matrix products
Compute AB and BA for the following matrices
a. A=(1221), B=(1411)
AB=(9633), BA=(3639)
b. A=(10a1), B=(10b1)
AB=(10a+b1), and BA=(10a+b1), so for these matrices AB=BA
c. A=⎝⎜⎛100a100b1⎠⎟⎞,
B=⎝⎜⎛100c100d1⎠⎟⎞.
AB=(100a+c10adb+d1),
BA=(100a+c10bcb+d1)
d. A=(a1a2), B=(b1b2).
AB=(a1b1+a2b2), BA=(a1b1a1b2a2b1a2b2). In this example AB and BA both are defined, but they don't even have the same size.
4. Matrix powers
Consider the matrix
A=(001100010)
a. Compute A3. Then compute A2020.
A2=(010001100), A3=(100010001), i.e. A3=I.
Once you know A3=I you get A4=AA3=AI=A, A5=A2A3=A2, A6=A3=I, ... etc.
Since 2020=673⋅3+1, you get A2020=A3⋅673+1=A1=A.
b. Find the inverse of A.
AA2=A3=I and A2A=A3=I, so A2 is the inverse of A.
c. Find a 2×2 matrix B for which B5=I. (hint: rotations).
B=I=(1001) is a valid answer. To find other answers consider the rotation matrices R(θ)=(cosθsinθ−sinθcosθ), where θ∈R.
We know from lecture that R(θ)R(ϕ)=R(θ+ϕ).
Therefore
R(ϕ)5=R(ϕ)R(ϕ)R(ϕ)R(ϕ)R(ϕ)=R(5ϕ)
Choose ϕ so that 5ϕ=2π, i.e. choose ϕ=52π=72∘, then
B=R(52π)=(cos52πsin52π−sin52πcos52π)
satisfies B5=I.
5. Derivatives and matrices
Let V=Pn(R) be the space of polynomials of degree at most n, and let β={1,x,x2,…,xn} be the standard basis on V
a. Find the matrix of the linear transformation D:V→V given by (Df)(x)=f′(x).
(When n=3) To find the matrix of D with respect to the basis {1,x,x2,x3} compute D(1),D(x),D(x2),D(x3) and express them as linear combinations of {1,x,x2,x3}:
D(1)=0D(x)=1D(x2)=2xD(x3)=3x2=0⋅1+0⋅x+0⋅x2+0⋅x3=1⋅1+0⋅x+0⋅x2+0⋅x3=0⋅1+2⋅x+0⋅x2+0⋅x3=0⋅1+0⋅x+3⋅x2+0⋅x3
The coefficients of D(1) go in the first column of the matrix of D, etc. We get
D=⎝⎜⎜⎜⎛0000100002000030⎠⎟⎟⎟⎞
For any value of n the matrix D is an (n+1)×(n+1) matrix, given by
D=⎝⎜⎜⎜⎜⎜⎜⎜⎛00000100000200000300⋱00000n0⎠⎟⎟⎟⎟⎟⎟⎟⎞
b. Assume that n=3 and let D be the matrix of D you found in a. Compute D2, D3, ... and Dk for each integer k∈N.
D2=(0000000020000600), reflecting the fact that D(D(1))=0, D(D(x))=0, D(D(x2))=D(2x)=2, and D(D(x3))=D(3x2)=6x.
D3=(0000000000006000),
D4=(0000000000000000)=O
D5=D6=⋯=O
c. Compute the matrix T of the linear transformation T:V→V defined by Tf(x)=f(x+1) (assume again n=3).
Compute T(1),T(x),T(x2),T(x3) and express them as linear combinations of {1,x,x2,x3}:
T(1)=1T(x)=x+1T(x2)=(x+1)2=x2+2x+1T(x3)=(x+1)3=x3+3x2+3x+1=1⋅1+0⋅x+0⋅x2+0⋅x3=1⋅1+1⋅x+0⋅x2+0⋅x3=1⋅1+2⋅x+1⋅x2+0⋅x3=1⋅1+3⋅x+3⋅x2+1⋅x3
Therefore the matrix T of T is
T=⎝⎜⎜⎜⎛1000110012101331⎠⎟⎟⎟⎞
d. Show that T=I+D+2!1D2+3!1D3.
Use the values of Dk that we computed in b above:
I+D+2!1D2+3!1D3==(1000010000100001)+(0000100002000030)+21(0000000020000600)+61(0000000000006000)=(1000010000100001)+(0000100002000030)+(0000000010000300)+(0000000000001000)=(1000110012101331)=T
6. Commutators
The commutator of two square matrices A and B is defined to be [A,B]=defAB−BA. It is called the commutator because AB=BA (“A and B commute”) holds if and only if [A,B]=0.
a. Show that [A,B]=−[B,A] for all n×n matrices A,B.
[B,A]=BA−AB=−AB+BA=−(AB−BA)=−[A,B].
b. Compute [I,A] for any n×n matrix A (I is the identity matrix).
For any n×n matrix A one has $\cA I=I\cA=\cA $.
Therefore [A,I]=AI−IA=A−A=O.
c. Show that [tA+sB,C]=t[A,C]+s[B,C] for all n×n matrices A,B,C.
[tA+sB,C]=(tA+sB)C−C(tA+sB)=tAC+sBC−tCA−sCB=tAC−tCA+sBC−sCB=t(AC−CA)+s(BC−CB)=t[A,C]+s[B,C]
d. Let C be some n×n matrix, and compute [Ck,Cl] where k,l∈N.
Then compute [A,B] where A=I+C2 and B=C−2C2.
For all k,l one has CkCl=Ck+l, so [Ck,Cl]=CkCl−ClCk=Ck+l−Cl+k=O.
First computation of [A,B] where A=I+C2 and B=C−2C2, directly from the definition of the commutator:
[I+C2,C−2C2]=(I+C2)(C−2C2)−(C−2C2)(I+C2)=C−2C2+C3−2C4−C+2C2−C3+2C4=O(all terms cancel)
Second, alternative, computation using the properties in b and c of this problem:
[I+C2,C−2C2]=[I,C−2C2]+[C2,C−2C2]=O+[C2,C]−2[C2,C2]=O+O−2O=O
e.
Compute the commutator of
A=⎝⎜⎛0a3−a2−a30a1a2−a10⎠⎟⎞B=⎝⎜⎛0b3−b2−b30b1b2−b10⎠⎟⎞
Compare the result with the cross product of the vectors
(a1a2a3)
and
(b1b2b3)
(for cross product see here or the second minute of this)
ABBA[A,B]=AB−BA=(−a2b2−a3b3a1b2a1b3a2b1−a1b1−a3b3a2b3a3b1a3b2−a1b1−a2b2)=(−b2a2−b3a3b1a2b1a3b2a1−b1a1−b3a3b2a3b3a1b3a2−b1a1−b2a2)=(0a1b2−a2b1a1b3−a3b1a2b1−a1b20a2b3−a3b2a3b1−a1b3a3b2−a2b30)
If we call C=[A,B] then our computation shows that C is of the form
C=(0c3−c2−c30c1c2−c10) where
(c1c2c3)=(a2b3−a3b2a3b1−a1b3a1b2−a2b1)=(a1a2a3)×(b1b2b3)
f. Suppose A and B are two n×n matrices and suppose they satisfy
(A+B)2=A2+2AB+B2.
Show that AB=BA.
Expand the square:
(A+B)2=(A+B)(A+B)=A(A+B)+B(A+B)=A2+AB+BA+B2
So (A+B)2=A2+2AB+B2 only holds if AB=BA.