[Scilab-users] Jordan normal form

classic Classic list List threaded Threaded
7 messages Options
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Jordan normal form

Is there any function which finds the jordan normal form and its canonical
basis of n-square matrix A?
Best regards.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Jordan normal form

Hello,

Le 26/07/2020 à 15:39, fujimoto2005 a écrit :
> Is there any function which finds the jordan normal form and its canonical
> basis of n-square matrix A?
> Best regards.

Have you tried bdiag()?


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

Re: Jordan normal form

Dear Samuel,
Thanks for your reply.

>Have you tried bdiag()?
Yes, I have tried it with rmax=1/%eps.
But result of the sample of help page is not  the Jordan form.

--> a=rand(5,5);[ab,x,bs]=bdiag(a,1/%eps);ab
 ab  =

   2.5777548   0.          0.          0.          0.      
   0.         -0.2247587   0.1379764   0.          0.      
   0.         -0.461395   -0.2958436   0.          0.      
   0.          0.          0.          0.1867271   0.      
   0.          0.          0.          0.          0.8245204



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Jordan normal form

Le 26/07/2020 à 16:33, fujimoto2005 a écrit :
> Dear Samuel,
> Thanks for your reply.
>
>> Have you tried bdiag()?
> Yes, I have tried it with rmax=1/%eps.
> But result of the sample of help page is not  the Jordan form.

How do you see that?

--> a = rand(5,5), [J, X] = bdiag(a)
  a  =
    0.2113249   0.6283918   0.5608486   0.2320748 0.3076091
    0.7560439   0.8497452   0.6623569   0.2312237 0.9329616
    0.0002211   0.685731    0.7263507   0.2164633 0.2146008
    0.3303271   0.8782165   0.1985144   0.8833888 0.312642
    0.6653811   0.068374    0.5442573   0.6525135 0.3616361

  J  =
    2.4777836   0.          0.          0. 0.
    0.          0.0757087   0.4869251   0. 0.
    0.         -0.5777956  -0.1248605   0. 0.
    0.          0.          0.          0.069654 0.
    0.          0.          0.          0. 0.5341598

  X  =
   -0.3527369   0.0605091   0.2379654   0.9582868 0.4179387
   -0.5921536  -0.7886896  -0.1822515   0.5222938 0.3870075
   -0.3418189   0.2368257   0.3781926  -0.0200047 0.6351967
   -0.5157279   0.3072656   0.3968688  -0.5383794 -1.1636856
   -0.3769819   0.4738897  -0.7809384  -1.0656465 -0.6321472

J est block-diagonal. Isn't it what we expect?

--> clean(a - X*J/X, 10*%eps)
  ans  =
    0.   0.   0.   0.   0.
    0.   0.   0.   0.   0.
    0.   0.   0.   0.   0.
    0.   0.   0.   0.   0.
    0.   0.   0.   0.   0.

J and the base X of eigen vectors and/or subspaces is such that a = X *
J / X
Isn't it an expected property?
We can easily check it at least for eigen vectors, of multiplicity = 1:

--> a*X(:,[1 4 5]) ./ X(:,[1 4 5])
  ans  =

    2.4777836   0.069654   0.5341598
    2.4777836   0.069654   0.5341598
    2.4777836   0.069654   0.5341598
    2.4777836   0.069654   0.5341598
    2.4777836   0.069654   0.5341598

with related eigenvalues

So, what else?


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

Re: Jordan normal form

Dear Samuel,

The following sample is from the sample 3 and 5 of wiki "Generalized
eigenvector".
https://en.wikipedia.org/wiki/Generalized_eigenvector#Example_3

A=[[5 0 0 0]',[1 5 0 0]', [-2 2 5 0]', [4 2 3 4]']
X=[[-14 4 -3 1]',[2 0 0 0]',[-2 2 0 0]',[0 0 1 0]']
J=clean(inv(X)*A*X)

J  =

   4.   0.   0.   0.
   0.   5.   1.   0.
   0.   0.   5.   1.
   0.   0.   0.   5.
 
J is a Jordan form.
   
[JJ,XX]=bdiag(A,1/%eps)
XX  =

   1.   0.   0.  -14.
   0.   1.   0.   4.
   0.   0.   1.  -3.
   0.   0.   0.   1.

 JJ  =

   5.   1.  -2.   0.
   0.   5.   2.   0.
   0.   0.   5.   0.
   0.   0.   0.   4.
   
 
 JJ is a block dialog matrix but not a Jordan form,
 
 Best regards.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Jordan normal form

Le 26/07/2020 à 19:13, fujimoto2005 a écrit :

> Dear Samuel,
>
> The following sample is from the sample 3 and 5 of wiki "Generalized
> eigenvector".
> https://en.wikipedia.org/wiki/Generalized_eigenvector#Example_3
>
> A=[[5 0 0 0]',[1 5 0 0]', [-2 2 5 0]', [4 2 3 4]']
> X=[[-14 4 -3 1]',[2 0 0 0]',[-2 2 0 0]',[0 0 1 0]']
> J=clean(inv(X)*A*X)
>
> J  =
>
>     4.   0.   0.   0.
>     0.   5.   1.   0.
>     0.   0.   5.   1.
>     0.   0.   0.   5.
>  
> J is a Jordan form.
>    
> [JJ,XX]=bdiag(A,1/%eps)
> XX  =
>
>     1.   0.   0.  -14.
>     0.   1.   0.   4.
>     0.   0.   1.  -3.
>     0.   0.   0.   1.
>
>   JJ  =
>
>     5.   1.  -2.   0.
>     0.   5.   2.   0.
>     0.   0.   5.   0.
>     0.   0.   0.   4.
>    
>  
>   JJ is a block dialog matrix but not a Jordan form,


OK. Switching the eigenvector and the subspace is OK, but in JJ(:,3), [0
1 5] would be expected:
Beyond the block-diagonalization, the jordanization is actually not
performed.

Quickly looking at the ATOMS/Linear algebra section does not clearly
show resources connected to Jordan.
And there is no search engine on the Scilab forges...
Maybe as a utility in an external module?

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

Re: Jordan normal form

Dear Samuel,

I'm sorry that I'm looking for a external program and my reply is late.
Unfortunately, the program does not exist.
It seems due to an unstable numerical result of Jordan normal form.
There is a paper that the jordan function of matlab produces wrong result
for a certain matrix.
Papers on the algorithms have been sometimes published and I read them.

Best regards,
Masahiro Fujimoto



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users