On one side of a liquid crystal layer, a first electrode is provided, and, on the other side of the liquid crystal layer, a second electrode, composed of a plurality of individual electrodes, and a third electrode are provided. The second and third electrodes have holes that are increasingly small away from the liquid crystal layer. When the potential at the third electrode is set equal to or lower than the potential at the second electrode, the liquid crystal layer acts as a convex lens; when the potential at the third electrode is set higher than the potential at the second electrode, the liquid crystal layer acts as a concave lens. The range in which the focal length can be varied depends on the diameters of the holes, and giving the holes of the different electrodes varying diameters helps widen the range. Moreover, conductors can be laid to reach the electrodes at the outer edges thereof so as not to directly face the liquid crystal layer. This helps eliminate the influence of the conductors on the electric field distribution in the liquid crystal layer.