kill(all)$

appendix : diagonalization,complex matrix  (type :H)
peter.vlasschaert@gmail.com,18/02/2020

see : youtube ,https://www.youtube.com/watch?v=VYS9EYZ3gC

d1: matrix(
 [2,1-%i], 
 [1+%i,3]
);

find :eigenvalues
=============

d4: matrix(
 [1,0], 
 [0,1] 
);

d3:expand(d1-λ*d4);

d5:determinant(d3)=0;

p1:solve(d5,λ);

rem:

p2:(%i)^2;

=> λ=1

d6a:subst([p1[1]],d3);

=> λ=4

d6b:subst([p1[2]],d3);

eigenvectors,eigenvalue
==================

p3a:eigenvectors(d1);
p3b:eigenvalues(d1);

eigenvaluie : matrix
==============

Λ1:apply('matrix,p3b);

Λ:matrix([4,0],[0,1]);

eigenvectors:matrix
==============

p3a1:length(p3a);

p3a2a:p3a[1];

p3a2b:p3a[2];

λ =4

p3a3b1:p3a2b[1];

p3a3b1b:flatten(p3a2b[1]);

p3ab1:transpose(%);

λ=1

p3a3b2:p3a2b[2];

p3a3b2b:flatten(p3a2b[2]);

p3ab2:transpose(%);

check :eigenvectors or orthogonal
=========================

q:p3a3b1b.(conjugate(transpose(p3a3b2b)));

q1:expand(q);

ss:matrix(p3a3b1b,p3a3b2b);

s:transpose(ss);

sh1:conjugate(s);
sh:transpose(sh1);

problem :p6a is not the same as d1
========================

p6:s.Λ.sh;
p6a:expand(p6);