Department of Aerospace Engineering
AE602 Mathematics for Aerospace Engineers
Solution to Assignment No. 2
2.1. If an m by n matrix A multiplies an n-dimensional vector x, how many separate multiplications are involved? What if A multiplies an n by p matrix B?
SOLUTION:
Let Amxn = a11⋯a1n⋮⋱⋮am1⋯amn
Let the n-dimensional vector x be,
xnx1 = x1x2⋮xn
Then (Amxn) .(xnx1) = (Ax)mx1 = Cmx1
Therefore Cmx1 = a11x1+a12x2+...+a1nxna21x1+a22x2+…+a2nxn⋮am1x1+am2x2+...+amnxn
From the above vector Cmx1 , in each row there are "n" number of multiplications involved and there are "m" number of rows in total. Hence there are "mn" number of separate multiplications involved.
Now for the second part of the problem,
Let Bnxp = b11⋯b1p⋮⋱⋮bn1⋯bnp
Let (Amxn).( Bnxp) = Dmxp
Dmxp = (a11b11+a12b21+...+a1nbn1)⋯(a11b1p+...+a1nbnp)⋮⋱⋮(am1b11+...+amnbn1)⋯(am1b1p+...+amnbnp)
Here for each element in Dmxp , there are "n" number of multiplications involved. The size of "D" matrix is "mxp". Hence in total there are "nmp" separate multiplications involved.
2.2. Write down the 3 by 2 matrices A and B which have entries aij=i+j and bij=-1i+j.
SOLUTION:
Entries of "A" matrix are given by aij = i+j
Now A3x2 = a11a12a21a22a31a32
a11=1+1=2 ; a12=a21=3 ; a22=a31=4 ; a32=5
Therefore A3x2 = 233445
Now B3x2 = b11b12b21b22b31b32
Entries of B matrix are given by bij = (-1)i+j
b11=b22=b31=1(since even power) ; b12=b21=b32= -1 (since odd power)
Therefore B3x2 = 1-1-111-1
2.3. True or false; give a specific counterexample when false.
a) If the first and third columns of B are the same, so are the first and third columns of AB.
b) If the first and third rows of B are the same, so are the first and third rows of AB.
c) If the first and third rows of A are the same, so are the first and third rows of AB.
d) AB2=A2B2.
SOLUTION:
a)
Let A = 13241010 ; B = 535646
AB = 23152334223411070110
Hence from the above matrix, it is true that if the first and third columns of B are the same, so are the first and third columns of AB.
b)
Let A = 1-12201008 ; B = 535646535
AB = 95915915401840
Hence from the above matrix it is false that if the first and third rows of B are the same, so are the first and third rows of AB.
c)
Let A = 1021021102 ; B = 0010821071
AB = 2014310231520143
From the above matrix, it is true that if the first and third rows of A are the same, so are the first and third rows of AB.
d)
Let A = 1234 ; B = 0028
(AB)2 = 1445762881152...... (1)
A2B2 = 1606403521408...... (2)
From (1) and (2), (AB)2 ≠ A2B2
2.4. Suppose A commutes with every 2 by 2 matrix AB=BA, and in particular
A=ac bd commutes with B1=10 00 and B2=00 10
Show that a=d and b=c=0. If AB=BA for all matrices B, and A is a multiple of the identity.
SOLUTION:
Given that A commutes with every 2 by 2 matrix AB=BA and
in particular A=ac bd commutes with B1=10 00 and B2=00 10
i.e., AB1 = B1A and AB2 = B2A
AB1 = abcd 1000 = a0c0
B1A = 1000 abcd = ab00
Therefore for AB1 = B1A , it is required that b=c=0...... (1)
AB2 = abcd0100 = 0a0c
B2A = 0100abcd = cd00
Therefore for AB2 = B2A , it is required that a=d (already c=0)...(2)
Also given in the last statement that "A" is a multiple of identity matrix...... (3)
Hence combining the results from (1), (2) & (3) , matrix A takes the form
A = a00a = a1001
Now let’s check if this "A" matrix commutes with any 2x2 "B" matrix
Let B = b11b12b21b22
AB = a1001b11b12b21b22 = ab11b12b21b22
BA = ab11b12b21b221001 = ab11b12b21b22
We can clearly see that AB = BA
Hence if AB = BA for all matrices B and A is a multiple of identity matrix , then a=d and b=c=0.
2.5. In summation notation, the i,j entry of AB is
ABij= k∑ aikbkj
If A and B are n by n matrices with all entries equal to 1, find ABij.
The same notation turns associative law ABC=ABC into
j∑ k∑ aikbkjcjl=k∑ aik j∑ bkjcjl
Compute both sides if C is also n by n, with every cjl=2.
SOLUTION:
Given ABij= k∑ aikbkj.
For i=j=1,
(AB)11 = a11b11+a12b21+a13b31+...... +a1nbn1
Also given A and B are n by n matrices with all entries equal to 1
Therefore (AB)11 = (1.1)+(1.1)+(1.1)+...... +(1.1)
= "n" times 1
(AB)11 = n
All the entries of (AB)ij matrix are "n"
AB = n⋯n⋮⋱⋮n⋯n
Now ABC=ABC turns into
j∑ k∑ aikbkjcjl=k∑ aik j∑ bkjcjl...... (1)
where C is also n by n, with every cjl=2
Computing the LHS of (1)
ABij . cjl = n⋯n⋮⋱⋮n⋯n2⋯2⋮⋱⋮2⋯2 = "n" times 2n⋯"n" times 2n⋮⋱⋮"n" times 2n⋯"n" times 2n
Therefore ABij . cjl = 2n2⋯2n2⋮⋱⋮2n2⋯2n2 ...... (2)
Computing the RHS
bkjcjl = BCkl = 1⋯1⋮⋱⋮1⋯12⋯2⋮⋱⋮2⋯2 = n times 2⋯n times 2⋮⋱⋮n times 2⋯n times 2
BCkl = 2n⋯2n⋮⋱⋮2n⋯2n
aik . BCkl = 1⋯1⋮⋱⋮1⋯12n⋯2n⋮⋱⋮2n⋯2n = "n" times 2n⋯"n" times 2n⋮⋱⋮"n" times 2n⋯"n" times 2n
aik . BCkl = 2n2⋯2n2⋮⋱⋮2n2⋯2n2 ...... (3)
(2) = (3) which proves the associative law
2.6. The matrices that "rotate" the x-y plane are
Aθ=cosθsinθ -sinθ cosθ.
a) Verify Aθ1Aθ2=Aθ1+θ2 from the identities for cosθ1+θ2 and sinθ1+θ2.
b) What is Aθ times Aθ?
SOLUTION:
a) To verify if Aθ1Aθ2=Aθ1+θ2
Aθ1 Aθ2=cosθ1-sinθ1sinθ1cosθ1cosθ2-sinθ2sinθ2cosθ2
=cosθ1cosθ2-sinθ1sinθ2-cosθ1sinθ2-sinθ1cosθ2sinθ1cosθ2+cosθ1sinθ2-sinθ1sinθ2+cosθ1cosθ2 .....(a)
cosθ1+θ2 = cosθ1cosθ2- sinθ1sinθ2
sinθ1+θ2. = sinθ1cosθ2+ cosθ1sinθ2
Substituting these expressions in (a) yields
Aθ1 Aθ2= cosθ1+θ2 -sinθ1+θ2. sinθ1+θ2. cosθ1+θ2 = Aθ1+θ2
b) To compute Aθ times Aθ
AθAθ = cosθsinθ -sinθ cosθcosθsinθ -sinθ cosθ
= cos2θ-sin2θ-sinθcosθ-sinθcosθsinθcosθ+sinθcosθsin2θ+cos2θ
We know that
cos2θ-sin2θ=cos2θ
2sinθcosθ = sin2θ
AθAθ= cos2θ-sin2θsin2θcos2θ = A2θ
2.7. Apply elimination to produce the factors L and U for
A=28 17 and A=311131113 and A=111144148.
SOLUTION:
a) A=28 17
R2→ R2 - 4*R1
→ 2103 = U is the upper triangular matrix obtained from elimination.
Now we know that the lower triangular matrix has "1" in the principal diagonal and the multipliers used in elimination below the principal diagonal.
Therefore L = 1041
"L" can also be found using the relation E21-1 = L = 1041
where E21= 10-41
A = LU = 10412103
b)
A=311131113
R1↔R3
→ 113131311 = A'
R2→ R2 - 1* R1
→ 11302-2311
R3→ R3 - 3*R1
→ 11302-20-2-8
R3→ R3 + 1* R2
→ 11302-200-10 = U which has pivots in the principal diagonal
Now lower triangular matrix , L = 1001103-11
A' = LU = 1001103-1111302-200-10 is the factorisation of A'
c)
A=111144148
R2→ R2 - 1*R1 ; R3→ R3 - 1*R1
→ 111033037
R3→ R3 - 1*R2
→ 111033004 = U
Therefore L takes the form , L = 100110111
A = LU = 100110111111033004
2.8. Find E2 and E8 and E-1 if
E=16 01.
SOLUTION:
E2 = 16 0116 01 = 112 01
To find E-1 :
We use Guass-Jordan elimination
EI = 10611001
where I = 1001
R2→ R2 - 6*R1
→ 100110-61
Therefore E-1 = 10-61
To find E8 :
First we find the characteristic equation
A-λI = 0
1-λ061-λ = 0
(1-λ)2=0
λ2-2λ+1=0
Since this is the characteristic equation of the given matrix, the matrix itself should satisfy this equation. That is
E2-2E+1=0
E2=2E-I
Now E3 =E2.E
=3E - 2I
Similarly E8=8E-7I
= 816 01-71001
E8 = 10481
2.9. (a) Under what conditions is A nonsingular, if A is the product
A= 1 00-1 10 0-11 d1d2d3 1-1 00 1-10 0 1?
(b) Solve the system Ax=b starting with Lc=b:
1 00-1 10 0-11 c1c2c3=001 =b.
SOLUTION:
a)
A= 1 00-1 10 0-11 d1d2d3 1-1 00 1-10 0 1 = LDU
where d1,d2 and d3 are the pivots of the matrix "A". The condition for "A" to be non-singular is
d1≠0 ; d2≠0 ; d3≠0
b)
Lc=b
1 00-1 10 0-11 c1c2c3=001 =b
c1=0
-c1+c2 =0
c2=0
-c2+c3 =1
c3=1
c1c2c3=001
Now c=Ux=DUx
d1000d2000d31-1 00 1-10 0 1x1x2x3 = 001
d1-d100d2-d200d3x1x2x3 = 001
The solution is x1x2x3 = 1d31d31d3
2.10. Solve by elimination, exchanging rows when necessary:
u+4v+2w=-2 v+w=0
-2u-8v+3w=32 and u+v=0
v+w=1 u+v+w=1
Which permutation matrices are required?
SOLUTION:
a)
u+4v+2w =-2
-2u-8v+3w=32
v+w=1
The augmented matrix is
A = 14-2-8012-233211
R2→ R2 + 2* R1
→ 1400012-272811
Since a22 has a zero pivot, rows 2 and 3 must be interchanged. Hence the permutation matrix P23 is required.
P23 . A= 1000010101400012-272811
= 1401002-211728 which is in Upper triangular form
Therefore 142011007uvw = -2128
The solution is uvw = 2-34
b) v+w=0
u+v =0
u+v+w=1
The augmented matrix is
A = 011111100011
Using the Permutation matrix P12 = 010100010 to interchange the rows 1 and 2
P12 . A = 110111001011
R3→ R3 - 1* R1
→ 110100001011 which is in Upper triangular form
Therefore 110011001uvw=001
The solution is uvw = 1-11
10