If h ≠ 0 we need the transfer matrix method. For the periodic boundary conditions case is the following. The partition function is Z ( β β ) = ∑ ∑ σ σ 1 , … … , σ σ L e β β h σ σ 1 e β β J σ σ 1 σ σ 2 e β β h σ σ 2 e β β J σ σ 2 σ σ 3 ⋯ ⋯ e β β h σ σ L e β β J σ σ L σ σ 1 = ∑ ∑ σ σ 1 , … … , σ σ L V σ σ 1 , σ σ 2 V σ σ 2 , σ σ 3 ⋯ ⋯ V σ σ L , σ σ 1 . The coefficients V σ σ , σ σ ′ can be seen as the entries of a matrix. There are different possible choices: a convenient one (because the matrix is symmetric) is V σ σ , σ σ ′ = e β β h 2 σ σ e β β J σ σ σ σ ′ e β β h 2 σ σ ′ or V = [ e β β ( h + J ) e − − β β J e − − β β J e − − β β ( h − − J ) ] . In matrix formalism Z ( β β ) = Tr ⁡ ⁡ ( V L ) = λ λ 1 L + λ λ 2 L = λ λ 1 L [ 1 + ( λ λ 2 λ λ 1 ) L ] , where λ 1 is the highest eigenvalue of V, while λ 2 is the other eigenvalue: λ λ 1 = e β β J cosh ⁡ ⁡ β β h + e 2 β β J ( sinh ⁡ ⁡ β β h ) 2 + e − − 2 β β J , and |λ 2 | < λ 1. This gives the formula of the free energy.