We use phrases all the time without really giving their meaning a great deal of thought. You may know that dead ringer means exact duplicate, but why is that? The two terms appear to have nothing in common. So, why dead; why ringer?
Let's first dispense with the idea that's sometimes put forward as the origin of this phrase, refers to people who were prematurely buried and who pulled on bell ropes that were attached to their coffins in order to attract attention. There's no evidence for this idea.
A ringer is a horse substituted for another of similar appearance in order to defraud the bookies. This word originated in the US horse-racing fraternity at the end of the 19th century. The word is defined for us in a copy of the Manitoba Free Press from October 1882: "A horse that is taken through the country and trotted under a false name and pedigree is called a 'ringer.'"
It has since been adopted into the language to mean any very close duplicate. As a verb, 'ring' has long been used to mean 'exchange/substitute' in a variety of situations, most of them illegal. From the same period is the term 'ring castors', meaning to surreptitiously exchange hats. Castors, or casters, were hats made from beaver fur. From the 20th century we have the Australian phrase, 'ring in the gray (or knob)', meaning to substitute a double-sided penny for a genuine one. Coming more up to date we have 'car ringing', which is the replacing of the identification numbers on a stolen car with those from a genuine vehicle.
So, that's ringer; what about dead? Dead, in the sense of lifeless, is so commonly used that we tend to ignore its other meanings. The meaning that's relevant here is exact or precise. This is demonstrated in many phrases; 'dead shot', 'dead center', 'dead heat' and so on.
So, 'dead ringer' is literally the same as 'exact duplicate'. It first came into use soon after the word ringer itself, in the US at the end of the 19th century. The earliest reference that confirms the 'exact duplicate' meaning is from the Oshkosh Weekly Times, June 1888, in a court report of a man charged with being 'very drunk': "Dat ar is a markable semlance be shoo", said Hart looking critically at the picture. "Dat's a dead ringer fo me. I nebber done see such a semblence."