In image processing, image registration is one of the fundamental tasks to compare or combine the information given by different images. Image registration is to find an optimal geometric transformation between corresponding image data. We use the deformation method to find this optimal transformation and then apply the Lagrange multiplier rule in minimization of the difference between two given images. Here, the least-squares finite element method was used for the solution of the optimality system.