The spelling with ী instead of ি is an orthographical holdover of the originally long vowel in the feminine/diminutive suffix (OIA -ikā > -iā > -iă /iə/ > -ī /iː/ > -i /i/).
মাটী