We investigate the spatial behavior of spin precession of traversing electrons in a two dimensional electron gas, and, also, the property of spin interference in square loop devices with Rashba and Dresselhaus spin-orbit couplings. Treating the effects due to the two coupling mechanisms by means of a spin rotation operator, we develop a convenient framework for studying the property of spin precession. We first derive analytical expressions for the spin precession which allow a more concrete description of the spatial distribution of the spin orientation. For example, the properties of spin precession, such as the rotation axis, the rotation angle and the cone angle, can be easily determined. We then extend the analytic framework to derive the spin-orbit coupling-induced phase for spin interference in square rings; this procedure makes the optimal control of the interference condition more convenient, and the spin filter more accessible experimentally.