Here at UCLA I teach a variety of classes, and this quarter I'm teaching two General Education courses: one on Evolution and the History of Life, and another on Dinosaurs. Both are for non-science majors, which means I teach it at about the level I write this blog - for an educated and interested layperson.
A couple weeks ago I had one of those fortuitous alignments of syllabi and was teaching the same topic in both classes. The topic was "What, if anything, is a reptile?" This actually wasn't a whole lecture, but part of a larger lecture on the history of vertebrate life, because this question is key to defining some of the major groups of vertebrates. Normally when people think of reptiles, they think of scaly, 'cold-blooded' animals like lizards or snakes. The main problem with this definition is that there are many animals in the past that fit this description whose closest relatives today are nothing like that.
First, a quick definition: modern snakes, lizards and mammals are all members of a larger group called 'amniotes', all united because they are descended from an earlier vertebrate which first evolved an amniotic egg. This is the sort of shelled egg that you probably think of when someone says 'egg' (although not all the shells are hard like chicken eggs; some, like turtle eggs, are pliable and leathery). So this is a sub-group within vertebrates, one that excludes amphibians and fish, who don't have shelled eggs, but instead have jelly-like eggs that need to be laid in water. With the amniotic egg, amniotes have thus divorced themselves from the need for water for reproduction, and this was a major step in vertebrate evolution.
Now let's look at a group within amniotes, mammals. "Mammals don't lay eggs", you say, and you're right (except for the strange monotremes - platypuses and echidnas). They don't now, but their ancestors did. Today, we consider mammals as discreet from the reptile-like taxa, with unique characters all their own - hair, lactation, warm-bloodedness. This last character is better termed as 'endothermy', the ability to generate heat internally. This is the opposite of ectotherms, which includes most modern reptiles, who have to get their heat externally, usually by absorbing heat from sunlight.
While modern mammals certainly don't look like 'reptiles', their ancestors did. The ancestors of mammals actually looked a lot like something most people would call a 'reptile' - scaly, ectothermic, sprawling, lots of pointy teeth. These 'mammal-like reptiles' were actually the biggest things on land for a while, back in the late Paleozoic. The best example that everyone knows is Dimetrodon,
the sail-backed lizard-like creature you often see in dinosaur play sets. It turns out that despite it's dinosaur-like appearance, Dimetrodon
is more closely related to you than dinosaurs. The key to figuring this out is the holes in the head. Dimetrodon,
and you, belong to a group of amniotes known as synapsids. The name relates to the fact that this group has one hole in the skull behind the eye for chewing muscles (called a temporal fenestra). You have this hole as well, although it has been greatly modified through the course of mammalian evolution.
Dinosaurs on the other hand were diapsids. These animals have two holes behind the eye (or two temporal fenestrae - that's the plural ending, because it's a first declension Latin noun (I'm a bit of a Latin nerd...)). Diapsids include most of the animals people think of reptiles - dinosaurs, crocodiles, lizards, snakes - but also birds, since birds are dinosaurs.
You can see these relationships on the diagram below, showing the relationships of amniotes, including 'reptiles' and other non-'reptile' groups, like mammals and birds. When naming taxonomic groups, paleontologists, and other biologists, only name groups that include all the animals descended from a common ancestor (termed a monophyletic clade). If we were to include everything that would at first sight be called a reptile (as shown), we would not be including all the descendants of the their common ancestor (termed a paraphyletic clade). This is because we wouldn't include mammals and birds, even though they are descended from 'reptile'-like ancestors.
Because of this, the term 'Reptile' is sometimes used in a more restricted sense, as displayed in the cladogram below. Mammals and their early, reptilian ancestors are termed synapsids. Dinosaurs, crocodiles, birds (which are actually a type of dinosaur), and some other groups like pterosaurs, are in another group called archosaurs (meaning, "ruling lizards'). 'Reptile' is restricted to modern snakes and lizards, and some extinct relatives of theirs (including some of the bizarre 'marine reptiles' of the Mesozoic, like ichthyosaurs and plesiosaurs, which are often mistakenly thought to be dinosaurs).
(Note: This is actually just one of several possible definitions of 'reptiles', mainly because the term is still debated. Another possibility is to just call birds reptiles, making dinosaurs and crocodiles reptiles again, but still leaving out the ancestors of modern mammals.)
Turtles present a bit of a challenge, as I've discussed before. One thing that makes classifying them difficult, which I didn't mention in the previous post, is that they have no holes behind their eyes, and it's unclear whether this is a primitive state or a derived one.
So what is a reptile? It depends on how strict a definition you want. The strictest definition includes snakes, lizards, and their closest relatives. So dinosaurs and your scaly ancestors were not reptiles, and neither are crocodiles. Hope that didn't ruin your day too much.