Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Math 170A Assignment #3

Due date and time: 11pm, August 27, 2023 (PDT)

1. A permutation matrix P is a matrix such that there is exactly one 1 in every row and every

colum and all other entries are zeros. Show that every permutation matrix is orthogonal.

Proof. Let ei  denote the vector where the ithentry is 1 and all other entries are zeros.  Then the permutation matrix P can be represented as

P = [ei1       ei2       ···   ein] .

To make P have exactly on e nonzero entry in every row and every column, P must be a square matrix, i.e., P e Rn n. Then

l e(e)                                   l0(1)   1(0)   ···(···)   0(0)

PT P =  '   i2  '  [ei1       ei2       ···   ein ] =  ' .(.)    .(.)            .(.) '  .

[el                                    [0(.)   0(.)   ···    1(.)l

So P is an orthogonal matrix.

2. Let Q e Rm n  be a matrix.  If〈Qx,Qy)=〈x,y)for all x,y e Rn , show that Q is isometric, i.e., show that QT Q = In.

Proof. 〈Qx,Qy)= (Qx)T (Qy) = xT QT Qy and〈x,y)= xTy.  If〈Qx,Qy)=〈x,y)for all x,y e Rn, then

xT QT Qx = xTy 今 xT (QT Q — In)y = 0,    Ax,y e Rn.

Simply choose x = ei, y = ej  for all i,j = 1, 2,...,n, we have every entry of (QT Q — In) equal zero, so QT Q — In  = 0.

3. Find a rotation matrix Q such that

Q [ 1(—)2(5)] =  [ 013] .

Solution. Let Q =  [ csin(os)θ(θ)   os(si)nθθ], we can solve from the linear system that cos θ =  12/13 and sinθ = 5/13.  So Q =  [ 5(1)/(2)1(/)3(13)    12/(5/1)13(2)].

4. Find real scalars c,s with c2 + s2 = 1 such that

'l0(1)   c(0)

[0   s

for all real scalars a,b e R.

0s'  'l 12(a)'      'l 13(a)'

c l(0')  5 l(b ') =   0(b) l(') 


Solution. Note that

0(1)   c(0)

[0   s

   s''(」)  ''(l)''(」)  =  ''(l)12c  5s''(」)  .

0    c l[ 5 l     [12s + 5cl


We can solve from 12c  5s = 13, 12s + 5c = 0 for.

c = 1(1)3(2),    s = − 13(5).

5. Let u  Rn  be with u2 = 1 and let Q = In  2uuT .  Show that

QT  = Q,    Q1  = QT ,    Q1  = Q,

Qu = u,    Qx = x  ⇐⇒  u,x = 0.

Proof. Since u2 = uTu = 1, we have uTu = 1.  Then

()u(I)n= 0     = QT ,

6.  Show that if τ = ±∥x∥2  is chosen such that τ  and x1  have the same sign, show that every entry ui  of the vector

l  x2(1)                lτ

u := τ(x)x1(y) =  ' τ x1   '  ,    y =  '    '

τ x(n)1 l             [0(.) l

satisfies |ui|  ≤  1 and show that 1 ≤ ∥u∥2  ≤ 2.

Proof. When i = 1, ui  = 1. When i = 2,...,n,

|ui|  =  =      1.

Since u1 = 1, it is clear that ∥u∥2  ≥ 1. Note that

^2x2(2) + 2              

=

∥x∥2 +

7. Find a reflector matrix Q such that

'l4(3)'      τ'

' '   =  '  0  '  .

[1l     [ 0 l

Solution.   Denote this linear system as Qx = y.   Since x1   >  0, we choose τ  =  IxI2   = ^32 + 42 + 1 + 32 + 1 = 6.  Then

l4(9)

u =  x y  = 1  ' 1 '  ,    γ = τ + x1  = 3

[1l

1    —3(2)6(7)   8(3)6   —4(9)   —1(2)2(7)   —4(9)

Q = I5  γuuT  =      '  9     4      53     3      1 '  .

54  ' 27    12   3      45     3 '

9     4     1    3     53 l

8. Let A =  [ 13   2].  Find a reflector Q and an upper triangular R such that A = QR.

Solution.

τ = Ia1 I2 = ^10,    γ = ,    u =  l   .

Q = I 2uuT  =  l ^0        0(0)] , R = QA =  l^010     .

9. Find the least square solution to the overdetermined system

[(l)   1l(」) [x2(x1)] =  [(l)l(」) .

Solution.  Denote the above system as Ax = b.  Apply the Gram-Schmidt process to get a QR decomposition of A.

r11 = Ia1 I2 = ^22 + 32 + 62,    u1 =   a1     = 1  l3(2)

Ia1 I2        7  [6l ,

1

7

(2 · ( — 1) + 3 · 9 + 6 · 4) = 7,

r22 = Ia2 r12u1 I = " l 36"  = ^32 + ( 6)2 + 22  = 7

u2 =

a2  r12u1

Ia2  r12u1 I2

l 36.

[ 2 l

So we have Q =   [(l)   6l(」) and R =  [0(7)   7(7)]. The least square solution can be computed by


x = R-1 QT b = 0(1)   1][3(2)

36   2(6)] [(l)l(」) = 103(6)] .


10. Let u,v be the vectors

l 22        l 2(1) 

u =  ' -2 '  , v =  ' -3 '  .

[ 2 l         [-4l

Apply the Gram-Schmidt process to find an orthonormal basis for the subspace span{u,v}. Use this to find an isometric matrix Q E R42  and an upper triangular R E R2根2  such that [u   v] = QR.

Solution.

1  l 22

r11 = IuI2 = 4,    q1  = 4  [('')2l('') ,

r12 =q1 , v= -1,    r22  = Iv - r12 q1 I2  = ^29,    q2  =    1      3(3) 

2^29   -- 7l(7 ') .

So we have

1       

Q =  ' -    -2   ,    R = [0(4)    .] .

     -