The difference between a nut and a legume is not always immediately obvious. Both legumes and nuts consist of a simple dry fruit carried inside a pod or shell, but upon examining the details, the two groups prove to have significant differences. Botanically speaking, nuts are noted for having only a single seed in the shell, which is not attached, and they can be part of a number of different plant families. Legumes, however, usually have multiple seeds within a casing, which are often attached to its inner wall, and are part of the leguminosae family.
Nuts in Botany
In the strict botanical use of the term, a nut usually has only one seed, or two at most. Additionally, a true nut is always "indehiscent," meaning it does not open on its own. The seed of a true nut is never attached to the ovary wall, but instead is loose or fitted into the nut pod. All of these traits can be seen in chestnuts, hazelnuts, and similar nuts.
Botanical Categorization of Legumes
The major element that sets legumes apart from nuts is that they are from one particular family of plants, called either the fabaceae or leguminosae family. They also frequently contain multiple seeds; it is not uncommon for a pea pod, for example, to contain half a dozen peas. The majority of legumes are "dehiscent," opening naturally along a seam on two sides; again, the pea pod is an obvious example of this. They often contain seeds that are attached to their pods, rather than simply fitting within them. Legumes are also known for having fruit that is high in protein, and they can replenish nitrogen in soil, making legumes ideal for use in crop rotations.
Confusion Over Peanuts
Looking only at these common distinctions, it can be difficult to determine whether a peanut is a legume or a nut; it contains two seeds, the pod is indehiscent, and the seed is not attached to the ovary wall. Despite its name, a peanut is a legume and not a nut. This is why some people who have allergies to certain nuts can still eat peanuts, and other individuals with peanut allergies can eat true nuts.
It is important to note, however, that in cooking, the botanical definition of a nut is less important than its culinary definition. In culinary terms, a nut is often considered to be any large seed used in food, which comes from a hard shell. Peanuts certainly fit this description, and chefs often use them in much the same way as botanical nuts. The difference between nuts and legumes is much less important in a kitchen, as long as they are used well within a dish.