The methods of Lie group analysis of differential equations are genera
lized so as to provide an infinitesimal formalism for calculating symm
etries of difference equations. Several examples are analysed, one of
them being a nonlinear difference equation. For the linear equations t
he symmetry algebra of the discrete equation is found to be isomorphic
to that of its continuous limit.