% --- 3rd Micro-Exercise Solution Week 4 ---
close, clear, clc;


% Define the matrix
A = [4 2; 1 3];
T = [0.7 0.5; 0.1 0.8];


disp('The determinant of A is :');
disp(det(A))


if det(A)~=0
    disp('The matrix A invertible.');
else
    disp('The matrix A is not invertible.');
end


disp('The rank of A is:')
disp(rank(A))


disp('The eigenvalues of A are:')
disp(eig(A))

disp('The trace of A is:')
disp(trace(A))


disp('The eigenvalues of T are:')
disp(eig(T))

if abs(eig(T))<1
    disp('The dynamic system T is stable.');
else
    disp('The dynamic system T is unstable.');
end



