Question: Write a function that diagonalises a complex (2x2) matrix if possible

so we have to Write a function that diagonalises a complex (2x2) matrix if possible,  

we need the argument to be a (2x2) matrix say A.   and we need the return value to be a list [a1 ;a2 ;b1;b2] of two complex numbers followed by two 2-vectors such that {b1,b2} is a basis for C^2 and so that  

Ab1 =a1b1 , Ab2=a2b2  if these exist. if not then the function should return an empty list []

also, the thing is that we're not allowed to load any maple packages, we have to do it by hand :'(

thanks <3

 

Please Wait...