Electromagnetic and Gravitational Invariants,