Image matching in its simplest form is a two class decision problem. Based on the evidence in two sensed images, a matching procedure must decide whether they represent two views of the same scene, or views of two different scens. Previous solutions to this problem were either based on an intuitive notion of image similarity, or were modelled on solutions to the superficially similar problem of target detection in images. This research, in contrast, uses a decision theoretic formulation of the problem, with the image pair as unit of observation and probability of error in the match/mismatch decision as performance criterion. A stochastic model is proposed for the image pair, and the optimal test of match and mismatch hypotheses for samples of this random process is derived. The test is written conveniently in terms of a statistic of the two images and a scalar decision threshold. The analytical advantages of a solution derived from first principles are illustrated with the derivation of hypothesis conditional probability distributions, optimal decision thresholds, and expessions for the probability of error in the decision.