The Latin cardinal numbers starting at ten are decem, undecim, duodecim… Does the -decim (roughly "-teen") come from decem or from the same root? (I faintly recall decem and δέκα coming from something like *dekm.) It seems very plausible for semantic reasons and similarity, but I would like to understand the situation better. Can someone explain the relation between decem and -decim? Assuming they have a common origin, why does one have E and the other I? Is this case exceptional? Are there similar vowel changes in Latin that would help understand this case by analogy? I can't think of any such vowel changes in the last syllable, or even a short E becoming a short I, so I am really short of other similar examples. Are there attested spelling variants like duodecem that might shed light on the issue?
It might be a type of metathesis: *undecem > *undicem > undecim. This is apparently irregular, but metathesis often is. I don't know for sure, but I was able to find a source that suggests this, although it indicates that we don't have any attestation of the pre-metathesis form *undicem:
220.127.116.11. In Latin 'eleven' to 'seventeen' are all indeclinable compounds of 'one', 'two', etc. and 'ten', which appears as -decim. By normal vowel weakening *-decem > *-dicem, cf. auspicem < *auispecem acc. sg. to auspex. The metathesis must have been due to the combined pressure of decem and the ordinals, viz. decimus : decem :: undecimus : undecim in place of *undicimus : *undicem
(Robert Coleman, 1992. "Italic", Chapter 12 of Indo-European Numerals, p. 396-397, edited by Jadranka Gvozdanovic)
Coleman seems to indicate that the dating of this hypothesized change from *undicem > undecim is a bit unclear.
De Vaan writes, s.v. "decem":
In -decim, the i is not well explained. It is often believed to be due to a metathesis of *-dicem > *-decim, but a metathesis of two vowels is extremely rare in IE languages, and hence unlikely. The numerals in decim probably have -dec- from decern 'ten' and -im on the model of the ordinal numbers in -decimus. The ordinal *dekamo- yields decumo- or decimo-, and from it, decumanus is derived.