You are on page 1of 3

9 QR Decomposition: Problems

Square QR-decompostion, Problems to be done “by hand”

9.1 Do QR decomposition of the following matrices:


" # " # " #
3 17 −10 17 20 103
A= , B= , C= ,
−4 −6 −24 7 21 −18
   
−14 56 28 1 −3 14
D =  −21 35 91  , E= 2 0 −5  ,
   
42 −21 112 −2 −6 −7

9.2 QR decompose the matrix A below, and then solve


Ax = b by using this QR decomposition.
   
2 −1 2 6
A= 6 4 13  b =  53  .
   
−3 −9 11 12

9.3 Do the same as the previous question for


   
−6 6 7 3
A =  −2 −5 −7  b =  −20  .
   
3 −24 −7 9

Reduced QR-decomposition, Problems to be done “by hand”

9.4 Do reduced (incomplete) QR decomposition of the matrices


below.
 
  4 4  
  5 −1 12 6 30
−1 26  4 4 
 3 9     4 2 −18 
A =  −4 −4  , B= , C= 4 20  , D=
       
1 7  −6 −3 −1 

8 −19
 
8 8 
 

1 7 0 7 7
12 28

9.5(a) Do reduced QR decomposition of the (4 × 2)-matrix


A below.
 
1 3 3x + y = 18
 1 0  y = 2
A= ,
 
 1 2  2x + y = 12
1 3 3x + y = 16
2

9.5(b) Explain the simplification that occurs in the nor-


mal equations AT Ax̃ = AT b when A is expressed in
the form A = QR. Then use the reduced QR decom-
position of A above in order to find the least squares
solution of the over determined system above.

9.6 Do the same as the previous question for

−x + 11y = 20
3x − 21y = −40
x − 11y = −22
5x − 19y = −30

9.7 Do the same as the previous question for

2a + 2b = 10
a + b =4
a + 9b = 20
3a + 11b = 25
a + b =5

Practical problems (to be done using MATLAB)

9.8 The figure shows an adrenalin molecule with four of


carbon atoms numbered as C0 , C1 , C2 , and C3 . Let
C0 be at the origin of the system of axes. Label the
vector from C0 to Ck as xk (the coordinates here are
in Angstroms). Then
     
1.447 −1.073 −0.243
x1 = 0.456  , x2 = 0.779  , x3 = −1.194  .
     
0.263 0.450 −0.689
In order to simulate reactions with this molecule com-
putationally, the chemist wants all coordinates to be
expressed in the plane of the ring structure as well as
perpendicular to this plane. In other words, he/she
needs the unit vectors q1 , q2 and q3 , with q1 in the
direction of x1 . Can you supply these three vectors to
him/her?
3

Use MATLAB. Note that the three vectors x1 , x2 , and


x3 are already in a plane, therefore QR decomposition
will only find q1 and q2 . You must then compute q3
yourself as a vector that is perpendicular to both q1
and q2 .

9.9(a) Express the over determined system below in the


form Ax = b. Then find the Q̄R decomposition of
A. You may obtain it either by means of the Gram-
Schmidt algorithm, and then use the hint below to
check your answer, or you may use the hint directly to
obtain Q̄ and k (k is a constant). The latter method
is less work.
2a + 4b + 12c = 22  
6a + 5b + 9c = 19 1 1 2
1a − 5b − 2c = 2 Hint: R = k 0 1 1 
 
2a + 4b + 7c = 12 0 0 1
2a + 4b + 4c = 6

9.9(b) Then use the reduced QR decomposition of A in


(a) above to find the least squares solution of the over
determined system in (a).

You might also like