  Metamaterials are beginning to transform optics and microwave technology
thanks to their versatile properties that, in many cases, can be tailored
according to practical needs and desires. Although metamaterials are surely not
the answer to all engineering problems, they have inspired a series of
significant technological developments and also some imaginative research,
because they invite researchers and inventors to dream. Imagine there were no
practical limits on the electromagnetic properties of materials. What is
possible? And what is not? If there are no practical limits, what are the
fundamental limits? Such questions inspire taking a fresh look at the
foundations of optics and at connections between optics and other areas of
physics. In this article we discuss such a connection, the relationship between
optics and general relativity, or, expressed more precisely, between
geometrical ideas normally applied in general relativity and the propagation of
light, or electromagnetic waves in general, in materials. We also discuss how
this connection is applied: in invisibility devices, perfect lenses, the
optical Aharonov-Bohm effect of vortices and in analogues of the event horizon.
