With I. Biswas.  Theta Functions and Szeg\"o Kernels.
We study relations between two fundamental constructions associated to vector bundles on a smooth complex projective curve: the theta function (a section of a line bundle on the moduli space of vector bundles) and the Szeg\"o kernel (a section of a vector bundle on the square of the curve). Two types of relations are demonstrated. First, we establish a higher--rank version of the prime form, describing the pullback of determinant line bundles by difference maps, and show the theta function pulls back to the determinant of the Szeg\"o kernel. Next, we prove that the expansion of the Szeg\"o kernel at the diagonal gives the logarithmic derivative of the theta function over the moduli space of bundles for a fixed, or moving, curve. In particular, we recover the identification of the space of connections on the theta line bundle with moduli space of flat vector bundles, when the curve is fixed. When the curve varies, we identify this space of connections with the moduli space of {\em extended connections}, which we introduce.