Minimal polynomial

1881 days ago by bigdata2016

Characteristic polynomial

A=matrix(QQ,[[2,1,1,0,0,0,0,0],[0,2,1,0,1,0,0,0],[0,0,2,1,0,1,0,0],[0,0,0,2,0,0,0,0],[0,0,0,0,2,1,0,0],[0,0,0,0,0,2,0,0],[0,0,0,0,0,0,3,1],[0,0,0,0,0,0,0,3]]) p=A.characteristic_polynomial() html('$A=%s$' %latex(A)) html('<br>Characteristic Polynomial is $%s=%s$'%(latex(p),latex(p.factor()))) 
       


Characteristic Polynomial is


Characteristic Polynomial is

Eigenvectors of matrix A corresponding to each eigenvalues

ev=A.eigenvectors_right() X1=ev[0][1][0] Y1=ev[1][1][0] Z1=ev[1][1][1] html('Eigenvector of matrix A corresponding to the eigenvalue $%s$ is $x_1=%s$' %(ev[0][0][0], latex(X1)) ) print html('Eigenvector of matrix A corresponding to the eigenvalue $%s$ is $y_1=%s$' %(ev[1][0][0], latex(Y1)) ) print html('Eigenvector of matrix A corresponding to the eigenvalue $%s$ is $z_1=%s$' %(ev[1][0][0], latex(z1)) ) 
       
Eigenvector of matrix A corresponding to the eigenvalue  is 

Eigenvector of matrix A corresponding to the eigenvalue  is 

Eigenvector of matrix A corresponding to the eigenvalue  is 
Eigenvector of matrix A corresponding to the eigenvalue  is 

Eigenvector of matrix A corresponding to the eigenvalue  is 

Eigenvector of matrix A corresponding to the eigenvalue  is 

Generalized eigenvectors of matrix A corresponding to each eigenvalues

EYE=identity_matrix(A.nrows()) X2=(A-ev[0][0][0]*EYE).solve_right(X1) Y2=(A-ev[1][0][0]*EYE).solve_right(Y1) Z2=(A-ev[1][0][0]*EYE).solve_right(Z1) html('Generalized eigenvector of matrix A corresponding to the eigenvalue $%s$ is $x_2=%s$' %(ev[0][0][0], latex(X2)) ) print html('Generalized eigenvector of matrix A corresponding to the eigenvalue $%s$ is $y_2=%s$' %(ev[1][0][0], latex(Y2)) ) print html('Generalized eigenvector of matrix A corresponding to the eigenvalue $%s$ is $z_2=%s$' %(ev[1][0][0], latex(Z2)) ) 
       
Generalized eigenvector of matrix A corresponding to the eigenvalue  is 

Generalized eigenvector of matrix A corresponding to the eigenvalue  is 

Generalized eigenvector of matrix A corresponding to the eigenvalue  is 
Generalized eigenvector of matrix A corresponding to the eigenvalue  is 

Generalized eigenvector of matrix A corresponding to the eigenvalue  is 

Generalized eigenvector of matrix A corresponding to the eigenvalue  is 
Y3=(A-ev[1][0][0]*EYE).solve_right(Y2) print html('Generalized eigenvector of matrix A corresponding to the eigenvalue $%s$ is $y_3=%s$' %(ev[1][0][0], latex(Y3)) ) print Y4=(A-ev[1][0][0]*EYE).solve_right(Y3) html('Generalized eigenvector of matrix A corresponding to the eigenvalue $%s$ is $y_4=%s$' %(ev[1][0][0], latex(Y4)) ) 
       
Generalized eigenvector of matrix A corresponding to the eigenvalue  is 

Generalized eigenvector of matrix A corresponding to the eigenvalue  is 
Generalized eigenvector of matrix A corresponding to the eigenvalue  is 

Generalized eigenvector of matrix A corresponding to the eigenvalue  is 

Jordan Canonical Form of the given matrix

P=[X1,X2,Y1,Y2,Y3,Y4,Z1,Z2] P=matrix(P) P=P.transpose() J1=jordan_block(3,2) J2=jordan_block(2,4) J3=jordan_block(2,2) Ja=block_matrix([[J1,0,0],[0,J2,0],[0,0,J3]]) html('$P=%s$, $J_A=%s$' %(latex(P),latex(Ja)) ) 
       
, 
, 

Checking

html('$P^{-1}\cdot J_A\cdot P=%s$' %latex(P^(-1)*A*P)) 
       

Minimal polynomial of the matrix

R, x = QQ['x'].objgen() f=(x-3)^2*(x-2)^4 print html('Minimal polynomial of the matrix is $%s=%s$' %(latex(f),latex(f.factor()))) 
       
Minimal polynomial of the matrix is 
Minimal polynomial of the matrix is