Professional Documents
Culture Documents
Question 1:
1. Aim of the experiment:
Aim of this experiment is using matlab to find characteristic polynomial, eigen values
and eigen vectors of a given matrix.
2. Mathematical Procedure:
3. Matlab Code:
clc
clear all
A=input("Enter the Matrix: ");
ce=poly(A);
disp("Characteristic Equations")
disp(ce)
disp("roots:")
variable=roots(ce)
EV=eig(A);
disp("Eigenvalues")
disp(EV)
[P D]=eig(A);
disp("Eigenvectors")
disp(P)
EVI=eig(inv(A));
disp("Eigenvalues of inv(A)")
disp(EVI)
EVT=eig(A');
disp("Eigenvalues of transpose of A")
disp(EVT)
B=2*(A^2)-5*A+4*eye(3);
EVB=eig(B);
disp("Eigenvalues of B")
disp(EVB)
4. Input:
Output:
Characteristic Equations
1.0000 -6.0000 9.0000 -4.0000
roots:
variable =
4.0000
1.0000
1.0000
Eigenvalues
1.0000
1.0000
4.0000
Eigenvectors
0.4082 0.7071 -0.5774
-0.4082 0.7071 0.5774
-0.8165 0 -0.5774
Eigenvalues of inv(A)
0.2500
1.0000
1.0000
Eigenvalues of transpose of A
1.0000
1.0000
4.0000
Eigenvalues of B
1.0000
1.0000
16.0000
5. Conclusion:
Characteristic Equation, eigen values and eigen vectors of a matrix can be found
easily using matlab.
Question 2:
2. Mathematical Procedure:
3. Matlab Code:
clc
clear
A=input("Enter the Matrix:");
cf=poly(A);
n=length(cf);
CHT=cf(1)*A^(n-1);
for i=2:n
CHT=CHT+cf(i)*A^(n-i);
end
disp("R.H.S of C-H Theorem: ")
disp(round(CHT))
INV=cf(1)*A^(n-2);
for i=2:n-1
INV=INV+cf(i)*A^(n-i-1);
end
INV=INV/(-cf(n));
disp("Inverse of A: ")
disp(INV)
4. Input:
Output:
Inverse of A:
-1.0000 -0.6667 0.6667
2.0000 1.6667 -0.6667
-2.0000 -0.6667 1.6667
5. Conclusion:
Question 3:
Aim of this experiment is to find modal matrix of the given matrix and using which
normalised modal matrix and diagonal matrix can be found.
2. Mathematical Procedure:
For any real symmetric matrix A, there exists a modal matrix P using a normalised
matrix N which is formed by normalised eigen vectors.
P=NA(inv(N))
Canocial form can easily be witten in form of symmetric matrix manually,by eigen
Values in it’s diagonal.
3. Matlab Code:
clc
clear
A=input("Enter the symetric matrix for diagonalization :");
[P D]=eig(A);
disp("Given Matrix (A) :")
disp(A)
disp("Modal Matrix (P):")
disp(P)
NP=normc(P);
disp("Normalized Modal Matrix (N):")
disp(NP)
disp("Diagonal Matrix (D=Nˆ T*A*N) :")
DM=round(NP'*A*NP,2);
disp(DM)
4. Input:
Enter the symetric matrix for diagonalization :
[3 -1 -1;-1 5 -1;-1 -1 3]
Output:
5. Conclusion:
By this experiment, we know that modal matrix and normalised matrix can be easily
found using matlab.