Is a tomato a fruit or a vegetable?

Tomatoes are fruits because they form from a flower and contain seeds.