How it is possible to find the eigenvalues of a 2*2 matrice without using of eigen function?

조회 수: 1 (최근 30일)
Hi every one,
I tried to fine eigenvalues of 2*2 A matrix with det(A-landa*I) and my script is follow as:
clc
clear all
syms landa
a=input('please enter value of a:');
b=input('please enter value of b:');
c=input('please enter value of c:');
d=input('please enter value of d:');
A=[a b; c d]; I=[1 0;0 1]; B=landa*I;
D=det(A-B)
firstly, I defined landa as syms and after finding determinant, with a=1, b=2, c=3 and d=4, the result is 'landa^2 - 5*landa - 2' . (it is a 2 degree polynomial that saved in D)
so my problem is: How I could got the coefficients of this polynomial for finding the landa1 and landa2 as eigenvalues of A matrix?

채택된 답변

Torsten
Torsten 2016년 4월 15일
eigenvalues=solve(D==0,landa);
Best wishes
Torsten.
  댓글 수: 3
Torsten
Torsten 2016년 4월 15일
landa(1)=0.5*(a+d)+sqrt((0.5*(a+d))^2-(a*d-b*c));
landa(2)=0.5*(a+d)-sqrt((0.5*(a+d))^2-(a*d-b*c));
Best wishes
Torsten.
Habib
Habib 2016년 4월 15일
Dear Torsten,
your answers was very very useful, thanks.
best regards
habib

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by