### Related

##### eigens_by_jacobi-jacobi-matrix-max-min

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

cond : max(u)/ min(u);

Calculate

##### eigens_by_jacobi-float-jacobi-matrix-sqrt-transpose

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

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

M : S . L . transpos...

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 : maxval(u);

Calculate

##### eigens_by_jacobi-jacobi-matrix

x:1;

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

eigens_by_jacobi (S);

Calculate

##### eigens_by_jacobi-jacobi-matrix-sqrt

duenu7:1391.353;

duenu11:1415.761;

nu4:1372.043;

Calculate

##### eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

u;

Calculate

##### eigens_by_jacobi-jacobi-matrix

K: matrix([1.000, 0...

[u,v] : eigens_by_jac...

u;

Calculate

##### eigens_by_jacobi-hessian-jacobi

G:hessian (x1^2 + 3*x...

eigens_by_jacobi(G);

Calculate

##### eigens_by_jacobi-hessian-jacobi

G:hessian (x1^2 + 3*x...

eigens_by_jacobi(G);

Calculate

### eigens_by_jacobi

Run Example
```(%i1)? 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) ```
Run Example
```K: matrix([1.000,   0.000,  0.000,   0.000,   0.000],   [0.000,   6.352,  -2.904,   0.635,   0.000],   [0.000,  -2.904,   4.741,  -2.904,   0.000],   [0.000,   0.635,  -2.904,   6.352,   0.000],   [0.000,   0.000,   0.000,   0.000,   1.000]);
[ 1.0    0.0      0.0      0.0    0.0 ]
[                                     ]
[ 0.0   6.352   - 2.904   0.635   0.0 ]
[                                     ]
(%o1)               [ 0.0  - 2.904   4.741   - 2.904  0.0 ]
[                                     ]
[ 0.0   0.635   - 2.904   6.352   0.0 ]
[                                     ]
[ 0.0    0.0      0.0      0.0    1.0 ]
(%i2) [u,v] : eigens_by_jacobi(K);
(%o2) [[1.0, 10.1216473550542, 1.606352644945803, 5.717, 1.0],
[ 1.0         0.0                0.0                   0.0             0.0 ]
[                                                                          ]
[ 0.0   0.56208555599354   0.42902194319572     - 0.70710678118655     0.0 ]
[                                                                          ]
[ 0.0  - 0.60672865062305  0.79490901650009  - 5.9577503293758282E-17  0.0 ]]
[                                                                          ]
[ 0.0   0.56208555599354   0.42902194319572      0.70710678118655      0.0 ]
[                                                                          ]
[ 0.0         0.0                0.0                   0.0             1.0 ]
(%i3) ```
Run Example
```K: matrix([1.000,   0.000,  0.000,   0.000,   0.000],   [0.000,   6.352,  -2.904,   0.635,   0.000],   [0.000,  -2.904,   4.741,  -2.904,   0.000],   [0.000,   0.635,  -2.904,   6.352,   0.000],   [0.000,   0.000,   0.000,   0.000,   1.000]);
[ 1.0    0.0      0.0      0.0    0.0 ]
[                                     ]
[ 0.0   6.352   - 2.904   0.635   0.0 ]
[                                     ]
(%o1)               [ 0.0  - 2.904   4.741   - 2.904  0.0 ]
[                                     ]
[ 0.0   0.635   - 2.904   6.352   0.0 ]
[                                     ]
[ 0.0    0.0      0.0      0.0    1.0 ]
(%i2) [u,v] : eigens_by_jacobi(K);
(%o2) [[1.0, 10.1216473550542, 1.606352644945803, 5.717, 1.0],
[ 1.0         0.0                0.0                   0.0             0.0 ]
[                                                                          ]
[ 0.0   0.56208555599354   0.42902194319572     - 0.70710678118655     0.0 ]
[                                                                          ]
[ 0.0  - 0.60672865062305  0.79490901650009  - 5.9577503293758282E-17  0.0 ]]
[                                                                          ]
[ 0.0   0.56208555599354   0.42902194319572      0.70710678118655      0.0 ]
[                                                                          ]
[ 0.0         0.0                0.0                   0.0             1.0 ]
(%i3) cond  : maxval(u);
(%o3)   maxval([1.0, 10.1216473550542, 1.606352644945803, 5.717, 1.0])
(%i4) ```

### Related Help

Help for Eigens_by_jacobi