Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program, in the language of your choice, that takes as an input the 4 elements of a 2 by 2 matrix [M], and
Write a program, in the language of your choice, that takes as an input the 4 elements of a 2 by 2 matrix [M], and returns the following outputs: If the matrix does not have real eigenvalues, print "no real eigenvalues". If the matrix has one single eigenvalue and only one independent eigenvector, print "only one independent eigen- vector", and print the eigenvalue and the eigenvector's components on the original basis, enforcing it to have unit norm. . If the matrix is diagonalizable, print out its eigenvalues and the 4 elements of a matrix al such that M = (a) [D] [a] -1, as well as the four elements of its inverse [b] = [a] -1, using the result from Exercise 4. Make sure your program checks the final result. This is how the structure of your program should look like: def diagonalize (M11, M12, M21, M22): if(...): print("no real eigenvalues") if(...): print("only one independent eigenvector") print("eigenvalue = ", lambda) print("eigenvector components = ", V1, V2) if(...): print("real eigenvalues - ", lambda1, lambda2) print("transformation matrix = ", a11, a12, a21, a22) print("inverse transformation matrix = ", 111, 112, b21, b22) You should check that your program works with the examples of Exercise 3, that you will have worked out by hand. This exercise will make you think methodically about the diagonalization procedure. You are asked to print out your program and hand it with the homework. Try to keep is as concise as possible
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started