Homework 2
24-677 Special Topics: Linear Control Systems Prof. D. Zhao
Due: Sept 10, 2019, 08:30 am. Submit within deadline.
• Your online version and its timestamp will be used for assessment. The paper version, will only be used for backup purposes.
• We will use Gradescope ( https://www.gradescope.com/) to grade. The link is on the panel of CANVAS. If you are confused about the tool, post your questions on Piazza.
• At the start of every exercise you will see topic(s) on what the given question is about and what will you be learning.
• The Gradescope Autograder python script for submitting your theory homework an- swers will be given to you. The script is named ”hw2 theory.py” and you have to submit it with your answers. Carefully refer to the further instructions given in the script for submission format.
• For the programming assignment, copy and paste, or export your answer script into a python file named ”hw2 script.py”. Follow the further instructions given in the jupyter notebook named ”PHW2 qs.ipynb” for information on submission format of your answers.
• Submit hw2 theory.py, hw2 script.py, hw2 output.npy to Gradescope under ”Pro- gramming Assignment 2” and pdf/images to ”Homework 2”.
• We advise you to start with the assignment early. All the submissions are to be done before the respective deadlines of each assignment. For information about the late days refer to the Syllabus in Canvas.
• Any extraneous changes made to the Gradescope Autograder script which may result in error in compilation of the Autograder will result in point deduction.
1
Exercise 1. Linear dependence Consider the following set of vectors.
Determine whether they are Linearly dependent or independent.
1.
2.
3.
4.
−1 1 2
−9 , 3 , −2 in the space of real 3 -tuples over the field of reals, 001
(R2, R).
2−i 1+2i −i
−i , −i · 3+4i in the space of complex pairs over the field of
reals,(C2, R).
{2s2 +2s−1,−2s2 +2s+1,s2 −s−5} in the space of polynomials over the field of
reals.
1 1 1 3
1 3 1 5 {x1,x2,x3,x4}suchthat: x1 = 1 ,x2 = 2 ,x3 = 2 andx4 = 5
Solution:
1. consider 3 constant a, b, c
−1 1 2 0 Let: a −9 + b 3 + c −2 = 0
0010
Solving the set of equations, a = b = c = 0 Hence Linearly Independent.
2 − i 1 + 2i −1 0 2.a −i +b −i +c 3+4i = 0
Solving the set of equations, a = b = c = 0 Hence linearly independent
3. a(2s2 +2s−1)+b(−2s2 +2s+1)+c(s2 −s−5)=0 Here, after solving, it is found that a = b = c = 0 Hence Linearly Independent.
4. Another way of solving these type of Questions is by
solving the corresponding linear system of equations: 1 2 2 5
With R2 = R2 − R1, R3 = R3 − R1, R4 = R4 − R1:
1427
2
1113
1 3 1 5 1427
1113 0112 0 2 0 2 0314
Then after R3 = R3 − 2R2, R4 = R4 − 3R2 :
And R4 = R4 − R3 :
1113 0112 0 0 − 2 − 2 0 0 −2 −2
1113 0112 0 0 − 2 − 2
0000 we see that {x1, x2, x3, x4} is linearly dependent
3
Exercise 2. Norms
What are the 1-norm, 2-norm, and infinite-norm of the vectors
Solution: The 1-norm is
the 2-norm is
the infinite norm is
2 1 x1=−3 x2=1
5 −1
||x1||1 =3i=1|xi|=|2|+|−3|+|5|=10 ||x2||1 =3i=1|xi|=|1|+|−1|+|1|=3
||x1||2 = 3i=1 x2i = 22 + (−3)2 + 52 = √38 ||x2||2 = 3i=1 x2i = 12 +(1)2 +12 = √3
||x1||∞ = max1≤i≤n |xi| = 5 ||x2||∞ = max1≤i≤n |xi| = 1
4
Exercise 3. Change of basis
Let B = {b1, b2} and C = {c1, c2} be bases for a vector space V, and suppose b1 =6c1 −2c2 andb2 =9c1 −4c2
1. Find the change-of-basis matrix from B to C .
2. Consider x = −3b1 + 2b2. Using the change-of-basis matrix obtained in question 1,
find the coordinates of x in basis C. Solution:
1. Since, b1 = 6c1 − 2c2 and b2 = 9c1 − 4c2, 6 9
[b1]C= −2 , [b2]C= −4 ,
which gives the change of basis matrix P =
C→B
−3
2. Since, x = −3b1 + 2b2, [x]B = 2 ,
6 9−3 0
Hence, [x]C = P [x]B =
C→B −2 −4
2
=
−2
5
69 −2 −4
Exercise 4. Basis and span
Determine the basis for W ⊂ R4 spanned by four vectors
−1 2 3 5
2 5 ,
10 15 −11 −15
Solution:
Checking for linear dependence
−1 2 3 5 0 a1+b1+c 2 +d 5 =0
−5 7 10 15 0 7 −8 −11 −15 0
{y1, y2, y3, y4} = 3
11 , , −5 7
7 −8
4 −1
Isz= −1 ∈W? isu= 9 ∈W? isv= −1 ∈W?
13 12 −3 −17 −8 3
1. −a+2b+3c+5d=0
2. a+b+2c+5d=0
3. −5a+7b+10c+15d=0 4. 7a−8b−11c−15d=0
Checking for linear dependency:
7 −8 −11 −15 With R3 = R3 − 3R1, R4 = R4 + 3R1:
−1 2 3 5 1 1 2 5 −2 1 1 0
4 −2 −2 0 WithR4=R4+2R3,followedbyR3 =R3 +R2
−1 2 3 5 1 1 2 5 −1 2 3 5
0000 6
−12 3 5 1125 −5 7 10 15
Hence only two of them are linearly independent and the remaining two can be expressed in terms of the first 2.
3 −1 Now, 2 =α 1 +β
2 1
10 −5
−1 7 −8
7 5 −1 2
Hence, β = 5/3, α = 1/3
15 −5 7 And, 5 =α 1 +β 1 .
−15 7 −8 −α + 2β = 5
α+β=5
β = 10/3, α = 5/3
Here, the third and the fourth vectors in the set can be represented in terms of 1st and the 2nd vector. Thus the vector space spanned by the 4 vectors can be spanned with 1st and 2nd vectors
−1 2
−5 7 Thusbasisis: 1, 1
−α+2β=3 ⇒β=2/3;α=−5/3 α + β = −1
−8 7 −8 −α + 2β = 4 ⇒ β = 13/3; α = 14/3
α+β=9
But when substitute in 3rd equations, we get −5α + 7β = 7 Hence LHS RHS doesnt match.
Hence, u ∈/ W
−1 −1 2
Andv=−1=α 1+β 1 − 3 − 5 7
3 7 −8 −α + 2β = −1 ⇒ β = −2/3; α = −1/3
α + B = −1 Hence, v ∈ W
7 −8
Nowconsiderthesecondpart,z= −1 =α 1 +β 1
Hence, z ∈ W
Similarly,u= 9 =α 1+β 1
4 −1
12 −5 7
3 −1 2
13 −5 7 −17 7 −8
2
7
Exercise 5. Inner product
Findtheinnerproductofthefollowinggivenvectorsx1 =[1,12,18]T andx2 =[25,37,11]T.
Solution:
Inner product of two matrices can be defined with these properties:
8