**MATRIX CALCULATIONS**

Calculations of the magnetic properties of actual crystalline materials that contain metal ions with unclosed electron shells 2*p*, 3*p*, 3*d*, 4*d*, 5*d*, 4*f* and 5*f* require working with large matrices with complex field elements. The major matrix calculations are based on diagonalization of the complex Hamiltonian matrix of interactions using the Jacobi method, adapted to the requirements of ATOMIC MATTERS.

**JACOBI DIAGONALIZATION**

The Jacobi method is an iterative method intended to solve the full eigenproblem of real symmetric matrices. In the Jacobi method, the matrix A is converted by the similarity of a series of rotations. These are chosen in such a way as to allow the constructed matrices **A _{k} (A_{1} = A)** to tend to

**D**= diag (

*λ*).

_{i}In the classical variant of the method in its k-th step, we shall search for the largest (in terms of module) off-diagonal element of the matrix** A _{k}** = (

*a*). Let us assume that it is

_{ij}*a*.

_{pq}**A**is then converted by the orthogonal similarity by rotation

_{k}**T**. The

_{pq}**T**transformation matrix is different from the identity matrix only by elements

_{pq}*t*and

_{pp}= t_{qq}= cosθ*t*= -

_{pq}*t*=

_{qp}*sinθ*. Rotation angle θ is defined in such a way as to zero the largest off-diagonal element, i.e.

*a*. Therefore, we shall construct another matrix:

_{pq}It is symmetrical, and differs from **A _{k}** only by elements in columns and rows numbered

*p*and

*q*. The condition that the element

**A**with index (

_{k+1}*p, q*) is zero gives the following relationship:

From this dependence, we can easily find the θ angle and make further transformations. The Jacobi method is linearly convergent at first. After a large number of steps, the convergence becomes approximately square.

The exact matrix calculations, taking into account all three directions (x, y, z), require the use of complex matrices. A theory has been developed by Prof. dr hab. Marek Karaś that can convert and calculate such matrices and provides for expanding n x n dimensional matrices to 2n x 2n dimensional ones according to the following lemmas: