3+1 Equations for Matterand Electromagnetic Field