The Ising model consists of spins ((s_i)) that can take values of (\pm 1), arranged on a lattice. Each spin interacts with its nearest neighbors, and the model is used to study magnetism and phase transitions. The Hamiltonian (energy function) for the Ising model in the absence of an external magnetic field is given by:
where (J) is the coupling constant representing the interaction strength between neighboring spins, and the sum is over nearest-neighbor pairs (\langle i,j \rangle).