Uploaded by stellalaunay6

MidTerm2024

advertisement
BIOE 210 Linear Algebra for Biomedical Data Science 2024
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Department of Bioengineering
Midterm Exam March 7, 9:15-10:45 am in 2100 LUMEB
SHOW YOUR WORK. PLACE A BOX AROUND YOUR ANSWERS
1. (10 pts)
 
 
1
3
a. Let x = 2 and y =  3 . If a = 9, what are the possible angles between x
a
−1
and y.
Solution.
cos θ =
x·y
3+6−9
0
=
=
∥x∥∥y∥
∥x∥∥y∥
∥x∥∥y∥
Without calculating the norms, we see the numerator is zero,
so θ = π2 (2n − 1) for n = 1, 2, 3.... The result θ = π/2, 3π/2 is fine.
b. Find a if ∥x∥ = 4 for x above.
Solution.
p
1 + 4 + a2 = 4
5 + a2 = 16
√
a =
11
c. Expand vector yabove
standard
basis.
 
 ina 
0
0
1
Solution. y = 3 0 + 3 1 − 1 0 .
1
0
0
 
 
1
3



3  , z⊤ = −3 2 1 4 5 9 , find x⊤ yz.
d. For x = 2 , y =
9
−1
⊤
Solution. We found in part (a) that x⊤ y = 0, so x⊤ yz = 0 0 0 0 0 0 .
√ 3
e. Find the work in Joules done by a constant force of f = 12
Newtons applied
1
to an object over a distance of 1 meter along the y axis. Show a scalar product
that gives the result.
√
Solution. W = f · x =
3/2
1/2
⊤ 0
= 0.5 J.
1
1
BIOE 210 Linear Algebra for Biomedical Data Science 2024
2. (20 pts) Compute (a) AB, (b) CB⊤ A⊤ , (c) y⊤ ABC⊤ x, (d) (y⊤ ABC⊤ x)−1 ,
where




 
5 0
0 2
−1
1 3 −3
−1
A=
B = 4 4  C =  2 2 x =  0  y =
2 2 1
1
3 −1
−1 0
1
Solutions.
(a) AB =
8 15
.
21 7




0 2 30 14
8 21
(b) C(AB)⊤ =  2 2
=  46 56  .
15 7
−1 0
−8 −21
 
−1
30 46 −8
 0  = 3.
(c) Since (C(AB)⊤ )⊤ = ABC⊤ , y⊤ ABC⊤ x = −1 1
14 56 −21
1
(d) Because the result of the previous problem is a scalar, its inverse is simple: 1/3.
2
BIOE 210 Linear Algebra for Biomedical Data Science 2024
0
3. (15 pts) Unit vector â is initially located in the (x, y) plane at â = −
. With each
1
rotation it stops six times at angle increments 60◦ , 90◦ , 60◦ , 60◦ , 30◦ , and 60◦ relative
to its initial location to complete one rotation. Draw one graph with each rotation
of the vector, and give the (x, y) coordinates at each stop. Use rotation matrices to
show how you arrive at your 6 answers.
θ
sin θ
cos θ
0◦
0
1
30◦
√1/2
3/2
◦
√60
3/2
1/2
90◦
1
0
.
Solution.
1 3
− ,
2 2
𝑦
1 3
0
1 − 3
=
−1
2 −1
3
1
1 1
0 −1 1 3
90° + 60°:
=
1 0 2 −1
2 3
60°:
1 3
,
2 2
60°
90°
(−1, 0) 60°
30°
3 1
−
,−
2
2
60° 60°
3 1
,−
2
2
𝑥
60° + 90° + 60°:
1
2
1
2
(0, −1)
1
3
− 3 1 1 = 1 −1
2 3
1 2 3
60° + 60° + 90° + 60°:
1
2
1
3
− 3 1 −1 = −1
0
1 2 3
30° + 60° + 60° + 90° + 60°:
1
2
3
1
−1
3
60° + 30° + 60° + 60° + 90° + 60°:
1
2
Figure 1: Solution to Problem 3.
3
1
3
1
−1
= − 3
0
2 −1
− 3 1 − 3 = 0
−1
1 2 −1
BIOE 210 Linear Algebra for Biomedical Data Science 2024
4. (15 pts) (a) Are the vectors in set A ∈ R4 below linearly independent? (b) What
is the rank of A formed by assembling these vectors into columns of matrix A? (c)
What is rank(A⊤ )?
     
2
4
0 


     

3
6
  3 
A= 
−1 −2 −2





−1
0
−2
Solutions. (a) First form matrix A as needed for (b) and use Gaussian elimination to
place A in row echelon form.






1 2 0
1 2 0
2
4
0
3 6 3  −3R1 →R2 0 0 1 
3
R1 /2
6
3
 −→ 



−→
A=
0 0 −2
−1 −2 −2 R1 →R3 ,R1 →R4 0 0 −2 R
2 /3
0 2 −2
0 2 −2
−1 0 −2

1
0
R2 ↔R4 
−→ 

0
R2 /2
0


1
2 0
−R3 /2 0
1 −1
 −→ 
0 −2 −R3 →R4 0
0
0 1

2 0
1 −1

0 1
0 0
I can stop here, which is row echelon form. Given that there are three leading 1’s, we
see that the three vectors in A are linear independent.
(b) Rank(A) = 3 because rank is given by the number of leading 1’s.
(c) Because row rank equals column rank, no work is necessary to see that
rank(A⊤ ) = 3.
4
BIOE 210 Linear Algebra for Biomedical Data Science 2024
5. (20 pts) (a) Compute A−1 .


2 0 4
A = −1 3 1
0 1 2
(b) Verify your answer to part (a) is correct.
(c) Solve the following system of equations for x.
2x1 + 4x3 = 2
−x1 + 3x2 + x3 = −2 .
x2 + 2x3 = 5
Solution.






2 0 4 1 0 0
1 0 2 1/2 0 0
1 0 2 1/2
0
0
R1 /2
R2 /3
1/3 0
(a) −1 3 1 0 1 0 −→ 0 3 3 1/2 1 0 −→ 0 1 1 1/6
R1 →R2
−R2 →R3
0 1 2 0 0 1
0 1 2 0 0 1
0 0 1 −1/6 −1/3 1

1
−R3 →R2
−→ 0
−2R3 →R1
0
0
1
0
0
0
1
5/6
1/3
−1/6
2/3
2/3
−1/3


−2
5/6
−1 −→ A−1 =  1/3
1
−1/6
2/3
2/3
−1/3


−2
5
1
−1 =  2
6
1
−1
4
4
−2

−12
−6  .
6

(b) AA−1


2 0 4
5/6
2/3 −2
2/3 −1
= −1 3 1  1/3
0 1 2
−1/6 −1/3 1


5/3 − 2/3
4/3 − 4/3
−4 + 4
= −5/6 + 1 − 1/6 −2/3 + 2 − 1/3 2 − 3 + 1 = I3 .
1/3 − 1/3
2/3 − 2/3
−1 + 2
(c) Since we already computed A−1 , we can use
y = Ax
−1
A y = A−1 Ax
 

 



−29
5/6
2/3 −2
2
10/6 − 8/6 − 60/6
−58/6
1
2/3 −1 −2 =  2/3 − 4/3 − 15/3  = −17/3 = −17 .
x =  1/3
3
−1/6 −1/3 1
5
−1/3 + 2/3 + 15/3
16/3
16

5
𝒗𝟐
𝒙𝟐
𝒗𝟑
𝒗𝟏
𝒙𝟑
𝒙𝟏
𝒗𝟒
𝒗𝟔
𝒗𝟓
𝒙𝟒
BIOE 210 Linear Algebra for Biomedical Data Science 2024
𝑟
𝒗𝟐
𝒙𝟐
𝒗𝟑
𝑠
𝒗𝟏
𝒙𝟑
𝒙𝟏
𝒗𝟒
𝒗𝟔
𝒗𝟓
𝒙𝟒
Figure 2: Solution to Problem 6d.
6. (20 pts) (a) From Figure 2, write the stoichiometric matrix for the equation ẋ = Sv
under steady-state conditions, and express the result in reduced row echelon form.
(b) Is the matrix full rank? Explain.
(c) Express the steady-state (homogeneous) solution for this system in terms of free
variables v1 = r and v6 = s.
(d) Sketch the pathways through this network on the graph provided in terms of the
solution for part (c).
Solution. (a) For the steady state condition, where ẋ = 0

1
0
S=
0
0
−1
1
0
0
0
−1
1
0
0
0
−1
0
−1
0
0
1


0
1
0
0
 and S̃ = rref([S 0]) → 
0
1
−1
0
0
1
0
0
0
0
1
0
−1
−1
−1
0
0
0
0
1
0
1
1
−1

0
0
.
0
0
(b) S ∈ R4×6 and there are four leading ones. Consequently, S is full rank because
rank(S) = min(M, N ).
(c)

1
0
S̃ = 
0
0
0
1
0
0
0 −1 0
0 −1 0
1 −1 0
0 0 1
 
v1
 

0 
v1 − v4
0
 v2 





1  v3  0
v − v4 + v6
=   −→ 2

1 
v3 − v4 + v6
v
0
 4


−1
0
v5 − v6
v5
v6

=0
=0
=0
=0
Setting v1 = r and v6 = s,
v1 =
v2 =
v3 =
v4 =
v5 =
v6 =
v4 = r
v4 − v6 = r − s
v4 − v6 = r − s
r
v6 = s
s
 
 
1
0
1
−1
 
 
1
 
 + s −1
and therefore v = r 
1
0
 
 
0
1
0
1
(d) See red line pathways in Figure 2. Notice how the “fundamental pathways”
through this system are NOT the upper and lower paths. They are the linear and
circular paths!
6
BIOE 210 Linear Algebra for Biomedical Data Science 2024
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Department of Bioengineering
Midterm Exam March 7, 9:15-10:45am in 2100 LUMEB
SHOW YOUR WORK. PLACE A BOX AROUND YOUR ANSWERS
1. (10 pts)
 
 
1
3
a. Let x = 2 and y =  3 . If a = 9, what are the possible angles between x
a
−1
and y.
b. Find a if ∥x∥ = 4 for x above.
c. Expand vector y above in a standard basis.
 
 
3
1
d. For x = 2 , y =  3  , z⊤ = −3 2 1 4 5 9 , find x⊤ yz.
−1
9
√ 3
Newtons applied
1
to an object over a distance of 1 meter along the y axis. Show a scalar product
that gives the result.
e. Find the work in Joules done by a constant force of f = 21
7
BIOE 210 Linear Algebra for Biomedical Data Science 2024
2. (20 pts) Compute (a) AB, (b) CB⊤ A⊤ , (c) y⊤ ABC⊤ x, (d) (y⊤ ABC⊤ x)−1 ,
where




 
5 0
0 2
−1
1 3 −3
−1
A=
B = 4 4  C =  2 2 x =  0  y =
2 2 1
1
3 −1
−1 0
1
8
BIOE 210 Linear Algebra for Biomedical Data Science 2024
0
3. (15 pts) Unit vector â is initially located in the (x, y) plane at â = −
. With each
1
rotation it stops six times at angle increments 60◦ , 90◦ , 60◦ , 60◦ , 30◦ , and 60◦ relative
to its initial location to complete one rotation. Draw one graph with each rotation
of the vector, and give the (x, y) coordinates at each stop. Use rotation matrices to
show how you arrive at your 6 answers.
θ
sin θ
cos θ
0◦
0
1
30◦
√1/2
3/2
9
◦
√60
3/2
1/2
90◦
1
0
BIOE 210 Linear Algebra for Biomedical Data Science 2024
4. (15 pts) (a) Are the vectors in set A ∈ R4 below linearly independent?
(b) What is the rank of A formed by assembling these vectors into the columns of
matrix A?
(c) What is rank(A⊤ )?
     
2
4
0 


     

3  6  3 
A= 
−1 −2 −2





−1
0
−2
10
BIOE 210 Linear Algebra for Biomedical Data Science 2024
5. (20 pts) (a) Compute A−1 .


2 0 4
A = −1 3 1
0 1 2
(b) Verify your answer to part (a) is correct.
(c) Solve the following system of equations for x.
2x1 + 4x3 = 2
−x1 + 3x2 + x3 = −2 .
x2 + 2x3 = 5
11
BIOE 210 Linear Algebra for Biomedical Data Science 2024
𝒗𝟐
𝒙𝟐
𝒗𝟑
𝒗𝟏
𝒙𝟑
𝒙𝟏
𝒗𝟒
𝒗𝟔
𝒗𝟓
𝒙𝟒
Figure 3: Graph for Problem 6.
𝒙
6. (20 pts) (a) From Figure 2, write𝒗𝟐the 𝟐stoichiometric
matrix for the equation ẋ = Sv
𝒗𝟑
under steady-state conditions,
and
express
the
result
in reduced row echelon form.
𝒗𝟏
𝒗𝟒
𝒙𝟑
𝒙
𝟏
(b) Is the matrix full rank? Explain.
𝒗
𝒗𝟓
𝟔
(c) Express the steady-state (homogeneous)
solution for this system in terms of free
𝒙𝟒
variables v1 = r and v6 = s.
(d) Sketch the pathways through this network on the graph provided in terms of the
solution for part (c).
12
Download