need to solve in matlab and please explain. 4 For the matrixes A below, find a f
ID: 2901871 • Letter: N
Question
need to solve in matlab and please explain.
4 For the matrixes A below, find a factorization of A in the form A PCP or A PDP where C is Ta -bl a block-diagonal matrix with 2x2 blocks of the form and D is a diagonal matrix D Consider that the matrices P, C, D have real entries. Discuss your results (why did you obtain one type of factorization or the other, can you obtain both types of factorization for the same matrix) Hint: For each conjugate pair of eigenvalues, use the real and imaginary parts of one eigenvector in C to create two columns of P. Hint: Use the eig command to create the diagonal matrix D and find eigenvectors to create an invertible matrix P. 11 20 17 20 40 -86 -74 a) A 0 -5 10 10 10 28 60 53 T 8 5 -2 0 b) A 2 1 -2 10 8 6-3 3 -2 1 0Explanation / Answer
a)
A=[7 11 20 17;-20 -40 -86 -74;0 -5 -10 -10; 10 28 60 53];
[P,D]=eig(A);
which gives:
P =
-0.2132 - 0.2132i -0.2132 + 0.2132i 0.3430 - 0.0000i 0.3430 + 0.0000i
0.8528 0.8528 -0.0000 + 0.3430i -0.0000 - 0.3430i
0.0000 - 0.0000i 0.0000 + 0.0000i 0.5145 - 0.1715i 0.5145 + 0.1715i
-0.4264 + 0.0000i -0.4264 - 0.0000i -0.6860 -0.6860
D =
2.0000 + 5.0000i 0 0 0
0 2.0000 - 5.0000i 0 0
0 0 3.0000 + 1.0000i 0
0 0 0 3.0000 - 1.0000i
P inverse
code:
P';
which give
P' =
-0.2132 + 0.2132i 0.8528 0.0000 + 0.0000i -0.4264 - 0.0000i
-0.2132 - 0.2132i 0.8528 0.0000 - 0.0000i -0.4264 + 0.0000i
0.3430 + 0.0000i -0.0000 - 0.3430i 0.5145 + 0.1715i -0.6860
0.3430 - 0.0000i -0.0000 + 0.3430i 0.5145 - 0.1715i -0.6860
block diagonal factorization:
[P,C] = bdschur(A)
P =
0.9735 0.2285 -0.3585 -0.2398
0.2044 -0.8708 0.1021 -0.8419
0 0 -0.5889 0.0612
-0.1022 0.4354 0.7171 0.4796
C =
2.0000 -1.0623 0 0
23.5345 2.0000 0 0
0 0 3.0000 2.3480
0 0 -0.4259 3.0000
C is not the block diagonal form mentioned in the question so it cannot be facorized that way
P inverse
code:
P';
which give
P' =
0.9735 0.2044 0 -0.1022
0.2285 -0.8708 0 0.4354
-0.3585 0.1021 -0.5889 0.7171
-0.2398 -0.8419 0.0612 0.4796
b)
code:
A=[-8 5 -2 0;-5 2 1 -2 ; 10 -8 6 -3 ; 3 -2 1 0];
[P,D]=eig(A)
which gives:
P =
0.4083 - 0.0000i 0.4083 + 0.0000i 0.4082 - 0.0000i 0.4082 + 0.0000i
0.8165 0.8165 0.8165 0.8165
0.4081 + 0.0001i 0.4081 - 0.0001i 0.4084 + 0.0001i 0.4084 - 0.0001i
-0.0001 + 0.0001i -0.0001 - 0.0001i 0.0001 + 0.0001i 0.0001 - 0.0001i
D =
1.0e-003 *
-0.1878 + 0.1879i 0 0 0
0 -0.1878 - 0.1879i 0 0
0 0 0.1878 + 0.1878i 0
0 0 0 0.1878 - 0.1878i
code:
P'
which give;
P' =
0.4083 + 0.0000i 0.8165 0.4081 - 0.0001i -0.0001 - 0.0001i
0.4083 - 0.0000i 0.8165 0.4081 + 0.0001i -0.0001 + 0.0001i
0.4082 + 0.0000i 0.8165 0.4084 - 0.0001i 0.0001 - 0.0001i
0.4082 - 0.0000i 0.8165 0.4084 + 0.0001i 0.0001 + 0
block diagonal factorization:
code:
[P,C] = bdschur(A)
which gives:
P =
0.4083 -0.3651 0.4082 -0.7303
0.8165 -0.1824 -0.0001 0.5477
0.4081 0.7305 -0.4081 -0.3652
-0.0001 0.5476 0.8166 0.1826
C =
-0.0003 1.3425 -4.6668 1.1957
0 0.0000 1.4904 -16.6676
0 -0.0000 0.0000 6.7052
0 0 0 0.0003
C is not the block diagonal form mentioned in the question so it cannot be facorized that way
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.