Wherever you find dinosaurs, chances are that
Even though Dimetrodon is often associated with dinosaurs, it evolved long before the first dinosaurs did. The heyday of this 10-foot-long predator was about 280 to 265 million years ago during the middle of the Permian period, thus preceding the earliest dinosaurs by 35 million years or more. More than just a time difference separates Dimetrodon from dinosaurs, though, and to understand why we have to look at its skull.
The skull of Dimetrodon certainly looks monstrous, but if you look behind its eye socket you can see something that immediately tells you who its closest relatives were. There is a single large hole there called the temporal fenestra, and it was the place where some of the lower jaw muscles attached to the skull. The number of these holes in this part of the skull can immediately tell a paleontologist what kind of animal they are looking at. Dinosaurs have two holes in the same area and are called diapsids. The possession of just one of these holes defines a group of vertebrates called synapsids, the group to which modern mammals (including you and I) belong. As odd as it may seem, this means that Dimetrodon is a distant relative of ours.
The evolutionary lineages containing the synapsids (like Dimetrodon and mammals) and reptiles (including diapsids like dinosaurs) split sometime over 324 million years ago from a lizard-like common ancestor. While many early synapsids looked reptilian, when we look back now we can easily see that they are more closely related to us and cannot truly be called "reptiles" at all. What is even more interesting, however, is that Dimetrodon belonged to a group of synapsids called the sphenacodontians, a group to which a distant ancestor of living mammals once belonged. This early mammalian ancestor probably did not have a sail, but it otherwise would have looked very similar to Dimetrodon. Dimetrodon was not some aberrant reptilian monster from a bygone age; it was one of our close evolutionary cousins from the time long before the first true mammals evolved.