It's easy to go through life feeling like you know the difference between a fruit and a vegetable, but it's likely that at one time some truculent pill has tried to disabuse you of the idea that you know your produce. "You know," such a person has said, "a tomato isn't a vegetable; it's a fruit." And maybe even: "Same thing with peppers and cucumbers." (The "so there!" expletive is understood if not explicitly said.) Sigh. Is the truculent pill right? Well, um, yes.
As we discuss in the article on what's an herb and what's a spice, the language we commonly use for some common things sometimes contradicts the technical language used for those same things. And so it is too with fruits and vegetables.
If you're playing the guessing game known (among other variations) as "Animal, Vegetable, Mineral," vegetable is roughly synonymous with plant as that word is most technically defined: "any of a kingdom (Plantae) of multicellular eukaryotic mostly photosynthetic organisms typically lacking locomotive movement or obvious nervous or sensory organs and possessing cellulose cell walls." In layperson's terms: a vegetable is sometimes any kind of living thing that lacks both the ability to get around as well as the brain and sensory organs that we associate with animals.
But in the grocery store, it's a different matter. The grocery store meaning of the word vegetable is the one herein defined as "a usually herbaceous plant (such as the cabbage, bean, or potato) grown for an edible part that is usually eaten as part of a meal; also : such an edible part." The word herbaceous here refers to the kind of stem vegetable plants have: one with little or no woody tissue, the kind that grows only for a single growing season.
This meaning neatly distinguishes recognizable vegetables like broccoli and carrots and kale from the things that grow on trees, like apples and pears. At first glance it might appear to also allow for the tomato of our truculent pill friend to be classified as a vegetable as well, but it does not in fact quite do that.
Though a tomato plant is indeed herbaceous—its parts are not woody, and it grows for only one season—a vegetable is by our definition only the plant itself or the edible part of such a plant. Meanwhile the thing a tomato plant produces isn't a part of the plant itself, any more than the egg a chicken lays is part of the chicken, or the apple is part of the tree on which it grew.
And so it is here that we turn to the relevant definition of fruit: "the usually edible reproductive body of a seed plant; especially : one having a sweet pulp." The tomato plant is a seed plant—it bears seeds—and the tomato that grows from it is an edible reproductive body; the seeds within the tomato are the means by which the tomato plant reproduces. A tomato isn't sweet like an apple, but the definition doesn't require it to be in order to qualify as a fruit.
By these technical definitions, then, our truculent pill friend is correct: a tomato is a fruit, and so is a pepper, and so is a cucumber, and so are all the squashes, even zucchini. Any thing that grows on a plant and is the means by which that plant gets its seeds out into the world is a fruit. Carrots and potatoes and parsnips and the like are of course still vegetables; they are the edible part of the plant, not its reproductive body. So there.
We will not, however, abandon you to the gloating of your truculent pill friend without some source of consolation. In closing, we offer instead some information you may use as your own ammunition of truculence: strawberries are not technically berries, but bananas are.
Brief explanation: the seeds (technically achenes) of a strawberry are embedded on its exterior, while a true berry has its seeds inside the pulpy flesh. Which makes bananas berries. Same goes for cucumbers and zucchinis. So there.