If we now try to study some more complex configurations of the Ising model, we immediately encounter huge difficulties which make it impossible to exactly compute the partition function of the system. In particular, Onsager managed (with a huge effort) in 1944 to solve the problem for a two-dimensional Ising model in absence of external fields, but in all other cases (two-dimensional model with external field, or three-dimensional model) we still don't know an exact solution.
However, even if we don't know much in these cases there is still a lot to learn: in particular, from Onsager's solution^{[1]} we can see that already in two dimensions an Ising model can exhibit phase transitions, showing a non null spontaneous magnetization for temperatures low enough.

Let us therefore consider a two-dimensional Ising model, defined on a lattice made of $N$ rows and $M$ columns. Applying periodic boundary conditions to the system in both directions (geometrically, this can be thought of as defining the model on a torus), and considering only nearest neighbour interactions, the reduced Hamiltonian of the system will be:

$-\beta {\mathcal {H}}=K\sum _{\left\langle i,j\right\rangle }S_{i}S_{j}+h\sum _{i}S_{i}$

where we remember that

$K=\beta J$ and

$h=\beta H$. If we label each site of the lattice with the couple

$(m,n)$ where

$m$ is the number of the column and

$n$ of the row to which the site belongs, then we can rewrite

^{[2]}:

$-\beta {\mathcal {H}}=K\sum _{n=1}^{N}\sum _{m=1}^{M}(S_{m,n}S_{m+1,n}+S_{m,n}S_{m,n+1})+h\sum _{m,n}S_{m,n}$

If we now call

$\mu _{m}$ the set of spins belonging to the

$m$-th column:

$\mu _{m}=\lbrace S_{m,1},\dots ,S_{m,n}\rbrace$

and define:

$E(\mu _{m})=K\sum _{n=1}^{N}S_{m,n}S_{m,n+1}+h\sum _{n=1}^{N}S_{m,n}$

$E(\mu _{m},\mu _{m+1})=K\sum _{n=1}^{N}S_{m,n}S_{m+1,n}$

we can write:

$-\beta {\mathcal {H}}=\sum _{m=1}^{M}\left[E(\mu _{m},\mu _{m+1})+E(\mu _{m})\right]$

Therefore, defining the transfer matrix

${\boldsymbol {T}}$ so that:

$\langle \mu _{m}|{\boldsymbol {T}}|\mu _{k}\rangle =e^{E(\mu _{m},\mu _{k})+E(\mu _{m})}$

the partition function will be:

$Z_{N}=\operatorname {Tr} {\boldsymbol {T}}^{N}$

and the thermodynamics of the system can be derived from the eigenvalue of

${\boldsymbol {T}}$ with largest magnitude. However, since

${\boldsymbol {T}}$ is a

$2^{N}\times 2^{N}$ matrix, this is a rather difficult problem (the matrix becomes infinite in the thermodynamic limit!).
Onsager has shown that in the thermodynamic limit and for

$H=0$ the free energy of the system is:

$f=-k_{B}T\ln \left[2\cosh(2\beta J)\right]-{\frac {k_{B}T}{2\pi }}\int _{0}^{\pi }\ln \left[{\frac {1}{2}}\left(1+{\sqrt {1-g^{2}\sin ^{2}\phi }}\right)\right]d\phi$

where:

$g={\frac {2}{\cosh(2\beta J)\coth(2\beta J)}}$

and also that the magnetization is:

$m={\begin{cases}\left[1-\sinh ^{-4}(2\beta J)\right]^{1/8}&T<T_{c}\\0&T>T_{c}\end{cases}}$

where

$T_{c}$ is the temperature given by the condition

$2\tanh ^{2}(2\beta J)=1$, which yields the numeric result:

$T_{c}\approx 2.27{\frac {J}{k_{B}}}$

This means that there is indeed a phase transition at

$T=T_{c}$.
Onsager also showed that the critical exponents of this model are:

$\alpha =0\quad \qquad \beta ={\frac {1}{8}}\quad \qquad \gamma ={\frac {7}{4}}$

where

$\alpha =0$ because the specific heat diverges logarithmically for

$T\sim T_{c}$.

- ↑ We will not deduce it, and just limit ourselves to show it. However, in Additional remarks on the Ising model we will use qualitative arguments to show that indeed the dimension of an Ising model must be at least two if we want phase transitions to occur.
- ↑ Note, again, that the sum over nearest neighbours is done so that we don't count twice the same terms.