The ending on altında is actually -(s)I(n). The s shows up if there is a vowel in the stem. The n shows up if there is a case ending following.
So kedinin alt-ı = the underside of the cat (no vowel in the stem so only -ı)
But kedinin alt-ın-da = under the cat (added a case ending so the n shows up as a buffer)
kedinin alt-ın-dan = from under the cat
kedinin alt-ın-a = at the underside of the cat
(Less likely to use them but I just want to show that other case endings do the same thing)
Expanding on Mozkir's answer:
Normal nouns only require a buffer (which is always a Y) when, otherwise, two vowels would clash. Observe:
Araba ; arabaYı ; arabaYa
Arabada ; Arabadan ← No need a Y here, as there is no double-vowel problem.
However, if the phrase is a genitive construction like X-[n]in Y-[s]i, you add a buffer consonant (which is an N this time) no matter what.
Jsmitten'in arabasıNı ; Jsmitten'in arabasıNa ← These two make sense in terms of buffer usage.
Jsmitten'in arabasıNda ; Jsmitten'in arabasıNdan ← The buffer usage is not justified here, but it's used for some reason.
Yup. Here is some background knowledge that helps me remember this: The ending -(s)I(n) was once -(s)In (or even -sIn; I am not sure). In Old Turkish it was then pronounced -(s)I with a nasalised I, and I think it is still pronounced like that in some Turkish dialects. But dropping the final n in favour of a nasalisation of the vowel only makes sense if it is really at the end of the word. So the original n is restored when another suffix follows.
The dog belongs to nothing in this sentence. There is no possessive suffix on dog. There is however a possessive suffix on "alt" :)
"alt (bottom)+ı (3rd p. sing. possessive suffix) +n (suffer n) +da (locative case)
Basically, with this type of postposition, you say "The dog is at the cat's underneath."
You can try joining memrise.... There is a course specifically for DuoLingo vocabulary, including a set for the postpositions. You can find it HERE :-)
If you've never heard of memrise, it's a way to drill vocabulary (with a break from grammar) and users can suggest memory tricks for every word. You can browse through all the tricks and select the one that works best for you... or add your own. For example: Duo's alternative answers are shown altında (credit: tgloyer)
And there is a tinycard desk (incomplete though yet)