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>)

G:hessian (x1^2 + 3*x1*x2 + 2*x2^2 - 5*x1 - 7*x2, [x1, x2]);
eigens_by_jacobi(G)

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

eigens_by_jacobi-jacobi-matrix-max

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

cond : max(u);

Calculate

eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

Calculate

eigens_by_jacobi-jacobi-matrix-max

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

cond : max(u);

Calculate

eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

cond : smax(u);

Calculate

eigens_by_jacobi-jacobi-load-matrix

load (descriptive);

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

Calculate

eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

eigens_by_jacobi(K);

Calculate

eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

cond : maxval(u);

Calculate

eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

cond : smax(u);

Calculate

eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

eigens_by_jacobi(K);

Calculate

eigens_by_jacobi-jacobi-load-matrix

load (descriptive);

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

Calculate