jueves, 11 de abril de 2019

QR Decomposition (Householder Method) calculator Matrix A Online Step by step


https://atozmath.com/MatrixEv.aspx?q=qrdecomphh&q1=13%2C5%2C2%2C2%3B3%2C11%2C6%2C6%3B2%2C2%2C8%2C4%3B2%2C2%2C4%2C8%60qrdecomphh%60D#tblSolution

13 5 2 2
3 11 6 6
2 2 8 4
2 2 4 8

Solution:
Here A = 

13522

31166

2284

2248


A1 = 

13522

31166

2284

2248


a1 = 

13

3

2

2


||a1||=132+32+22+22=186=13.6382

v1=a1-sign(a11)||a1||e1 = 

13

3

2

2
 - 13.6382 × 

1

0

0

0
 = 

-0.6382

3

2

2


H1=I-2v1vT1vT1v1 = 

1000

0100

0010

0001
-217.4073

-0.6382

3

2

2
[-0.6382322]
 = 

0.95320.220.14660.1466

0.22-0.0341-0.6894-0.6894

0.1466-0.68940.5404-0.4596

0.1466-0.6894-0.45960.5404


H1A1 = 

0.95320.220.14660.1466

0.22-0.0341-0.6894-0.6894

0.1466-0.68940.5404-0.4596

0.1466-0.6894-0.45960.5404
 × 

13522

31166

2284

2248
 = 

13.63827.77234.9864.986

0-2.0322-8.0368-8.0368

0-6.6881-1.3578-5.3578

0-6.6881-5.3578-1.3578




Now removing 1st row and 1st column, we get
A2 = 

-2.0322-8.0368-8.0368

-6.6881-1.3578-5.3578

-6.6881-5.3578-1.3578


a2 = 

-2.0322

-6.6881

-6.6881


||a2||=(-2.0322)2+(-6.6881)2+(-6.6881)2=93.5914=9.6743

v2=a1-sign(a11)||a1||e1 = 

-2.0322

-6.6881

-6.6881
 + 9.6743 × 

1

0

0
 = 

-11.7064

-6.6881

-6.6881


H2=I-2v1vT1vT1v1 = 

100

010

001
-2226.5023

-11.7064

-6.6881

-6.6881
[-11.7064-6.6881-6.6881]
 = 

-0.2101-0.6913-0.6913

-0.69130.605-0.395

-0.6913-0.3950.605


H2A2 = 

-0.2101-0.6913-0.6913

-0.69130.605-0.395

-0.6913-0.3950.605
 × 

-2.0322-8.0368-8.0368

-6.6881-1.3578-5.3578

-6.6881-5.3578-1.3578
 = 

9.67436.3316.331

06.85072.8507

02.85076.8507




Now removing 1st row and 1st column, we get
A3 = 

6.85072.8507

2.85076.8507


a3 = 

6.8507

2.8507


||a3||=6.85072+2.85072=55.0588=7.4202

v3=a1-sign(a11)||a1||e1 = 

6.8507

2.8507
 - 7.4202 × 

1

0
 = 

-0.5695

2.8507


H3=I-2v1vT1vT1v1 = 

10

01
-28.4508

-0.5695

2.8507
[-0.56952.8507]
 = 

0.92330.3842

0.3842-0.9233


H3A3 = 

0.92330.3842

0.3842-0.9233
 × 

6.85072.8507

2.85076.8507
 = 

7.42025.2639

0-5.2298




Now removing 1st row and 1st column, we get


Since, H3H2H1A=R

H3H2H1A=

1000

0100

000.92330.3842

000.3842-0.9233
 × 

1000

0-0.2101-0.6913-0.6913

0-0.69130.605-0.395

0-0.6913-0.3950.605
 × 

0.95320.220.14660.1466

0.22-0.0341-0.6894-0.6894

0.1466-0.68940.5404-0.4596

0.1466-0.6894-0.45960.5404
 × 

13522

31166

2284

2248
 = 

13.63827.77234.9864.986

09.67436.3316.331

007.42025.2639

000-5.2298
 = R


Also A=H1H2H3R and A=QR, Q=H1H2H3

Q=H1H2H3=

0.95320.220.14660.1466

0.22-0.0341-0.6894-0.6894

0.1466-0.68940.5404-0.4596

0.1466-0.6894-0.45960.5404
 × 

1000

0-0.2101-0.6913-0.6913

0-0.69130.605-0.395

0-0.6913-0.3950.605
 × 

1000

0100

000.92330.3842

000.3842-0.9233
 = 

0.9532-0.249-0.15860.0654

0.220.9603-0.15860.0654

0.14660.08890.90370.3922

0.14660.08890.3647-0.9152




checking Q×R=A?

Q×R = 

0.9532-0.249-0.15860.0654

0.220.9603-0.15860.0654

0.14660.08890.90370.3922

0.14660.08890.3647-0.9152
 × 

13.63827.77234.9864.986

09.67436.3316.331

007.42025.2639

000-5.2298
 = 

13522

31166

2284

2248


and A = 

13522

31166

2284

2248



No hay comentarios:

Publicar un comentario