Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Eigens_by_jacobi Calculator

Eigens_by_jacobi

Function: eigens_by_jacobi (<A>)

Function: eigens_by_jacobi (<A>, <field_type>) Computes the eigenvalues and eigenvectors of <A> by the method of Jacobi rotations. <A> must be a symmetric matrix (but it need not be positive definite nor positive semidefinite). <field_type> indicates the computational field, either floatfield or bigfloatfield. If <field_type> is not specified, it defaults to floatfield.

The elements of <A> must be numbers or expressions which evaluate to numbers via float or bfloat (depending on <field_type>).

Examples:

          (%i1) S: matrix([1/sqrt(2), 1/sqrt(2)],[-1/sqrt(2), 1/sqrt(2)]);
                               [     1         1    ]
                               [  -------   ------- ]
                               [  sqrt(2)   sqrt(2) ]
          (%o1)                [                    ]
                               [      1        1    ]
                               [ - -------  ------- ]
                               [   sqrt(2)  sqrt(2) ]
          (%i2) L : matrix ([sqrt(3), 0], [0, sqrt(5)]);
                                [ sqrt(3)     0    ]
          (%o2)                 [                  ]
                                [    0     sqrt(5) ]
          (%i3) M : S . L . transpose (S);
                      [ sqrt(5)   sqrt(3)  sqrt(5)   sqrt(3) ]
                      [ ------- + -------  ------- - ------- ]
                      [    2         2        2         2    ]
          (%o3)       [                                      ]
                      [ sqrt(5)   sqrt(3)  sqrt(5)   sqrt(3) ]
                      [ ------- - -------  ------- + ------- ]
                      [    2         2        2         2    ]
          (%i4) eigens_by_jacobi (M);
          The largest percent change was 0.1454972243679
          The largest percent change was 0.0
          number of sweeps: 2
          number of rotations: 1
          (%o4) [[1.732050807568877, 2.23606797749979],
                                  [  0.70710678118655   0.70710678118655 ]
                                  [                                      ]]
                                  [ - 0.70710678118655  0.70710678118655 ]
          (%i5) float ([[sqrt(3), sqrt(5)], S]);
          (%o5) [[1.732050807568877, 2.23606797749979],
                                  [  0.70710678118655   0.70710678118655 ]
                                  [                                      ]]
                                  [ - 0.70710678118655  0.70710678118655 ]
          (%i6) eigens_by_jacobi (M, bigfloatfield);
          The largest percent change was 1.454972243679028b-1
          The largest percent change was 0.0b0
          number of sweeps: 2
          number of rotations: 1
          (%o6) [[1.732050807568877b0, 2.23606797749979b0],
                          [  7.071067811865475b-1   7.071067811865475b-1 ]
                          [                                              ]]
                          [ - 7.071067811865475b-1  7.071067811865475b-1 ]

(%o1)                                true
(%i2) 

Eigens_by_jacobi Example

Related Examples

jacobi

jacobi(281,40);

Calculate

eigens_by_jacobi-float-jacobi-matrix-sqrt-transpose

s: matrix([1/sqrt(2),...

l : matrix ([sqrt(3)...

m : s . l . transpos...

Calculate

jacobi

jacobi(217153,1219921);

Calculate

jacobi

jacobi(240161,1416361);

Calculate

jacobi

jacobi(91,56677);

Calculate

eigens_by_jacobi-jacobi-matrix

x:1;

S: matrix([2*x^2-4, 4...

eigens_by_jacobi (S);

Calculate

jacobi

jacobi(260653,2606869);

Calculate

eigens_by_jacobi-float-jacobi-matrix-sqrt-transpose

S: matrix([1/sqrt(2),...

L : matrix ([sqrt(3)...

M : S . L . transpos...

Calculate