Professional Documents
Culture Documents
LCS Assignment 03
LCS Assignment 03
7.11 Theorem
Given nXn matrix A, if M and Q are symmetric, positive definite, nXn matrices satisfying
QA + ATQ = -M, then all eigenvalues of A have negative real parts. Conversely if all
eigenvalues of A have negative real parts, then for each symmetric nXn matrix M there exist
a unique solution of QA + ATQ = -M given by
Exercise 5.2
Solution
If all eigenvalues of A have negative real parts, then for each symmetric
nXn matrix M there exist a unique solution of QA + ATQ = -M given by
Answer:
Lets generate a random symmetric Matrix M and check whether Q has a unique
solution.
Symmetric matrix would be generated by exploiting the property M+MT is always a
symmetric matrix.
MATLAB Code
syms t
A=[0 1; -1 -2];
E=eig(A);
if real(E(1,1))<0&&real(E(2,1)<0)
display('All eigenvalues have negative real parts ');
% Implementing expression for Q
B=A.';
C=expm((A*t));
D=expm((B*t));
M=rand(2);
M=M+M.'; % M+ trM is always a symmetric Matrix
X=D*M*C;
Q=int(X,0,inf);
end
Output
All eigenvalues have negative real parts
Q is a Symmetric Matrix
MATLAB Code:
syms t
A=[0 1; -1 -2];
E=eig(A);
if real(E(1,1))<0&&real(E(2,1)<0)
display('All eigenvalues have negative real parts ');
B=A.';
C=expm((A*t));
D=expm((B*t));
M=[1 .5; .5 .5];
%Check if the matrix is symmetric
[m,n]=size(M);
if m~=n,
error('M is not Symmetric');
end
%Test for positive definiteness
x=1; %Flag to check for positiveness
for i=1:m
subM=M(1:i,1:i); %Extract upper left kxk submatrix
if(det(subM)<=0); %Check if the determinent of the kxk submatrix is
+ve
x=0;
break;
end
end
if x
display('M Matrix is Positive definite');
else
display('M Matrix is NOT positive definite');
end
X=D*M*C;
Q=int(X,0,inf)
M=Q;
%Check if the matrix is symmetric
[m,n]=size(M);
if m~=n,
error('Q is not Symmetric');
end
%Test for positive definiteness
x=1; %Flag to check for positiveness
for i=1:m
subM=M(1:i,1:i); %Extract upper left kxk submatrix
if(det(subM)<=0); %Check if the determinent of the kxk submatrix is
+ve
x=0;
break;
end
end
if x
Output
All eigenvalues have negative real parts
M Matrix is Positive definite
Q=
[ 7/8, 1/2]
[ 1/2, 3/8]
Q Matrix is also Positive definite
Output
Equation QA+ATQ=-M holds
The same codes will be used for this question also. Just the values of A and M would
be changed. So outputs would be shown.
Output 1:
All eigenvalues have negative real parts
Q is a Symmetric Matrix
Choose M=[ 2 -1
[-1 2
[0 -1
0]
-1]
2]
Output 2:
All eigenvalues have negative real parts
M Matrix is Positive definite
Q=
[ 3/2, -3/4, 1/2]
[ -3/4, 1, -1/2]
[ 1/2, -1/2, 1]
Q Matrix is also Positive definite
Output 3
Equation QA+ATQ=-M holds
Output1
All eigenvalues have negative real parts
Q is a Symmetric Matrix
Choose
M=
2
1
1
3
1
2
2
1
1
2
9
1
3
1
1
7
Output2
All eigenvalues have negative real parts
M Matrix is Positive definite
Q=
[ 1, 1/3, 1/2, 7/4]
[ 1/3, 1/2, 2/3, 5/9]
[ 1/2, 2/3, 9/2, 11/4]
[ 7/4, 5/9, 11/4, 25/4]
Q Matrix is also Positive definite
Output 3
Equation QA+ATQ=-M holds