A method of manufacturing a semiconductor optical element, the method comprising:
- preparing a layered body in which a first indirect bandgap semiconductor part that includes a first-conductivity-type impurity, a second indirect bandgap semiconductor part that includes a first-conductivity-type impurity, a third indirect bandgap semiconductor part that includes a second-conductivity-type impurity, a fourth indirect bandgap semiconductor part that includes a second-conductivity-type impurity, and a fifth indirect bandgap semiconductor part that includes a second-conductivity-type impurity are layered in this order;
- forming one or more first recesses in the first indirect bandgap semiconductor part of the layered body, the one or more first recesses containing a medium having a refractive index lower than a refractive index of the second indirect bandgap semiconductor part;
- and
- forming one or more second recesses in the fifth indirect bandgap semiconductor part of the layered body, the one or more second recesses containing a medium having a refractive index lower than a refractive index of the fourth indirect bandgap semiconductor part.