structural:expansion, information:filtering
Thorax

The thorax is made of three fused segments, the prothorax, mesothorax, and metathorax, each with a pair of legs. The first segment contains the first pair of legs. In some males of the butterfly family Nymphalidae, the forelegs are greatly reduced and are not used for walking or perching. The three pairs of legs are covered with scales. Lepidoptera also have olfactory organs on their feet, which aid the butterfly in "tasting" or "smelling" out its food. In the larval form there are 3 pairs of true legs, with up to 11 pairs of abdominal legs (usually eight) and hooklets, called apical crochets.

The two pairs of wings are found on the middle and third segments, or mesothorax and metathorax, respectively. In the more recent genera, the wings of the second segment are much more pronounced, although some more primitive forms have similarly sized wings of both segments. The wings are covered in scales arranged like shingles, which form an extraordinary variety of colors and patterns. The mesothorax has more powerful muscles to propel the moth or butterfly through the air, with the wing of this segment (forewing) having a stronger vein structure. The largest superfamily, the Noctuoidea, has their wings modified to act as tympanal or hearing organs.

The caterpillar has an elongated, soft body that may have hair-like or other projections, three pairs of true legs, with none to 11 pairs of abdominal legs (usually eight) and hooklets, called apical crochets. The thorax usually has a pair of legs on each segment. The thorax is also lined with many spiracles on both the mesothorax and metathorax, except for a few aquatic species, which instead have a form of gills.