Solution (source code)

= Solution

Set $K=\beta J$. The <transfer matrix for the one-dimensional Ising model> assigns a <Boltzmann factor> to each bond. In the <Ising spin> order $(+1,-1)$, it is
$$
T_{ss'}=e^{-Kss'},\qquad
T=\begin{pmatrix}e^{-K}&e^K\\e^K&e^{-K}\end{pmatrix}.
$$
Multiplying these bond factors and summing every <Ising spin> implements the <canonical ensemble>. The <periodic boundary conditions> close the product into a <trace>:
$$
Z_N=\sum_{S_1,\ldots,S_N}\prod_{j=1}^NT_{S_jS_{j+1}}
=\operatorname{tr}T^N.
$$
The <eigenvectors> $|+\rangle=(1,1)^T/\sqrt2$ and $|-\rangle=(1,-1)^T/\sqrt2$ form an <orthonormal basis>, with <eigenvalues>
$$
\lambda_+=e^{-K}+e^K=2\cosh K,
\qquad
\lambda_-=e^{-K}-e^K=-2\sinh K.
$$
The negative second <eigenvalue> encodes alternating <correlations>. Defining $q=\lambda_-/\lambda_+=-\tanh K$, the exact <partition function> and total <Helmholtz free energy> are
$$
\boxed{Z_N=(2\cosh K)^N+(-2\sinh K)^N
=(2\cosh K)^N(1+q^N),}
$$
$$
\boxed{F_N=-\frac1\beta\ln Z_N
=-\frac N\beta\ln(2\cosh K)-\frac1\beta\ln(1+q^N).}
$$
The parity-dependent term must be retained for finite $N$; in particular it nearly cancels the leading term of $Z_N$ at low <temperature> when $N$ is odd.

Represent insertion of one <Ising spin> by $\Sigma=\operatorname{diag}(1,-1)$. In the <eigenbasis> of $T$, this <matrix> swaps $|+\rangle$ and $|-\rangle$. Its diagonal entries in that <eigenbasis> vanish, giving the exact <one-point correlation function>
$$
\boxed{\langle S_1\rangle=\frac{\operatorname{tr}(\Sigma T^N)}{Z_N}=0.}
$$
Equivalently, configurations pair with their opposites under <spin inversion symmetry>, with the same <Boltzmann factor> and opposite $S_1$.

Two insertions separated by $n$ bonds give the <two-point correlation function>
$$
\begin{aligned}
\langle S_1S_{n+1}\rangle
&=\frac{\operatorname{tr}(\Sigma T^n\Sigma T^{N-n})}{Z_N}\\
&=\frac{\lambda_-^n\lambda_+^{N-n}+\lambda_+^n\lambda_-^{N-n}}
{\lambda_+^N+\lambda_-^N}.
\end{aligned}
$$
Thus the exact <finite antiferromagnetic Ising-ring correlation> is
$$
\boxed{C_N(n):=\langle S_1S_{n+1}\rangle
=\frac{q^n+q^{N-n}}{1+q^N},\quad q=-\tanh(\beta J),\quad0\leq n\leq N-1.}
$$
The two numerator terms represent the two arcs between the sites. The formula has $C_N(0)=1$ and $C_N(n)=C_N(N-n)$, as required by the <periodic boundary conditions>. Since the <one-point correlation function> is zero, this is also the <connected correlation function>. At $K=0$, every <Ising spin> is <independent>, so $C_N(n)=0$ for distinct sites and $C_N(0)=1$; powers with exponent zero are understood as one.