summaryrefslogtreecommitdiff
path: root/3293/CH7/EX7.7/Ex7_7.sce
blob: 601099c5533ea1c25f53a9165076be643dd46022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//page 247
//Example 7.7
clc;
clear;
close;
disp('A = ');
disp('2   0   0   0');
disp('1   2   0   0');
disp('0   0   2   0');
disp('0   0   a   2');
disp('Considering a = 1');
A = [2 0 0 0;1 2 0 0;0 0 2 0;0 0 1 2];
p = poly(A,"x");
disp('Characteristic polynomial for A is:');
disp(p,'p = ');
disp('or');
disp('(x-2)^4');
disp('Minimal polynomial for A =');
disp('(x-2)^2');
disp('For a = 0 and a = 1, characteristic and minimal polynomial are same.');
disp('But for a=0, the solution space of (A - 2I) has 3 dimension whereas for a = 1, it has 2 dimension. ')
//end