In this paper we study the inverse problem of identifying the diffusion matrix in an elliptic PDE from measurements. The convex energy functional method with Tikhonov regularization is applied to tackle this problem. For the discretization we use the variational discretization concept, where the PDE is discretized with piecewise linear, continuous finite elements. We show the convergence of approximations. Using a suitable source condition, we prove an error bound for discrete solutions. For the numerical solution we propose a gradient-projection algorithm and prove the strong convergence of its iterates to a solution of the identification problem. Finally, we present a numerical experiment which illustrates our theoretical results.