Electromagnetic Theory for Microwaves and Optoelectronics