When Richard Owen first named the Dinosauria in 1842, based on the genera Iguanodon, Megalosaurus and Hylaeosaurus, he defined them as a group of large, extinct reptiles characterised by various anatomical features, primarily a fused sacrum: that is, the five or six vertebrae in the hip region are fused together.
In her excellent historical overview The Dinosaur Hunters, Deborah Cadbury writes:
[...] the 'Lacertian' division had key defining characteristics. They were reptiles, and had scaly skin and laid eggs, but they possessed mammal-like characteristics in the shape and alignment of the limb bones and the sacrum. They did not sprawl like a crocodile, but moved on upright, pillar-like legs: these were reptiles designed for walking on land. They could be defined as a distinctive group of land-dwelling reptiles that walked with straight legs tucked under their bodies.
[...]
[Quote from Owen's 1842 paper:]The combination of such characters, some, as the sacral ones, altogether peculiar among Reptiles, others borrowed, as it were, from groups now distinct from each other, and all manifested by creatures far surpassing in size the largest of living reptiles, will, it is presumed, be deemed sufficient grounds for establishing a distinct tribe or suborder or Saurian Reptiles for which I would propose the name of 'Dinosauria'.[...]
Glorying in his new creation, he proclaimed: 'No reptile now exists which combines a complicated ... dentition with limbs so proportionately large and strong, having such well-developed marrow bones, and sustaining the weight of the trunk by ... so long and complicated a sacrum, as in the order Dinosauria.'
Owen's definition was fine when only a few dinosaurian genera were known, but as more and more dinosaurs and related animals were discovered, it because apparent that this was not sufficiently rigorous to allow animals to be classified as dinosaurian or not.
The Dinosauria were defined cladistically by Padian and May in 1993 as the most recent common ancestor of Passer (the sparrow) and Triceratops, together with all its descendants; or, more tersely, as {Passer + Triceratops}. This definition now seems to be commonly accepted. (See ``What do terms like monophyletic, paraphyletic and polyphyletic mean?'' )
This means that the following animals (among others) are dinosaurs: Passer, Archaeopteryx, Velociraptor, Troodon, Oviraptor, Therizinosaurus, Ornithomimus, Tyrannosaurus, Allosaurus, Megalosaurus, Carnotaurus, Diplodocus (from closest to furthest from Passer); and Triceratops, Chasmosaurus, Centrosaurus, Protoceratops, Psittacosaurus, Pachycephalosaurus, Iguanodon, Stegosaurus (from closest to furthest from Triceratops).
It also means that the following animals are not dinosaurs: crocodiles, lizards, turtles, Dimetrodon (which is more closely related to mammals) and mammals themselves, including mammoths, Smilodon (``sabre-tooth cats''), etc. (The notion that any big extinct animal is a dinosaur is of course complete nonsense.)
(For historical reasons, some people prefer the alternative and equivalent cladistic definition {Megalosaurus + Iguanodon}. This doesn't seem to have caught on, but you can use it if you like, since the group which it defines contains exactly the same animals as {Passer + Triceratops}.)
How can we tell what is a dinosaur and what isn't? We have a good definition, but we also need a diagnosis - that is, a set of characters unique to dinosaurs, whose presence in an animals tells us that it is probably a dinosaur, and whose absence tells us that it is probably not. (Such a character is called an synapomorphy.)
Different workers have proposed different sets of characters for the Dinosauria, since putative synapomorphies are matters of observation and interpretation rather than of fact. However, the following list, (from The Dinosauria, ed. Weishampel, Dodson & Osmolska, 1990) is fairly representative:
The following list - more complete, more up to date, but also more incomprehensible (:-) is from Sereno's 1999 article in Science 284:2137-2147:
It's nice to see that Owen's fused sacrum is still there, number two on Weishampel et al.'s character list and number six on Sereno's - even if it's been somewhat diluted by recent discoveries (e.g. Sellosaurus has only two sacral vertebrae). But it's important to understand that this character is now only a part of the diagnosis, not the definition. In other words, a reptile with five fused sacral vertebrae is only a dinosaur if it's descended from the ancestor of Passer and Triceratops; and if we found a descendent of that ancestor in which the sacrum was not fused, that animal would still be a dinosaur - as is Sellosaurus with its puny two-vert sacrum.
This diagnosis is very helpful. Unfortunately, however, even so comprehensive a character list is not sufficient for us to be certain whether certain genera are dinosaurs or merely close relations.
For example, consider the case of Eoraptor, often considered the earliest dinosaur. (To be precise, it's often considered the earliest known dinosaur: no-one suggests it is actually the most recent common ancestor of Passer and Triceratops.)
It's clear that Eoraptor branches off the evolutionary line that leads from non-dinosaurian archosaurs to the theropods; and the ornithischians and sauropodomorphs also branch off that line (in that order - theropods and sauropodomorphs are more closely related to each other than to ornithischians.) But exactly where in that branching sequence the Eoraptor branch falls is open to debate.
Consider the following cladogram:
Sauropodomorpha \ Ornithischia \ C (Advanced theropods) \ \ \ / Crurotarsi \ \ \/ (crocodiles) \ \ /=Theropoda (stem-based) \ \ B \/ \ \ \ / \ \ \/ \ \ /=Saurischia (stem-based) \ A \/=Dinosauria (node-based) \ \ / \ \/ \ / \/=Archosauria (node-based) / /
We are not certain where Eoraptor branched off from the line that led to advanced theropods: at point A, B or C. Although this may seem a fine distinction - these points on the tree are very ``close'' - it has a profound effect on poor old Eoraptor's identity:
So it's possible for Eoraptor to be non-dinosaurian or a basal saurischian, but not a basal dinosaur - neither saurischian nor ornithischian. Why is this? Because Saurischia and Ornithischia are defined as sister stem taxa {Passer > Triceratops} (meaning Passer and everything that has a more recent common ancestor with it than with Triceratops) and {Triceratops > Passer} respectively. These definitions exactly partition the dinosauria, so that there is no such thing as a ``basal dinosaur'' (except the common ancestor itself - and the chances of that ancestor actually being Eoraptor are vanishingly small.)
There are three aspects to the identity of any taxon, including the Dinosauria: